Skip to content
Klarhimmel UI

Separator

Rooms
Spa
npx shadcn add @klarhimmel/separator

Examples

  • Basic

  • Vertical

  • Menu

DetailsAbout, usage, props and more

A hairline between groups, horizontal or vertical.

When to use

  • Use for

    A visual break between groups inside one section.

  • Not for

    Separating sections. Use headings and space.

  • Pairs with

    Menus, toolbars, lists.

Preview

Exempelhotellet

A small hotel by the water.

Reception is open 07:00 to 22:00, every day.

separator.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { Separator } from '@/components/klarhimmel/ui/separator';

export default function Example() {
  return (
    <Theme theme="brand">
      <Separator className="my-4" />
    </Theme>
  );
}

Import

Import

import { Separator } from '@/components/klarhimmel/ui/separator';
Files
separator.tsx, in components/klarhimmel/ui/. With it: theme, utils.
Render in
Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.

Props

PropTypeDefaultDescription
orientation'horizontal' | 'vertical''horizontal'A vertical one needs a parent with a height, such as a flex row.
decorativebooleantruePurely visual by default (hidden from assistive tech). Set false when the rule marks a real change of topic.
classNamestring-Extra classes, merged after the component's own.