MDK Logo

Divider

Thin horizontal or vertical rule used to separate logical sections of a layout.

Thin horizontal or vertical rule used to separate logical sections of a layout.

import { Divider } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
orientationOptionalDividerOrientation | undefinedLine orientation
dashedOptionalboolean | undefinedLine style
dottedOptionalboolean | undefined
childrenOptionalReact.ReactNodeText or node rendered in the middle of the divider
alignOptional"center" | "left" | "right" | undefinedHorizontal alignment of the label
plainOptionalboolean | undefinedPlain text style — no border around label
classNameOptionalstring | undefinedCustom className

Usage

A styled horizontal or vertical separator line, optionally containing a label. Wraps Radix UI @radix-ui/react-separator.

Notes

  • Labels are ignored on vertical dividers.
  • dotted takes precedence over dashed when both are set.

Example

/** * Runnable example for Divider. */import { Divider } from '@tetherto/mdk-react-devkit'export const DividerExample = () => (  <div className="mdk-example-col">    {/* Solid (default) */}    <Divider />    {/* Dashed */}    <Divider dashed />    {/* Dotted */}    <Divider dotted />    {/* With centered label */}    <Divider>Section</Divider>    {/* With left-aligned label */}    <Divider align="left">Pool Statistics</Divider>    {/* Plain (no border around label) */}    <Divider plain>or</Divider>  </div>)