Content
<ns-content> Overview
Content is used to display typography and media.
✨ This is an auto-generated AI summary of the ns-content's documentation. It may not be accurate. ✨
The ns-content component’s placement is inside other components. It helps to add consistency to the styling of typography, improving how it interacts with the other components.
Examples
Guidance
Implementation
Placement
The ns-content component can be used in the following components:
Specification
Attributes
spacing
- Property
spacing- Description
- The spacing strategy for the content.
- Type
string- Options
compactcosynormalloose- Default
normal
type
- Property
type- Type
string- Default
standard
Slots
| Slot | Permitted tags | Description |
|---|---|---|
| Anonymous slot | <h1> <h2> <h3> <h4> <h5> <p> <ul> <ol> <figure> <ns-accordion> <ns-cta> <ns-table> <ns-standout> | The anonymous slot for the content. |
Specification notes
Anonymous slot
To display correctly, <ns-content> relies on clean HTML in the anonymous slot. Using additional components or HTML elements not listed in the permitted tags will break the styling and will be susceptible to breaking when the component is updated in future releases.
spacing options
| Spacing | Space value |
|---|---|
compact | 0.25em |
cozy | 0.5em |
normal | 1.0em |
loose | 1.5em |
Last updated: