Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Alert

An alert component with intent colors, variants, and optional dismiss.

vu-alert · @velkin/react/alert

Copy page

Import

React
npm i @velkin/react

import { VuAlert } from "@velkin/react/alert";

Examples

API

Props

PropTypeDefaultDescription
colorVuAlertColor"default"Intent driving surface color. Default: `"default"`.
variantVuAlertVariant"soft"Surface paint recipe. Default: `"soft"`.
sizeVuAlertSize"md"Padding, gap, and font scale. Default: `"md"`.
headingstring""Heading text above the body.
messagestring""Body text when the default slot is empty.
iconnull | stringnullIconify name; `null` derives from `color`, `""` disables.
removablebooleanfalseShows a dismiss button. Default: `false`.
closeLabelstring""Dismiss accessible name (`closelabel` attr).

Events

EventDetailDescription
vu-closeVuAlertCloseDetailCancelable before exit animation.

Slots

SlotDescription
—- Body content when `message` is empty.
headingHeading content when `heading` is empty.
iconCustom leading icon.
actionsTrailing buttons or links.

CSS parts

PartDescription
alertOuter surface container.
iconLeading icon wrapper.
stackHeading and body column.
headingHeading text element.
bodyBody region wrapper.
messageBody paragraph when `message` is set.
actionsTrailing controls cluster.
closeDismiss button when `removable`.

Methods

MethodDescription
close- Programmatic dismiss; fires `vu-close` then animates out.

Types

NameDefinition
string | null
null | string
VuAlertCloseDetail
{
  heading: string;
  message: string;
  reason: VuAlertCloseReason;
}
VuAlertColor
"default" | "primary" | "success" | "warning" | "danger"
VuAlertSize
"sm" | "md" | "lg"
VuAlertVariant
"solid" | "outline" | "soft" | "ghost"

Related

Feedback

  • DialogA dialog component with region slots, focus trap, and backdrop.
  • DrawerA drawer component with slide-in panel, backdrop, and focus trap.
  • NotificationA notification component that renders the toast viewport.
  • OverlayAn overlay component with backdrop and centered content slot.
  • PopoverA popover component with smart placement and a trigger slot.
  • ProgressA progress component with linear, ring, and indeterminate modes.

Guides

  • AccessibilityLabels and overlays
  • AppearanceStatus colors

Browse

  • Previous: VideoEarlier in the sidebar
  • Next: DialogLater in the sidebar
  • All componentsBrowse the full index