# TallStackUI: Alert
> TallStackUI is a TALL Stack (Tailwind CSS, Alpine.js, Laravel, Livewire)
> component library providing 65+ Blade components for building modern web interfaces.
A dismissible alert component for displaying contextual messages with optional title, icon, and footer. Supports solid, light, and outline color styles.
## Basic Usage
```blade
```
```blade
```
```blade
Please review your submission before continuing.
```
## Attributes
| Attribute | Type | Default | Description |
|-----------|--------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| title | string\|null | null | Bold heading displayed above the text |
| text | string\|null | null | Main alert message body |
| icon | string\|null | null | Heroicon name displayed to the left of the content |
| color | string\|null | 'primary' | Color theme (e.g., primary, red, green, yellow) |
| close | bool | false | Shows a dismiss button to hide the alert |
| dismiss | int\|null | null | Auto-dismiss the alert after N seconds |
| light | bool | false | Uses the light color style variant |
| outline | bool | false | Uses the outline color style variant |
| rounded | string\|null | 'lg' | Corner radius size: `xs`, `sm`, `md`, `lg`, `xl` |
| square | bool | false | Forces square corners (`rounded-none`); overrides `rounded` when both set |
| bordered | string\|null | null | Adds a thick side border. Format: `"left"`, `"right"`, or `":"` (e.g., `"left:red"`). When the color is omitted, the alert's `color` is used |
## Auto-Dismiss
```blade
{{-- Disappears after 5 seconds --}}
{{-- Auto-dismiss with manual close option --}}
```
## Rounded Corners
The `rounded` attribute controls the corner radius. Default is `lg`.
```blade
```
## Square Corners
Use `square` to remove the rounded corners entirely. When set, `rounded` is ignored.
```blade
```
## Side Border (`bordered`)
Adds a thick (`4px`) side border on the left or right edge of the alert. Useful for callouts.
```blade
{{-- Side only — color inherited from the alert's `color` --}}
{{-- Explicit color via `:` syntax --}}
{{-- Combinable with `outline` and `square` --}}
```
Accepts any of the 28 supported color names. Side must be `left` or `right`.
## Slots
| Slot | Description |
|-----------|-----------------------------------------------------|
| (default) | Main content body, used when `text` is not provided |
| footer | Content rendered below the alert body |
## Soft Customization
Soft customization allows you to override default Tailwind CSS classes used by this component at runtime, either through a service provider or scoped per-instance.
### Customization
```php
TallStackUi::customize()
->alert()
->block('wrapper', 'your-tailwind-classes');
```
### Available Blocks
| Block Name | Purpose |
|------------------|-----------------------------------------------------------------------|
| wrapper | Outer container of the alert |
| rounded.xs | Corner radius classes for `rounded="xs"` |
| rounded.sm | Corner radius classes for `rounded="sm"` |
| rounded.md | Corner radius classes for `rounded="md"` |
| rounded.lg | Corner radius classes for `rounded="lg"` |
| rounded.xl | Corner radius classes for `rounded="xl"` |
| square | Classes applied when the `square` attribute is set |
| bordered.left | Border classes applied when `bordered="left"` (or `"left:"`) |
| bordered.right | Border classes applied when `bordered="right"` (or `"right:"`) |
| content.wrapper | Flex container for icon, text, and close button |
| content.base | Inner flex wrapper for icon and text |
| text.title | Title heading styles |
| text.description | Description paragraph styles |
| close.wrapper | Close button container |
| close.size | Close icon dimensions |
| icon.wrapper | Icon container |
| icon.size | Icon dimensions |