ComponentsFeedback
Alert
A message that stays on the page: an error, a warning or a note.
A message that stays on the page: an error, a warning or a note.
This looks like a scan
<Alert icon={<InfoIcon />}>
<AlertTitle>This looks like a scan</AlertTitle>
<AlertDescription>Some text may be missing. Upload the original file for better results.</AlertDescription>
</Alert>The same component at all four levels. Pick the one that fits your project; they share tokens, so they mix.
npm i @junco/react @junco/tailwindimport { Alert, AlertTitle, AlertDescription } from "@junco/react";
<Alert color="danger" icon={<AlertIcon />}>
<AlertTitle>Couldn't read this file</AlertTitle>
<AlertDescription>Try uploading it again.</AlertDescription>
</Alert>Danger alerts are read out as soon as they appear. Put the fix right there.
That request didn't finish
Alert#coloriconactionroleclassNames| Prop | Type | Default |
|---|---|---|
colorTints the border, icon and title. | "neutral" | "primary" | "success" | "warning" | "danger" | "neutral" |
iconShown before the text, hidden from screen readers. | ReactNode | – |
actionButtons or links on the right. | ReactNode | – |
roleOverride when the alert is static content that shouldn't be announced. | string | "alert" for danger, else "status" |
classNamesSlot overrides. | { root?; icon?; body?; action? } | – |
AlertTitle#className| Prop | Type | Default |
|---|---|---|
classNameA short, bold summary. | string | – |
AlertDescription#className| Prop | Type | Default |
|---|---|---|
classNameDetails. Links inside are underlined. | string | – |