Skip to main content
Kaleidoscope

Separator

A line to visually separate content

Default

A simple line to separate content.

Editable example

Best practices

  1. Any time you find yourself writing a style just to apply a 1px border between elements consider using a Separator instead.
  2. When using an OptionMenu, use the OptionMenuSeparator. It's just a regular Separator but it has the default spacing and outset to work within an OptionMenu pre-applied.

Vertical

A vertical separator to separate horizontal content.

Editable example

Size

By default Separator will fill its flex or grid container. An explicit size can also be provided.

Editable example

Spacing

Use the spacing prop to add spacing around the Separator. If possible try to use gap on a Stack or flexbox/grid container before reaching for spacing.

Editable example

Outset

Extend the separator all the way to the edges of a container if it has padding. Just set the outset prop to the same amount of spacing as the container's padding.

Editable example