Separator

Horizontal or vertical visual division between content groups.

Add it to your project

Eject the complete separator group, then import from its generated local barrel. The copied source and CSS belong to your application.

bash
pnpm exec toucan eject separator
app.tsx
import { Separator } from '@/components/toucan/separator';

Use when

Adjacent content groups need a subtle visual boundary.

Avoid when

Spacing or a heading already communicates the grouping.

Example

Content above

Content below

API reference

Generated from packages/react/src/components. Only Toucan-specific props are listed; forwarded native props remain available as noted for each export.

Separator

Separator

Props type: SeparatorProps

NameTypeDefaultRequiredDescription
decorativebooleanfalseNoRemove separator semantics when the line is purely visual.
orientation"horizontal" | "vertical"'horizontal'NoHorizontal or vertical orientation.
spacing0 | 1 | 2 | 3 | "none" | 4 | 5 | 6 | 8 | 10 | 12 | 16'none'NoSpace placed around the separator.

Also accepts the native div attributes that are not replaced by a Toucan prop.

Type exports

SeparatorProps, SeparatorSpacing

ts
export type SeparatorSpacing = 0 | 1 | 2 | 3 | "none" | 4 | 5 | 6 | 8 | 10 | 12 | 16;

Accessibility

  • Uses separator semantics and reports orientation.

Token families

separatorcolor.border

Related components