Divider

A rule, optionally labelled.

import { Divider } from '@textui/core';

<Divider label="Danger zone" />

Props

| Prop | Type | Default | | | — | — | — | — | | direction | 'horizontal' \| 'vertical' | 'horizontal' | A divider runs across the flow, so it names its own axis. | | label | string | | Text set into the rule. | | labelAlign | 'left' \| 'center' \| 'right' | 'left' | | | char | string | | |

Plus everything on BoxProps.

Role: separator.

direction is 'horizontal' by default; 'vertical' draws a column rule for splitting a row. char overrides the glyph, which matters on a terminal that cannot draw box-drawing characters - though the theme already downgrades that for you.

labelAlign takes 'left' (the default), 'center' or 'right'.

See also

  • Splitter - a divider between two sized panes
  • spacer - the gap without the rule

Back to top

MIT licensed. Pre-1.0 - the surface is still moving.