Components
Divider
Divider is used to create a visual separation. It is a simple horizontal line that spans the available width.
<p class="ds-paragraph">Divider er brukt for å dele opp innhold i mindre deler.</p>
<hr aria-hidden="true" class="ds-divider"/>
<p class="ds-paragraph">
Den kan også brukes for å skille innhold som er relatert til
hverandre.
</p>const Preview = () => { return ( <> <Paragraph> Divider er brukt for å dele opp innhold i mindre deler. </Paragraph> <Divider /> <Paragraph> Den kan også brukes for å skille innhold som er relatert til hverandre. </Paragraph> </> ); }; render(<Preview />)
Use divider when
- you want to create a clear separation between sections of content
- spacing alone does not provide sufficient separation
Avoid divider when
- natural spacing or other visual elements provide enough separation
- too many divider elements can create a cluttered visual appearance
Guidelines
Divider is used to group content that belongs together, making it easier to read and understand. It can also be used to separate content that is related but still benefits from a visual distinction.
Consider whether divider works well with the other visual elements you use, so the overall experience feels tidy and consistent.
Edit this page on github.com (opens in a new tab)