Skip to main content

Starwind UI v3.0 is now available! Migration guide

Heads up!

A simple alert with an “AlertTitle” and an “AlertDescription”.

Installation

Usage

icon

You can add any svg icon inside the <AlertTitle> component and it will be automatically styled.

variant

variant=“default”

A simple alert with an “AlertTitle” and an “AlertDescription”.

variant=“primary”

A simple alert with an “AlertTitle” and an “AlertDescription”.

variant=“secondary”

A simple alert with an “AlertTitle” and an “AlertDescription”.

variant=“info”

A simple alert with an “AlertTitle” and an “AlertDescription”.

variant=“success”

A simple alert with an “AlertTitle” and an “AlertDescription”.

API Reference

Styled Component API

These props are added or materially changed by the installed styled component. Standard HTML attributes remain available through the inherited interfaces noted below. Expand a prop to see named type definitions and framework-specific imports. Follow the Primitive and Runtime links for lower-level behavior props.

Alert

Inherits div attributes.

Contains the following additional props:

Prop Type Default Toggle details
variant "default" | "primary" | "secondary" | "info" | "success" | "warning" | "error" "default"
Description
Selects the component's visual variant.
Classification
Styled variant

Changelog

v1.4.1

  • Named the generated aggregate default export so React and Astro tooling can identify the installed component cleanly.

v1.4.0

  • Added contract-generated Astro and React implementations while preserving the component’s existing public API and styling.

v1.3.2

  • Refactor tailwind variants functions into separate variants.ts file

v1.3.0

  • style and focus state updates

v1.2.0

  • Add a data-slot attribute to all components to enable global styling updates
  • add role="alert" and other small accessibility improvements

v1.1.1

  • Adjust component to use type VariantProps from tailwind-variants. This provides greater type safety and cleans up component frontmatter.

v1.1.0

  • tailwind-variants now implemented. This uses tailwind-merge under the hood to merge Tailwind classes without style conflicts, allowing you to override any existing classes using the “class” prop.