Hacktron Design System

Divider

A thin line separating two pieces of content.

Row oneRow two
<template>  <Divider /></template>

Props

Name Type Default
variant"primary" | "secondary""primary"
...propsUSeparator props (orientation, as, decorative, ...)-

Guidelines

Do

  • Use variant="secondary" (the default) for a divider between repeated rows in a list.
  • Use variant="primary" for a divider inside a container whose own border is already stroke-primary (e.g. a Card), so the line reads consistently with it.
  • Pass orientation="vertical" to separate inline items in a toolbar or button group.

Don't

  • Don't reach for a plain <div class="h-px bg-stroke-primary"> - that's exactly what this component replaces.
  • Don't use it to fake a section break inside a Card - a Card's own header/footer slots already provide that separation.

Examples

Vertical

`orientation` passes through to USeparator unchanged - pair it with an explicit height, since a vertical divider has no content of its own to size against.

<template>  <div class="flex items-center gap-3">    <Button variant="ghost" size="xs">Copy</Button>    <Divider orientation="vertical" class="h-4" />    <Button variant="ghost" size="xs">Share</Button>  </div></template>

Primary variant

Matches a container already bordered in stroke-primary, e.g. sitting inside a Card.

Section oneSection two
<template>  <Card>    <div class="flex flex-col gap-4">      <span>Section one</span>      <Divider variant="primary" />      <span>Section two</span>    </div>  </Card></template>