Divider
The Divider component is used to visually separate content within a layout. It can be oriented horizontally or vertically.
Usage
<script>
import { Divider } from 'fluentui-svelte';
</script>
<Divider>Divider</Divider> Divider API
A brief explanation of the props that really need explaining. You can see the rest of the props here.
Appearance
Controls the color of the divider. Possible values: `'standard'`, `'accent'`, `'subtle'`.
Vertical
When `vertical` is set, the divider renders on the vertical axis instead of the horizontal one. Make sure the parent container has a defined height so the divider is visible.
Align Content
The `alignContent` prop controls where the label content (children) is positioned along the divider. Possible values: `'start'`, `'center'`, `'end'`.
It also works combined with the `vertical` prop:
Inset
When `inset` is set, the divider gets some inline padding applied, useful when it's placed inside a container that has content touching its edges.
Custom element
The `as` prop lets you change the underlying HTML element rendered by the divider. Possible values: `'div'`, `'hr'`, `'span'`.
Divider Props
| Name | Type | Description |
|---|---|---|
as | string | The HTML element to render the divider as. Possible values: `'div'`, `'hr'`, `'span'`. |
vertical | boolean | Whether the divider is rendered vertically instead of horizontally. |
alignContent | string | The alignment of the content within the divider. Possible values: `'start'`, `'center'`, `'end'`. |
appearance | string | The appearance of the divider. Possible values: `'default'`, `'accent'`, `'standard'`, `'subtle'`. |
inset | boolean | Whether the divider has inline padding applied. |
ref | HTMLDivElement | HTMLHRElement | HTMLSpanElement | The DOM reference of the divider element, its type depends on the `as` prop. |
children | Snippet | The content to render as a label within the divider. |
