For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/alert.md.
v0.0.57
  • English
  • Alert

    Feedback@rockshin/tao-ui

    Displays important contextual feedback messages with semantic status types.

    When to use

    Use Alert for persistent, page-level feedback about a state or operation. Use Sonner toasts for transient notifications.

    Recommended

    • Pick the semantic type that matches the severity of the message.
    • Keep the title short; put detail in the description.
    • Enable showIcon when the alert needs to be scannable at a glance.

    Avoid

    • Do not stack many alerts in one view; prefer a single summary.
    • Do not use Alert for transient feedback; use a toast instead.

    Examples

    Basic usage

    Changes saved
    New version available
    Refresh when you are ready.
    Subscription expires soon
    Could not save changes
    TSX

    Descriptions and icons

    Deployment complete
    Production is running version 0.0.25.
    Update available
    Refresh when you are ready.
    Quota almost reached
    Storage is 92% full.
    Build failed
    Fix the type errors and run again.
    TSX

    Closable alerts and actions

    Closable message
    Payment method expires soon
    Update it before the next billing date.
    Connection lost
    TSX

    Title and description

    Use description for the cause and recovery while keeping the title concise.

    Success
    Your changes have been saved successfully.
    Info
    A new version is available. Refresh to update.
    Warning
    Your subscription expires in 3 days.
    Error
    Something went wrong while processing your request.
    TSX

    Status icons

    showIcon adds the matching success, information, warning, or error icon.

    Success
    Info
    Warning
    Error
    Success
    Icons grow larger when a description is present.
    🔥
    Custom Icon
    TSX

    Inline actions

    Use action for an operation related to the message and provide feedback when it completes.

    New version available
    Request failed
    These actions update local example state.
    TSX

    API

    Alert

    PropertyDescriptionTypeDefault Value
    classNameAdditional css classstring | undefined-
    styleAdditional styleCSSProperties | undefined-