Integrated ResearchPicasso
Components

Separator

A 1px rule dividing related groups inside one surface.

{/* Generated by scripts/build-component-docs.mjs — do not edit. The source is the component folder: guidance.json, the doc block and the props. Change those. */}

A 1px rule dividing related groups inside one surface.

Import

import { Separator } from "@ir/ui";

Props

Takes the props of the element it renders, and nothing of its own — styling is the component's business, not the caller's.

Do and don't

Use it inside a surface, between sections of the same card or menu.

Don't — Put a rule between two cards.

Things that already have their own surface are already separated. A rule between them adds a line and no meaning.

Use spacing, and add the rule only if the grouping is still unclear.

Don't — Reach for a rule to create a gap.

Whitespace groups as well as a line does and leaves the page quieter. A rule is for when space alone has stopped working.

Leave it decorative unless the rule is the only boundary marker.

Don't — Set decorative={false} on every rule so it is 'accessible'.

Headings, lists and landmarks already carry the grouping. "Separator" announced between every section is noise, not access.

Put it in a flex row, or give it a height.

Don't — Drop a vertical rule into a block container and expect a line.

It fills the height it is given. Given none, it is 1px wide and 0 tall — nothing at all.

Rule between groups, and let rows sit on spacing alone.

Don't — Rule every row of a list.

A line per row turns a list into a table and makes the one meaningful boundary impossible to find.

Accessibility

  • decorative defaults to true, so the separator is hidden from assistive technology. That is right for a line that only groups things visually.
  • Pass decorative={false} only when the line genuinely divides two things a screen reader should hear are separate. A role="separator" between every pair of sections is noise.

Where it is drawn

Figma — structure from figma, measurements from figma.

Open in Storybook

On this page