Skip to main content
Version: Next

Alert API

import { Alert } from '@editora/ui-react';

Props​

PropTypeDescription
childrenReact.ReactNode
descriptionstring
dismissibleboolean
elevation'none' | 'low' | 'high'
headlessboolean
indicator'line' | 'none'
layout'inline' | 'banner'
livebooleanfalse for a static page banner: no role=alert/status and no aria-live, so it is not announced when the page loads. Keep the default (true) for messages that appear in response to something.
onClose() => void
openboolean
radiusnumber | string
size'sm' | 'md' | 'lg' | '1' | '2' | '3'
titlestring
tone'neutral' | 'info' | 'success' | 'warning' | 'danger'
variant'surface' | 'soft' | 'outline' | 'solid'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Alert.Icon props​

PropTypeDescription
askeyof JSX.IntrinsicElements
childrenReact.ReactNode

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Alert.Title props​

PropTypeDescription
askeyof JSX.IntrinsicElements
childrenReact.ReactNode

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Alert.Description props​

PropTypeDescription
askeyof JSX.IntrinsicElements
childrenReact.ReactNode

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Alert.Actions props​

PropTypeDescription
askeyof JSX.IntrinsicElements
childrenReact.ReactNode

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-alert>​

Alert renders the ui-alert custom element from @editora/ui-core, which can also be used without React.

Attributes: description, dismissible, elevation, headless, hidden, indicator, layout, live, radius, size, title, tone, variant

Events: close