TidalUI

Alert preview

Inline notices with icons, actions and optional dismissal.

free · Feedback · primitive

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add https://tidalui.com/r/alert.json

Import components/ui/tidal.css, components/ui/alert.css. Wrap installed components in tidal-scope.

Preview

Alert component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/alert.css";
import{TidalAlert}from"./components/ui/alert";
export default()=><div className="tidal-scope"><TidalAlert title={"Demo"}/></div>;

API and props

TidalAlert.title (required)
ReactNode

Required title value accepted by this exported component.

TidalAlert.action
ReactNode

Optional action value accepted by this exported component.

TidalAlert.announce
"off" | "assertive" | "polite" | undefined

Static notices are silent. Opt into one live message for a meaningful update.

TidalAlert.dismissDisabled
boolean | undefined

Optional dismiss disabled value accepted by this exported component.

TidalAlert.dismissLabel
string | undefined

Optional dismiss label value accepted by this exported component.

TidalAlert.icon
ReactNode

Optional icon value accepted by this exported component.

TidalAlert.onDismiss
MouseEventHandler<HTMLButtonElement> | undefined

The consumer removes the notice and owns any necessary focus return.

TidalAlert.tone
TidalAlertTone | undefined

Optional tone value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas