eQuantic.UIeQuantic.UI
Docs
Playground
GitHub
DocsActions & inputs
IconButton
View source
1 min read
A square, icon-only action. Label is required — it is what assistive tech announces and what the tooltip shows.
1
using eQuantic.UI.Components;
KINDS
Ghost
Outline
Filled
Tonal
SELECTED
selected
unselected
Usage
1
2
3
4
5
6
new IconButton(Icons.Search, "Search", onPressed: OpenSearch)
{
Kind = IconButtonKind.Ghost,
Selected = _saved,
SelectedGlyph = Icons.BookmarkFilled,
}
API
Prop
Type
Default
Description
Glyph
Icons
The icon, from the atlas — no runtime vector paths.
Label
string
Required. Not painted; announced by the reader and shown in the tooltip.
Kind
IconButtonKind
Ghost
Visual treatment of the square.
Size
SizeVariant
Medium
Square and glyph size from Sizing.
OnPressed
Action?
null
Press handler.
Selected
bool
false
Toggle state — for bookmark, mute, favourite.
SelectedGlyph
Icons?
null
Alternate glyph while selected, usually the filled twin.
Disabled
bool
false
0.38 and out of the focus order.
States
State
Rendering
Default
Kind fill
Pressed
Wash within Motion.Press
Selected
Selected glyph plus tonal fill
Disabled
0.38
Accessibility
Role button named by Label; a toggle announces its selected state.
Long-press (touch) or hover (web) reveals a Tooltip with the same text.
Hit rect never drops below Touch.MinTarget (48) even at Small.
When to use
Toolbars, app bars and list-row affordances where space is scarce.
Glyphs that are unambiguous on their own: close, search, more, edit.
Avoid
Unfamiliar glyphs standing alone.
More than four in a row — move the rest into a Menu.
NOTEEvery dimension resolves through Sizing.*(SizeVariant) and the token scales — never a literal. Source: src/eQuantic.UI.Components/IconButton.cs.