Feedback & overlays
Notice
An inline notice with an icon, a body and one action, in four tones.
import { EcoNotice } from "vue-ecosphere"
Notice
The icon sits with the first line; the action centres itself. Vertical spacing is the parent's job.
You have used all 20 requests on your plan today. Your limit resets at 9:00 AM. Everything already submitted is unaffected, and nothing unsaved is lost.
Tones
info for neutral news, success for something done, warning (the default) for a limit, danger for something that failed or cannot be undone. The words carry the meaning as well as the colour.
Term 2 starts on 6 January. Timetables publish to students a week before.
Fees are reconciled. All 412 payments for October match the bank statement.
3 classes have no teacher. Students in them see an empty timetable slot.
The import failed. Row 18 has no admission number. Nothing was saved.
Dismissible
The × only emits dismiss: remove the notice with v-if, and remember the choice if it should stay gone.
Imported 120 students. They can sign in once their guardians accept the invite.
API
| Name | Type | Default | Description |
|---|---|---|---|
title | string | — | The fact, in bold, first. |
text | string | — | What it means (the default slot overrides it). |
tone | "warning" | "info" | "success" | "danger" | "warning" | Colours the stripe, icon and action link. warning is the original look; info uses the accent. |
icon | string | — | Leading icon (notice__i). Defaults to the tone's: information-line (warning, info), checkbox-circle-line (success), close-circle-line (danger). |
action | string | — | One action link (notice__a); emits action. Or use the #action slot. |
dismissible | boolean | false | Adds a small × (notice__x) that emits dismiss. The parent removes the notice. |
dismissLabel | string | "Dismiss" | Accessible name of the × button. |
@action / @dismiss | () => void | — | The action link was pressed / the × was pressed. |