Divider component is used to visually separate and group elements horizontally or vertically.

Open in new tab
import { Divider, Stack } from "@kesko/components";

export default () => (
  <Stack>
    Item
    <Divider />
    Item
    <Divider />
    Item
  </Stack>
);
import type { CSSProperties } from "react"
import { Divider } from "@kesko/components";

export default () => (
  <Divider style={{"--k-divider-color": "var(--k-color-accent)"} as CSSProperties} />
);
import { Divider, Stack } from "@kesko/components";

export default () => (
  
  <Stack direction="row">
    Item
    <Divider orientation="vertical" />
    Item
    <Divider orientation="vertical" />
    Item
  </Stack>
);
import type { CSSProperties } from "react"
import { Divider } from "@kesko/components";

export default () => (
  <Divider style={{"--k-divider-size": "var(--k-size-border-button)"} as CSSProperties} />
);

Props

NameDescriptionTypeDefault
orientation

The orientation of the divider.

"horizontal" | "vertical""horizontal"

CSS custom properties

CSS custom properties provide finer-grained control than props. Prefer the props API when it suits your need.

NameDescriptionDefault
--k-divider-color

Overrides the divider color.

var(--k-color-border-divider)
--k-divider-size

Overrides the divider size.

1px