An alert component. Used to display important messages and notifications to users.
This is a basic alert component test.
---import { Alert } from 'studiocms:ui/components/alert';---<Alert title="Alert Component Test"> This is a basic alert component test.</Alert>The alert component supports multiple variants to convey different types of messages:
default (Default)primarysuccessdangerinfowarningmonoThey can be used via the variant prop on the alert component.
This is a default alert message.
This is a primary alert message.
This is a success alert message.
This is a danger alert message.
This is an info alert message.
This is a warning alert message.
This is a monochrome alert message.
---import { Alert } from 'studiocms:ui/components/alert';---<Alert title="Default Alert" variant="default"> This is a default alert message.</Alert>
<Alert title="Primary Alert" variant="primary"> This is a primary alert message.</Alert>
<Alert title="Success Alert" variant="success"> This is a success alert message.</Alert>
<Alert title="Danger Alert" variant="danger"> This is a danger alert message.</Alert>
<Alert title="Info Alert" variant="info"> This is an info alert message.</Alert>
<Alert title="Warning Alert" variant="warning"> This is a warning alert message.</Alert>
<Alert title="Monochrome Alert" variant="mono"> This is a monochrome alert message.</Alert>You can customize the icon displayed in the alert using the icon prop:
This is a danger alert message with a custom icon.
---import { Alert } from 'studiocms:ui/components/alert';---<Alert title="Danger Alert" variant="danger" icon="heroicons:academic-cap"> This is a danger alert message with a custom icon.</Alert>