Skip to content

Section

A full-width page band with background and padding variants.

A band spans the full width, so put a @khaeli/container inside it to hold the content. as picks the element: section by default.

Backgrounds

Transparent, the default: the page shows through.

Light: the page background.

Muted: a quiet band between two plain ones.

Dark: the foreground colour, with the text reversed.

Padding

none

small

default

large

Bordered

Three invoices are awaiting payment.

Installation

npx shadcn@latest add @khaeli/section

Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.

Installs with

Registry items
npm packages
  • class-variance-authority ^0.7.1

Accessible name

  • A section is only a landmark when it has a name. Give it aria-labelledby pointing at its heading when the band is worth a stop in the landmark list.

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/section.json