Skip to content
Components

Alert

BetaBeta — the props contract is close to final, but small breaking changes can still land.

Inline status panel for callouts, errors, and notices.

Composition

Anatomy

  • <Alert>
    • <AlertTitle />
    • <AlertDescription />
    </Alert>

Installation

The Control UI source installs this primitive from src/registry/sources/control-ui/ui/alert.tsx.

Registry command
See registry manifest

Raw code

Primary installed source

src/registry/sources/control-ui/ui/alert.tsx

Knobs

Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.

--cui-alert-* · 15 knobsHow the cascade resolves
--cui-alert-radius<length-percentage>var(--radius-lg)
--cui-alert-background<color>var(--card)
--cui-alert-border-color<color>var(--border)
--cui-alert-shadow*none
--cui-alert-foreground<color>var(--card-foreground)
--cui-alert-description-foreground<color>var(--muted-foreground)
--cui-alert-border-width<length>var(--control-rim-width)
--cui-alert-padding<length-percentage>calc(var(--spacing) * 3)
--cui-alert-padding-inline<length-percentage>calc(var(--spacing) * 4)
--cui-alert-gap<length-percentage>calc(var(--spacing) * 0.5)
--cui-alert-icon-gap<length-percentage>calc(var(--spacing) * 3)
--cui-alert-icon-size<length-percentage>calc(var(--spacing) * 4)
--cui-alert-font-size<length-percentage>var(--text-body)
--cui-alert-description-gap<length-percentage>var(--spacing)
--cui-alert-title-font-weight<number>var(--font-weight-medium)