Flutter docs
Default skin

Divider

A divider line separates different content.

When to use

  • Divide sections of an article or page.
  • Divide inline text and links with the vertical treatment.

Examples

Horizontal

A Divider is horizontal by default. You can add text within Divider.

Set the spacing size of the divider

The size of the spacing.

Vertical

Use orientation="vertical" or vertical to make the divider vertical.

Custom semantic dom styling

You can customize the semantic dom style of divider by passing objects/functions through classNames and styles.

Divider with title

Divider with inner title, set titlePlacement="start/end" to align it.

Text without heading style

You can use non-heading style of divider text by setting the plain property.

Variant

Divider is of solid variant by default. You can change that to either dashed or dotted.

API

Divider and DividerProps are exported from @ceebee/ui/client.

Divider

PropertyDescriptionTypeDefaultVersion
childrenThe wrapped titleReactNode-—
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string>-—
dashedWhether line is dashedbooleanfalse—
orientationWhether line is horizontal or verticalhorizontal | verticalhorizontal-
orientationMarginThe margin-left/right between the title and its closest border, while the titlePlacement should not be center, If a numeric value of type string is provided without a unit, it is assumed to be in pixels (px) by default.string | number-—
plainDivider text show as plain stylebooleanfalse4.2.0
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties>-—
sizeThe size of divider. Only valid for horizontal layoutsmall | medium | large-5.25.0
titlePlacementThe position of title inside dividerstart | end | centercenter-
typeThe direction type of dividerhorizontal | verticalhorizontal-
variantWhether line is dashed, dotted or soliddashed | dotted | solidsolid5.20.0
verticalOrientation, Simultaneously configure with orientation and prioritize orientationbooleanfalse-

Also available

The server-safe Ceebee Divider remains at @ceebee/ui; use @ceebee/ui/client for the complete contract.