structyl

Separator API

View component

The full prop reference for the Separator component. Visually or semantically separates content.

Import

tsx
import { Separator } from '@structyl/styled';

Props

Separator

A flexible separator component for dividing content, supports both horizontal and vertical orientations with optional decorative styling.

PropTypeDefault
orientation#'horizontal' | 'vertical'

The orientation of the separator

'horizontal'
decorative#boolean

If true, sets role='none'; if false, sets role='separator' and aria-orientation

true
asChild#boolean

If true, renders the component's children as the root element instead of a div

className#string

Additional CSS classes to apply to the separator

ref#React.Ref<HTMLDivElement>

Forward ref to the underlying div element

Source code

If you didn't find what you need here, read the component implementation .

structyl — Accessible React Component Library