Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

ToggleButton

Since 0.1.0-alpha.22
A button that stays on or off: a checkbox drawn as a button.

IzzyBlazor.ToggleButton in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly and its doc comments.

Properties (9)

ChildContentRenderFragment?Added in 0.1.0-alpha.22

The text, such as "Starred". Without it, Label (or the model property's name) is the text.

IconIconData?Added in 0.1.0-alpha.22

An icon before the text, such as Lucide.Mic; while it's off, when CheckedIcon is set.

CheckedIconIconData?Added in 0.1.0-alpha.22

The icon while it's on, in place of Icon, such as Lucide.MicOff on a mute toggle. The name stays the same: screen readers hear the state as checked or not.

IconOnlybool = falseAdded in 0.1.0-alpha.22

Shows only the Icon; Label stays as its name for screen readers and its tooltip.

SubmitOnChangebool = falseAdded in 0.1.0-alpha.22

Posts the form around it as it changes, such as a filter in a GET form on a static page. With JavaScript off, the form's own submit button posts it.

AccentAccent? (computed)Added in 0.1.0-alpha.22

Its color. Defaults to Neutral, or its group's.

VariantButtonVariant? (computed)Added in 0.1.0-alpha.22

Its look. Defaults to ButtonVariant.Outline, or its group's.

@bind-Valuebool = falseAdded in 0.1.0-alpha.22

The value, bound with @bind-Value.

DisplayNamestring?Added in 0.1.0-alpha.22

The field's name in validation messages from the input itself, such as a value that can't be parsed.

Events (0)

No events.

Types (2)

Accent

class

The color of a control: buttons, badges, tags, banners, progress bars and menu items. Primary, Neutral and Danger are the roles; emphasis comes from the variant (solid, soft, outline, ghost, link), not from more colors. For one control in another color, use Of (any CSS color) or Token (a theme token); text on it is chosen for contrast.

Accent members
MemberDescription
Primary

The brand color, for the main action.

Neutral

A quiet, gray action.

Danger

A destructive action, such as Delete.

Of(string css)

Any CSS color, such as "#0d9488". Text on it is black or white, whichever reads better.

Token(string name)

A theme token, such as "brand" for --ib-color-brand; text on it uses --ib-color-on-brand when the theme defines it.

From(Color color)

A Color as an accent, such as Color.Success.

ButtonVariant

enum

A button's visual weight, from strongest to quietest.

ButtonVariant values
ValueDescription
Solid

Filled with the accent color. For the main action.

Soft

A light tint of the accent color.

Outline

An accent-colored border on a transparent background.

Ghost

Transparent until hovered. For toolbars and dense layouts.

Link

Looks like a link.

Connection lost

Rejoining the server…