Actions / Icon button

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

NameTypeDefaultDescription
labelstring—Required. The accessible name (aria-label); the button has no visible text.
iconstring—RemixIcon name. Defaults to star-line for a star toggle.
iconPressedstring—Glyph while pressed — the filled variant (star-fill).
labelPressedstring—aria-label while pressed, e.g. “Remove star”.
v-model:pressedboolean—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.
outlinedbooleanfalseBordered variant (iconbtn--out).
starbooleanfalseStar toggle (iconbtn--star).
dotbooleanfalseUnread dot (iconbtn__dot).
tipstring—Hover tooltip (data-tip). Not a substitute for label.
disabledbooleanfalseNative disabled.
loadingbooleanfalseThe action is running: the glyph becomes a spinner, aria-busy is set and clicks (and toggles) are ignored. The label still names the action.