Primitives

Alert · Banner

Alert is a contained notice — default, accent, warn. Banner is full-width with optional action.

installnpx shadcn@latest add https://br-design-system2.vercel.app/r/br-primitives.json

Preview

Heads up.

A new version of this design system is ready.

You're on the list.

Your slot for the next sprint is confirmed for Mar 18.

Two-factor auth is off.

Add a second factor to protect your account.

import { Alert, Banner, Button } from "@/components/br/primitives";

<Alert title="Heads up.">A new version is ready.</Alert>
<Alert variant="accent" title="You're on the list.">Confirmed for Mar 18.</Alert>
<Alert variant="warn" title="Two-factor auth is off.">Add a second factor.</Alert>

<Banner
  action={<Button variant="ghost" size="sm">Read journal</Button>}
  onDismiss={() => setOpen(false)}
>
  Edition 02 is out.
</Banner>

Props

PropTypeDefaultDescription
Alert.variant"default" | "accent" | "warn""default"Tone.
Alert.titleReactNodeBold first line.
Alert.iconReactNodeOverride the default Info/Warning icon.
Banner.actionReactNodeRight-aligned CTA.
Banner.onDismiss() => voidIf provided, shows an X button.