Site color

Choose your site’s color palette.

Saved on this device.

AlertBox

AlertBoxContextual feedback

Turn an important message into a useful next step. Combine context, semantic color, and actions in one notice.

Actions & feedback

In context

A complete messageCOMPOSITION

DESIGN SYSTEM

Make feedback useful Tip

Explain what happened, why it matters, and what the reader can do next.

Explore semantic tones

Semantic tones adapt to light and dark themes.

Every content feature is visible: eyebrow, title, badge, icon, body, metadata, and the actions slot.

<AlertBox
      tone="success"
      variant="spotlight"
      eyebrow="DESIGN SYSTEM"
      title="Make feedback useful"
      badge="Tip"
      icon="lucide:check"
      meta="Semantic tones adapt to light and dark themes."
      ><p class="m-0">
        Explain what happened, why it matters, and what the reader can do next.
      </p>
      <template #actions
        ><BtnLink
          class="max-w-full ws-normal"
          href="/guides/styling/semantic-tones/"
          tone="success"
          variant="outlineFill"
          >Explore semantic tones</BtnLink></template>
</AlertBox>

An actionable notice

Make the next step part of the message. The actions slot keeps it alongside the context.

COMPONENT GUIDANCE

A shared design language Tip

Use semantic tones to communicate intent across your interface.

Explore surfaces

Applies to both light and dark themes.

<AlertBox
        tone="danger"
        title="A shared design language"
        eyebrow="COMPONENT GUIDANCE"
        badge="Tip"
        icon="lucide:check"
        meta="Applies to both light and dark themes."
      >
        <p class="m-0">
          Use semantic tones to communicate intent across your interface.
        </p>
        <template #actions>
          <BtnLink
            class="max-w-full ws-normal"
            href="/components/layout/panel/"
            variant="outlineFill"
          >
            Explore surfaces
          </BtnLink>
         </template>
</AlertBox>

Choose the right urgency

Keep the message explicit so color is never the only signal.

All checks passed
The preview is ready for review.
Review required
Check the content before publishing.
Build failed
Correct the source error and build again.
<Flex direction="column">
  <AlertBox tone="success" title="All checks passed" icon="tabler:circle-check">
    The preview is ready for review.
  </AlertBox>
  <AlertBox tone="warning" title="Review required" icon="tabler:alert-triangle">
    Check the content before publishing.
  </AlertBox>
  <AlertBox tone="danger" title="Build failed" variant="outline" icon="tabler:alert-circle">
    Correct the source error and build again.
  </AlertBox>
</Flex>

All semantic tones

All ten tones, with visible labels. Explain intent through the message as well as color.

All semantic tonesCOMPOSITION
neutral
neutral
A clear message with supporting context.
accent
accent
A clear message with supporting context.
feature
feature
A clear message with supporting context.
secondary
secondary
A clear message with supporting context.
custom
custom
A clear message with supporting context.
ghost
ghost
A clear message with supporting context.
info
info
A clear message with supporting context.
success
success
A clear message with supporting context.
warning
warning
A clear message with supporting context.
danger
danger
A clear message with supporting context.

All values are shown together. Switch the site theme to compare light and dark rendering.

All visual variants

All eighteen treatments in the info tone. Content, icons, and actions share the same API across treatments.

All visual variantsCOMPOSITION
solid
solid
Supporting message.
surface
surface
Supporting message.
surfaceAlt
surfaceAlt
Supporting message.
spotlight
spotlight
Supporting message.
glass
glass
Supporting message.
flat
flat
Supporting message.
flatAlt
flatAlt
Supporting message.
flatSolid
flatSolid
Supporting message.
outlineFill
outlineFill
Supporting message.
outline
outline
Supporting message.
subtle
subtle
Supporting message.
subtleBtn
subtleBtn
Supporting message.
link
link
Supporting message.
sheen
sheen
Supporting message.
underline
underline
Supporting message.
rail
rail
Supporting message.
bracket
bracket
Supporting message.
none
none
Supporting message.

All values are shown together. Switch the site theme to compare light and dark rendering.

Variant modes

Stateless is the default. Stateful enables hover, focus, and active styling; it does not add action handlers. Hover or focus these notices to compare.

Variant modesCOMPOSITION
stateless
stateless
Compare the treatment.
stateful
stateful
Compare the treatment.

All values are shown together. Switch the site theme to compare light and dark rendering.

Behavior and accessibility

The eyebrow sits above the title, the badge stays beside the title, and metadata follows the actions. Empty actions take no space. The optional icon uses a solid frame in the selected tone; variant controls the surrounding Panel. This layout uses existing spacing, typography, wrapping, and visibility utilities.

AlertBox is a visual content component and does not automatically announce messages. For newly inserted urgent messages use an appropriate live region; for routine form feedback use FormStatus. Static notices should not interrupt screen-reader users.

API reference

AlertBox contract

Props below are the public template API. RefOrValue accepts a literal or a reactive ref; bind refs with a colon-prefixed attribute. Native attributes and events can be passed through the component root.

title

RefOrValue<string>
Default
not set

Visible heading. Choose a short title that identifies the content or task.

eyebrow

RefOrValue<string>
Default
not set

Short context above the heading, such as a category or release label.

badge

RefOrValue<string>
Default
not set

Optional compact label rendered with Badge.

meta

RefOrValue<string>
Default
not set

Secondary context such as an update time, limitation or reassurance.

tone

RefOrValue<SemanticTone>
Default
info

Semantic message tone. The default is info; use success, warning or danger only when that intent matches the text.

variant

RefOrValue<ComponentVariant>
Default
surface

Visual treatment. Accepts solid, surface, surfaceAlt, spotlight, glass, flat, flatAlt, flatSolid, outlineFill, outline, subtle, subtleBtn, link, sheen, underline, rail, bracket or none.

variantMode

RefOrValue<ComponentVariantMode>
Default
stateless

Use stateless for content surfaces; stateful enables the treatment’s hover, focus and active styles. It does not add interaction handlers.

icon

RefOrValue<string>
Default
not set

Registered SVG icon name. In browser apps, include the icon in the resolver passed to defineIconComponents.

Composition

Default slot: message body. actions: contextual links or buttons. Register defineAlertComponents with Panel, Flex, IconFrame, Icon and Badge dependencies; action components need their own registrations.