Components
BaseAttentionAlert
The attention line above a list: one warning sentence and a button that filters those records or shows them all again.
components/ui/BaseAttentionAlert.vue
View in the demo
Example
3 orders are late.
Orders (late), products (out of stock or running low), customers and students (at risk) and invoices (overdue) all render it, so every list warns the same way. Bind v-model:active to the view that shows those records: the button reads review-text while the list is unfiltered and show-all-text once it is filtered. Put extra actions, such as sending reminders, in the actions slot.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
textrequired | string | — | One sentence with the count and its impact. |
review-textrequired | string | — | Button label while the list shows everything. |
show-all-textrequired | string | — | Button label while the list shows only these records. |
active | boolean | false | Whether the list is filtered to these records. Use v-model:active. |
Slots
Name | Slot props | Description |
|---|---|---|
#actions | — | Extra buttons after the toggle. |
Events
Name | Payload | Description |
|---|---|---|
@update:active | [value: boolean] | The toggle was pressed. |
Accessibility
It renders a warning BaseAlert with role="status", and the toggle carries aria-pressed.