Divider

A hairline rule in the theme's line colour.

Overview

One line between a heading and its content, or above a footer.

Footer

Do

The last paragraph of a page.


Hack Cove (Pty) Ltd

import { Body, Caption, Divider, Stack } from "@hackcove/ui";

<Stack gap="lg">
  <Body as="p">The last paragraph of a page.</Body>
  <Divider />
  <Caption as="p">Hack Cove (Pty) Ltd</Caption>
</Stack>
A Divider is one hairline between two parts of a page, here the content and its footer. The space around it is the Stack's.

Cards

Do

Build 412

3 changed

Build 411

No changes
import { Body, Card, Stack } from "@hackcove/ui";

<Stack>
  <Card title="Build 412">
    <Body>3 changed</Body>
  </Card>
  <Card title="Build 411">
    <Body>No changes</Body>
  </Card>
</Stack>
Bordered blocks need no rule between them: the Stack's gap separates them.
Don't

Build 412

3 changed

Build 411

No changes
import { Body, Card, Divider, Stack } from "@hackcove/ui";

<Stack>
  <Card title="Build 412">
    <Body>3 changed</Body>
  </Card>
  <Divider />
  <Card title="Build 411">
    <Body>No changes</Body>
  </Card>
</Stack>
A Divider between two Cards is a second line on top of their borders and the gap.

Usage

  • Use it between two parts of a page that are not bordered, such as the content and its footer.
  • The space around it is the layout's: put it in a Stack, never add margin.
  • Do not draw it between bordered blocks such as Card: their borders and the gap already separate them.
  • For a rule under a section title, SectionHeading has rule.

Accessibility

  • It is an <hr>, which assistive tech announces as a separator. Use it only where the content really changes.

API

Divider

A hairline rule in the theme's line colour: between a heading and its content, or above a footer. Space around it is the layout's.