@akhatmirzo/ui

Divider

A 1px line that separates sections — horizontal or vertical, optionally with text in the middle.

Mahsulotlar220 000 so'm
Yetkazib berish25 000 so'm
Jami245 000 so'm

Import

import { Divider } from '@akhatmirzo/ui';

When to use

  • To separate parts that differ in meaning — the total on a receipt, menu groups, sections inside a card.
  • Spacing is often enough. Don't put a line between every item — the page turns into a grid.
  • Between alternatives — label="or": "Sign in with phone" / "Sign in with Google".
  • If it's purely decorative (say, between navigation links), use decorative.

With text

label puts text in the middle of the line. When it's a string, it also becomes the aria-label.

Vertical

orientation="vertical" sits inside a row and stretches to the parent's height. Give the parent a height (h-5) or use items-stretch.

Bosh sahifa
Buyurtmalar
Sozlamalar

Props

Divider accepts every other <div> attribute. Change the color with className, for example bg-border-strong.

PropTypeDefaultDescription
orientation'horizontal' | 'vertical''horizontal'Direction
labelReactNode—Text in the middle ("or")
decorativebooleanfalseDecoration only — hidden from screen readers (role="none")

The root element has a data-orientation attribute.

Accessibility

  • role="separator" with aria-orientation — screen readers announce the boundary between sections.
  • A string label becomes the separator's aria-label.
  • decorative sets role="none", so meaningless lines aren't announced. Use it between navigation links or toolbar groups.

On this page