Alert Showcase

Alert

Delightfully polished alerts for high-signal messaging. PyraUI ships crisp visuals, badges, call-to-actions, and micro-interactions so your feedback moments feel intentional and premium.

Quick Alerts

Real-world, unobtrusive notifications optimised for status and inline messaging.

Compact by default

<.alert variant={:success} title="Saved" message="Preferences updated" />
<.alert variant={:warning} dismissible title="Heads up" message="Verify your billing email" />

        

Enhanced Experiences

Layer badges, richer copy, and inline CTAs when an alert should guide the next step.

Motion aware

<.alert
  variant={:celebrate}
  badge="Celebration"
  title="Product adoption is soaring"
>
  <p>Activations grew 34% this sprint. Give the GTM team a high five!</p>
  <:actions>
    <.button variant={:ghost} size={:sm}>Share announcement</.button>
  </:actions>
</.alert>

        

Dismissible + Actions

Alerts love progressive disclosure. Combine dismissal, custom copy, and inline CTAs for effortless follow-up.


<.alert variant={:info} badge="Update" title="New release" dismissible>
  <p>Your workspace can opt-in to the latest features right away.</p>
  <:actions>
    <.button variant={:primary} size={:sm}>Enable now</.button>
    <.button variant={:ghost} size={:sm}>Later</.button>
  </:actions>
</.alert>

        

Props

Configure alerts with a small, expressive API. Defaults are optimised for accessibility, motion polish, and theming.

Prop Type Default Description
variant atom :info Choose the tone. Supports :info, :success, :warning, :danger, :celebrate, :neutral, :note.
title string | nil nil Optional heading that anchors the message hierarchy.
message string | nil nil Plain string message. Compose markup inside the component for richer content.
badge string | nil nil Adds a high-contrast capsule label (e.g. “Launch”, “Critical”).
icon string | nil auto Override the hero icon. Defaults to a tone-aware icon.
dismissible boolean false Allow users to close the alert once acknowledged.
class string "" Append classes to the outer container for bespoke layout tuning.
slots actions Use the :actions slot for inline call-to-actions.