Alert

A message in the page: information, success, a warning or an error.

Example

tsx
<Stack gap="sm">
  <Alert variant="info" title="New version">
    Dash 0.0.34 keeps compression dictionaries for every request.
  </Alert>
  <Alert variant="success" title="Deployed">The Workers are live.</Alert>
  <Alert variant="warning" title="Migration pending">
    Apply it before the new code runs.
  </Alert>
  <Alert variant="error" title="Build failed">
    Two pages name the same route.
  </Alert>
</Stack>

Usage

Pages are built on the server: import the tags from @dash/server and return the tree. The browser runtime draws it.
tsx
import { Alert, Stack } from "@dash/server";

Props

AlertProps

Also takes everything HTMLAttributes<HTMLDivElement> does.
Prop
Type
Description
variant"info" | "success" | "warning" | "error"
titlestring
dismissibleboolean
onDismiss() => void
PreviousTooltip
NextTable
On this page