Layout

Section Label

Small uppercase label that introduces a content block.

Preview
01 Installation

Install

Pull Section Label from the barrel for everyday use, or the granular path when you want a tighter bundle.

tsxBarrel1 line
import { SectionLabel } from "@brika/clay";
tsxGranular1 line
import { SectionLabel } from "@brika/clay/components/section-label";
02 Usage

A minimal example

Drop this into a page. Native HTML attributes pass through to the underlying primitive.

tsxSection Label.tsx6 lines
import { SectionLabel } from '@brika/clay/components/section-label';

/** Simple uppercase group divider above a list of cards. */
export default function SectionLabelDefaultDemo() {
  return <SectionLabel>Recent activity</SectionLabel>;
}
03 Examples

Section Label, every way

Tones

Semantic tones map to status colors, `destructive`, `warning`, `success`, `info`.

With Count

Inline count makes quantities scannable at a glance.

04 Accessibility

Accessibility

  • Renders as <p> by default, use as="h3" when it semantically introduces a group.
  • Tone colors are visual only; pair with an icon that has a meaningful aria-label when tone conveys status.
05 Tokens 2 theme-overridable

Theme tokens

Every CSS variable Section Label reads, with its default and the dotted path you'd write in a ThemeConfig JSON to override it. Set any of these in your theme to retune Section Label without touching component code.

Section Label tokens

2 tokens
ColorFill, border, and text colors.2
  • --section-label-colorcolorvar(--muted-foreground)
    components.sectionLabel.color

    Foreground color of the section label text and the default-tone icon. Defaults to the muted role so the label reads as quiet metadata above a content group.

  • --section-label-icon-destructive-colorcolorvar(--destructive)
    components.sectionLabel.iconDestructiveColor

    Icon color used when `tone="destructive"` flags an error or dangerous-action label.

Override in a theme

Authoring a theme is plain JSON. Drop overrides under components.sectionLabel, the names are camelCase versions of the variable suffix.

jsonmy-theme.json12 lines
{
  "id": "my-theme",
  "name": "My Theme",
  "description": "...",
  "accentSwatches": ["#000"],

  "components": {
    "sectionLabel": {
      "color": "var(--muted-foreground)"
    }
  }
}

Then apply with applyTheme(myTheme) (see the theming guide), scope it to a subtree with themeToCssVars(myTheme, mode), or consume any token directly in your own JSX with the matching Tailwind utility (e.g. bg-section-label-…) — see the chips on each token row.

06 API reference

API reference

Props specific to Section Label. Native HTML attributes pass through to the underlying primitive, see the component source on GitHub for the full type signature.

  • LucideIcon
    Optional Lucide icon component rendered to the left of the label.
  • 'default' | 'warning' | 'destructive' | 'success' | 'info'
    Semantic tint ("default", "destructive", "warning", "success", "info").