Separator
Separator draws a thin line that divides two groups of content.
Use a Separator to draw a thin line between two groups of content when space alone does not make the division clear. Its colour and thickness come from the theme.
Try space first, because a larger gap between two groups is often enough. When a group needs its own surface, use a Card, and when a region needs a recessed background, use a Surface.
A Separator is horizontal by default and fills the width of its container. With orientation="vertical", it fills the height of its row instead, so you never set a length.
A Separator is a real role="separator" element, and orientation sets aria-orientation for screen readers.
Props
Generated from the types. It lists what this component DECLARES: a prop that arrives from a shared type or from the platform is real and is not repeated here.
| Prop | Type | What it does |
|---|---|---|
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
children— A divider with a word in it is two Separators and a Text in a row, as the example above shows.- A length prop — The line always fills its container, so control its length by sizing the container, just as you control spacing.
decorative— A line that screen readers should skip is decoration rather than a separator. Draw it with a styledBoxinstead.