Actions
Icon button
Icon-only buttons: default, small, outlined, with an unread dot, and a star toggle.
import { EcoIconButton } from "vue-ecosphere"
Default, small and outlined
Every icon-only button needs an aria-label, so label is required. The tooltip is extra, never a replacement for it.
Star on / off
A toggled-on icon takes the filled glyph (ri-star-fill against ri-star-line); is-on carries the colour change only.
Loading
The glyph becomes the spinner while the action runs; the button keeps its label and focus and ignores clicks.
API
| Name | Type | Default | Description |
|---|---|---|---|
label | string | — | Required. The accessible name (aria-label); the button has no visible text. |
icon | string | — | RemixIcon name. Defaults to star-line for a star toggle. |
iconPressed | string | — | Glyph while pressed — the filled variant (star-fill). |
labelPressed | string | — | aria-label while pressed, e.g. “Remove star”. |
v-model:pressed | boolean | — | Bind it to make a toggle (aria-pressed + is-on). Leave unbound for an action. |
size | "md" | "sm" | "md" | 36px or the small size for rows and toolbars. |
outlined | boolean | false | Bordered variant (iconbtn--out). |
star | boolean | false | Star toggle (iconbtn--star). |
dot | boolean | false | Unread dot (iconbtn__dot). |
tip | string | — | Hover tooltip (data-tip). Not a substitute for label. |
disabled | boolean | false | Native disabled. |
loading | boolean | false | The action is running: the glyph becomes a spinner, aria-busy is set and clicks (and toggles) are ignored. The label still names the action. |