Skip to content
IzzyBlazor 0.1.0-alpha.17

Enter all results ↑ ↓ move Esc close

Toolbar

Since 0.1.0-alpha.13
One row of controls; what doesn't fit moves into a … menu.

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

Properties (10)

Labelstring?Added in 0.1.0-alpha.13

What the toolbar is for, for screen readers: "Formatting", "Editor". Optional, as in ARIA; set it when the page has more than one toolbar, so they can be told apart.

AccentAccent = Accent.NeutralAdded in 0.1.0-alpha.13

The buttons' accent, unless a button sets its own. Defaults to Neutral.

VariantButtonVariant = ButtonVariant.GhostAdded in 0.1.0-alpha.13

The buttons' variant, unless a button sets its own. Defaults to ButtonVariant.Ghost.

SizeControlSize = ControlSize.SmAdded in 0.1.0-alpha.13

The buttons' size, unless a button sets its own, and the "…" button's. Defaults to ControlSize.Sm.

Gapint = 2Added in 0.1.0-alpha.13

The space between items, in spacing steps (one step = 4px). Defaults to 2.

Wrapbool = falseAdded in 0.1.0-alpha.13

Wraps onto more rows instead of moving items into a "…" menu, for toolbars where everything must show.

CollapseLabelsbool = falseAdded in 0.1.0-alpha.14

Before anything moves into the "…" menu, buttons and menus with a StartIcon drop their text, all at once, and show only the icon (a menu keeps its chevron). The text stays for screen readers and, with script, is the tooltip. Items move into the menu only once that isn't enough. One with ToolbarOverflow.Never, such as the main action, keeps its text.

MoreLabelstring? = "More actions"Added in 0.1.0-alpha.13

The "…" button's name for screen readers and its tooltip. Defaults to "More actions".

Noncestring? (computed)Added in 0.1.0-alpha.13

A CSP nonce for the style element that holds the toolbar's widths. Defaults to the IzzyTheme's Nonce on the page; set it on interactive pages, which don't see the theme's.

Item props (from LayoutItemBase)

MarginResponsive<int>Responsive

Margin on all sides, in spacing steps (-16 to 16; one step = 4px).

MarginXResponsive<int>Responsive

Horizontal margin. When set, replaces Margin on this axis.

MarginYResponsive<int>Responsive

Vertical margin. When set, replaces Margin on this axis.

MarginTopResponsive<int>Responsive

Top margin. When set, replaces MarginY and Margin on this side.

MarginBottomResponsive<int>Responsive

Bottom margin. When set, replaces MarginY and Margin on this side.

MarginStartResponsive<int>Responsive

Margin at the start (left in left-to-right text, right in right-to-left). Replaces MarginX and Margin on this side.

MarginEndResponsive<int>Responsive

Margin at the end (right in left-to-right text, left in right-to-left). Replaces MarginX and Margin on this side.

WidthResponsive<Length>Responsive

Width.

MinWidthResponsive<Length>Responsive

Minimum width.

MaxWidthResponsive<Length>Responsive

Maximum width.

Growbool = false

Whether to grow into free space inside a Stack, Row or Column: <Box Grow>.

Shrinkbool = true

Whether to shrink when space is short inside a Stack, Row or Column. Defaults to true; Shrink="false" keeps the size.

BasisResponsive<Length>Responsive

Starting size inside a Stack, before growing or shrinking.

AlignSelfResponsive<Align>Responsive

Alignment across the parent's direction, overriding the parent's Align for this component only, such as a button lined up with the bottom of labeled fields in a Row.

ColSpanResponsive<int>Responsive

How many columns it spans in a Form or Fieldset with Columns, or a Grid; GridSpan.Full for the whole row. Never more than the columns shown, so a form that narrows to one column needs no breakpoints.

NewRowbool = false

Starts a new row in a Form or Fieldset with Columns, or a Grid, leaving the rest of the row before it empty.

Common props (from IzzyComponentBase)

Classstring?

Extra CSS classes, merged after the component's own classes.

Stylestring?

Inline style, appended after the component's generated custom properties.

HiddenFromBreakpoint?

Hides the component from this breakpoint up, such as a menu button only phones need.

VisibleFromBreakpoint?

Shows the component only from this breakpoint up, such as header links for wide screens.

Events (0)

No events.

Parts (7)

Components written inside Toolbar, documented here with it.

ToolbarButton

A Button in a Toolbar or a ToolbarButtonGroup. In the "…" menu it's a menu item with the same link, form post and OnClick; a toggle (Pressed) is a checkbox item there.

PositionToolbarPosition = ToolbarPosition.StartAdded in 0.1.0-alpha.13

Where it sits. Defaults to ToolbarPosition.Start. Not in a group: set it on the group.

Priorityint = 0Added in 0.1.0-alpha.13

Which items stay longest when there's no room: higher stays longer. Defaults to 0. Items with the same priority move into the menu from the middle of the toolbar outward.

OverflowToolbarOverflow = ToolbarOverflow.AutoAdded in 0.1.0-alpha.13

When it moves into the "…" menu: ToolbarOverflow.Never for the main action, ToolbarOverflow.Always for what only the menu needs. Defaults to ToolbarOverflow.Auto.

Hrefstring?Added in 0.1.0-alpha.13From Button

Makes it a link to this URL (an a) instead of a button. A link can't take Submit, Reset, Name, Value, FormAction or Form.

Externalbool = falseAdded in 0.1.0-alpha.13From Button

For a link: opens in a new tab with rel="noopener noreferrer" and shows an external-link icon.

HideExternalIconbool = falseAdded in 0.1.0-alpha.13From Button

Leaves out an external link's icon, for repeated links where it would be noise. Screen readers still hear NewTabLabel.

NewTabLabelstring? = "(opens in a new tab)"Added in 0.1.0-alpha.13From Button

Read to screen readers after an external link's text. Defaults to "(opens in a new tab)".

Submitbool = falseAdded in 0.1.0-alpha.13From Button

Submits the form it's in (or Form), like type="submit". Without Submit or Reset, a button does nothing by itself.

Resetbool = falseAdded in 0.1.0-alpha.13From Button

Resets the form it's in, like type="reset". Can't be combined with Submit.

Namestring?Added in 0.1.0-alpha.13From Button

Posted with the form as Name=Value when this button submits it, so one handler can tell which of several submit buttons was pressed. Not action, method or target: a control with one of those names hides the form's own property, and Blazor's enhanced form handling then posts to the wrong address.

Valuestring?Added in 0.1.0-alpha.13From Button

The value posted with Name.

FormActionstring?Added in 0.1.0-alpha.13From Button

Submits to this URL instead of the form's own action (native formaction).

Formstring?Added in 0.1.0-alpha.13From Button

The id of a form elsewhere on the page that this button submits (native form).

AccentAccent = Accent.PrimaryAdded in 0.1.0-alpha.13

Primary (the default) for the main action, Neutral for everything else, Danger for destructive actions, or a custom color (Accent.Of("#0d9488"), Accent.Token("brand")); text on a custom color is chosen for contrast. Emphasis comes from Variant.

VariantButtonVariant = ButtonVariant.SolidAdded in 0.1.0-alpha.13

Visual weight. Defaults to ButtonVariant.Solid.

SizeControlSize = ControlSize.MdAdded in 0.1.0-alpha.13

Height. Defaults to ControlSize.Md.

StartIconIconData?Added in 0.1.0-alpha.13

An icon before the text.

EndIconIconData?Added in 0.1.0-alpha.13

An icon after the text.

FullWidthbool = falseAdded in 0.1.0-alpha.13

Stretches to the full width of its container.

Loadingbool = falseAdded in 0.1.0-alpha.13

Shows a spinner in place of the start icon and blocks further clicks.

LoadingLabelstring? = "Loading"Added in 0.1.0-alpha.13

Read to screen readers while Loading. Defaults to "Loading".

Disabledbool = falseAdded in 0.1.0-alpha.13

Disables the button.

@bind-Pressedbool?Added in 0.1.0-alpha.14 @bind: Interactive only

Makes it a toggle button, such as Bold in an editor: true shows it pressed, false not, and screen readers hear which (aria-pressed). With @bind-Pressed a click turns it on and off on interactive pages; on static pages the server decides, as with a submit button's Name and Value. Null (the default) is an ordinary button. Not for links.

ChildContentRenderFragment?Added in 0.1.0-alpha.13

The label.

OnClickEventCallback<MouseEventArgs>Added in 0.1.0-alpha.13From ButtonInteractive only

Runs on click on interactive pages (a link still navigates). Has no effect on static pages.

ToolbarIconButton

An IconButton in a Toolbar or a ToolbarButtonGroup. In the "…" menu it's a menu item with its icon, its Label as text, and the same link, form post and OnClick; a toggle (Pressed) is a checkbox item there.

PositionToolbarPosition = ToolbarPosition.StartAdded in 0.1.0-alpha.13

Where it sits. Defaults to ToolbarPosition.Start. Not in a group: set it on the group.

Priorityint = 0Added in 0.1.0-alpha.13

Which items stay longest when there's no room: higher stays longer. Defaults to 0. Items with the same priority move into the menu from the middle of the toolbar outward.

OverflowToolbarOverflow = ToolbarOverflow.AutoAdded in 0.1.0-alpha.13

When it moves into the "…" menu: ToolbarOverflow.Never for the main action, ToolbarOverflow.Always for what only the menu needs. Defaults to ToolbarOverflow.Auto.

IconIconData requiredAdded in 0.1.0-alpha.13From IconButton

The icon.

Labelstring requiredAdded in 0.1.0-alpha.13From IconButton

What the button does, for screen readers and the tooltip.

Hrefstring?Added in 0.1.0-alpha.13From IconButton

Renders a link to this URL instead of a button.

Submitbool = falseAdded in 0.1.0-alpha.13From IconButton

Submits the form it's in (or Form), when it's a button (not a link), like type="submit".

Resetbool = falseAdded in 0.1.0-alpha.13From IconButton

Resets the form it's in, when it's a button, like type="reset". Can't be combined with Submit.

Namestring?Added in 0.1.0-alpha.13From IconButton

Posted with the form as Name=Value when this button submits it, so one handler can tell which button was pressed, such as which row's Delete. Not action, method or target: a control with one of those names hides the form's own property, and Blazor's enhanced form handling then posts to the wrong address.

Valuestring?Added in 0.1.0-alpha.13From IconButton

The value posted with Name.

FormActionstring?Added in 0.1.0-alpha.13From IconButton

Submits to this URL instead of the form's own action (native formaction).

Formstring?Added in 0.1.0-alpha.13From IconButton

The id of a form elsewhere on the page that this button submits (native form).

AccentAccent = Accent.PrimaryAdded in 0.1.0-alpha.13

Primary (the default) for the main action, Neutral for everything else, Danger for destructive actions, or a custom color (Accent.Of("#0d9488"), Accent.Token("brand")); text on a custom color is chosen for contrast. Emphasis comes from Variant.

VariantButtonVariant = ButtonVariant.SolidAdded in 0.1.0-alpha.13

Visual weight. Defaults to ButtonVariant.Solid.

SizeControlSize = ControlSize.MdAdded in 0.1.0-alpha.13

Height. Defaults to ControlSize.Md.

StartIconIconData?Added in 0.1.0-alpha.13

An icon before the text.

EndIconIconData?Added in 0.1.0-alpha.13

An icon after the text.

FullWidthbool = falseAdded in 0.1.0-alpha.13

Stretches to the full width of its container.

Loadingbool = falseAdded in 0.1.0-alpha.13

Shows a spinner in place of the start icon and blocks further clicks.

LoadingLabelstring? = "Loading"Added in 0.1.0-alpha.13

Read to screen readers while Loading. Defaults to "Loading".

Disabledbool = falseAdded in 0.1.0-alpha.13

Disables the button.

@bind-Pressedbool?Added in 0.1.0-alpha.14 @bind: Interactive only

Makes it a toggle button, such as Bold in an editor: true shows it pressed, false not, and screen readers hear which (aria-pressed). With @bind-Pressed a click turns it on and off on interactive pages; on static pages the server decides, as with a submit button's Name and Value. Null (the default) is an ordinary button. Not for links.

ChildContentRenderFragment?Added in 0.1.0-alpha.13

The label.

OnClickEventCallback<MouseEventArgs>Added in 0.1.0-alpha.13From IconButtonInteractive only

Runs on click on interactive pages (a link still navigates).

ToolbarButtonGroup

A ButtonGroup in a Toolbar, holding ToolbarButtons and ToolbarIconButtons. It moves into the "…" menu as one, as a group named by its Label.

PositionToolbarPosition = ToolbarPosition.StartAdded in 0.1.0-alpha.13

Where it sits. Defaults to ToolbarPosition.Start.

Priorityint = 0Added in 0.1.0-alpha.13

Which items stay longest when there's no room: higher stays longer. Defaults to 0. Items with the same priority move into the menu from the middle of the toolbar outward.

OverflowToolbarOverflow = ToolbarOverflow.AutoAdded in 0.1.0-alpha.13

When it moves into the "…" menu: ToolbarOverflow.Never for the main action, ToolbarOverflow.Always for what only the menu needs. Defaults to ToolbarOverflow.Auto.

Labelstring?Added in 0.1.0-alpha.13From ButtonGroup

What the buttons have in common, for screen readers: "Text alignment".

AccentAccent?Added in 0.1.0-alpha.13From ButtonGroup

The buttons' accent, unless a button sets its own.

VariantButtonVariant?Added in 0.1.0-alpha.13From ButtonGroup

The buttons' variant, unless a button sets its own.

SizeControlSize?Added in 0.1.0-alpha.13From ButtonGroup

The buttons' size, unless a button sets its own.

Attachedbool = trueAdded in 0.1.0-alpha.13From ButtonGroup

Joins the buttons into one control with shared borders (the default). False spaces them apart.

OrientationOrientation = Orientation.HorizontalAdded in 0.1.0-alpha.13From ButtonGroup

Lays the buttons out in a row (the default) or a column.

FullWidthbool = falseAdded in 0.1.0-alpha.13From ButtonGroup

Stretches the group to its container's width, sharing it among the buttons.

ChildContentRenderFragment?Added in 0.1.0-alpha.13From ButtonGroup

The buttons.

ToolbarMenu

A Menu in a Toolbar. In the "…" menu it's a submenu with the same items, named by its Label (a menu with a custom Trigger and no Label stays in the bar).

PositionToolbarPosition = ToolbarPosition.StartAdded in 0.1.0-alpha.13

Where it sits. Defaults to ToolbarPosition.Start.

Priorityint = 0Added in 0.1.0-alpha.13

Which items stay longest when there's no room: higher stays longer. Defaults to 0. Items with the same priority move into the menu from the middle of the toolbar outward.

OverflowToolbarOverflow = ToolbarOverflow.AutoAdded in 0.1.0-alpha.13

When it moves into the "…" menu: ToolbarOverflow.Never for the main action, ToolbarOverflow.Always for what only the menu needs. Defaults to ToolbarOverflow.Auto.

Labelstring?Added in 0.1.0-alpha.13From Menu

The default trigger's text.

AccentAccent = Accent.NeutralAdded in 0.1.0-alpha.13From Menu

The default trigger's color. Defaults to Neutral.

VariantButtonVariant = ButtonVariant.OutlineAdded in 0.1.0-alpha.13From Menu

The default trigger's weight. Defaults to ButtonVariant.Outline.

SizeControlSize = ControlSize.MdAdded in 0.1.0-alpha.13From Menu

The default trigger's size.

StartIconIconData?Added in 0.1.0-alpha.13From Menu

An icon before the default trigger's text.

TriggerRenderFragment<IReadOnlyDictionary<string, object>>?Added in 0.1.0-alpha.13From Menu

A custom trigger in place of the default button. Its context holds the attributes that wire it to the menu; pass them on with @attributes="context". It must be a button.

PlacementPlacement = Placement.BottomStartAdded in 0.1.0-alpha.13From Menu

Where the menu opens. Defaults to Placement.BottomStart.

PanelWidthLength? (computed)Added in 0.1.0-alpha.13From Menu

The width of the menu panel, such as Length.Rem(16) for a column of long labels. Defaults to the content's width, at least 10rem and the trigger's width, up to 24rem. Never wider than the screen.

ChildContentRenderFragment?Added in 0.1.0-alpha.13From Menu
@bind-Openbool = falseAdded in 0.1.0-alpha.13 @bind: Interactive only

Whether it is open. Use @bind-Open to follow changes on interactive pages.

Idstring?Added in 0.1.0-alpha.13

The element id. Generated when not set.

ToolbarText

Text in a Toolbar, such as "3 selected" or a document's name. It stays in the bar, sized from its text; give it a Width to cut long text short with "…".

PositionToolbarPosition = ToolbarPosition.StartAdded in 0.1.0-alpha.13

Where it sits. Defaults to ToolbarPosition.Start.

ChildContentRenderFragment?Added in 0.1.0-alpha.13

The text.

ToolbarItem

Anything that isn't a toolbar control, in a Toolbar: a search field, a SegmentedControl, a Tooltip around a button. Give it a Width, so the widths without script allow for it, and MenuContent for what stands in for it in the "…" menu; without that, it stays in the bar.

PositionToolbarPosition = ToolbarPosition.StartAdded in 0.1.0-alpha.13

Where it sits. Defaults to ToolbarPosition.Start.

Priorityint = 0Added in 0.1.0-alpha.13

Which items stay longest when there's no room: higher stays longer. Defaults to 0. Items with the same priority move into the menu from the middle of the toolbar outward.

OverflowToolbarOverflow = ToolbarOverflow.AutoAdded in 0.1.0-alpha.13

When it moves into the "…" menu: ToolbarOverflow.Never for the main action, ToolbarOverflow.Always for what only the menu needs. Defaults to ToolbarOverflow.Auto.

MenuContentRenderFragment?Added in 0.1.0-alpha.13

What stands in for it in the "…" menu, such as MenuItems. Without it, the item stays in the bar.

ChildContentRenderFragment?Added in 0.1.0-alpha.13

The content. Buttons in it are plain Buttons, not toolbar buttons.

ToolbarSeparator

A vertical line between groups of a Toolbar's items; in its "…" menu, a divider.

PositionToolbarPosition = ToolbarPosition.StartAdded in 0.1.0-alpha.13

Where it sits. Defaults to ToolbarPosition.Start.

Types (8)

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.

ControlSize

enum

The height of interactive controls. Shared by buttons and form fields, so a button and an input of the same size line up in a row.

ControlSize values
ValueDescription
Sm

32px tall, small text.

Md

36px tall (the default).

Lg

44px tall, large text. For touch-first and marketing pages.

Length

struct

A width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.

Length members
MemberDescription
Sm

640px (matches the sm breakpoint).

Md

768px (matches the md breakpoint).

Lg

1024px (matches the lg breakpoint).

Xl

1280px (matches the xl breakpoint).

Prose

A comfortable reading width, 68 characters.

Full

100% of the containing block.

Auto

auto.

FitContent

fit-content: as wide as the content, up to the available space.

MinContent

min-content.

MaxContent

max-content.

Px(double value)

Pixels.

Rem(double value)

Root ems (16px each by default).

Percent(double value)

Percent of the containing block.

Ch(double value)

Character widths, for text measures.

Vw(double value)

Percent of the viewport width.

Dvh(double value)

Percent of the dynamic viewport height (accounts for mobile browser bars).

Of(string css)

Any CSS length, such as calc(100% - 2rem). Checked for unsafe characters.

Css string

The CSS value this length renders as.

Orientation

enum

Whether items run across or down.

Orientation values
ValueDescription
Vertical

Top to bottom.

Horizontal

Side by side, wrapping when space runs out.

Placement

enum

Where a floating element sits next to the thing that opened it. Start and End follow the reading direction, so they flip in right-to-left languages.

Placement values
ValueDescription
BottomStart

Below, lined up with the start edge (the default for menus).

Bottom

Below, centered.

BottomEnd

Below, lined up with the end edge.

TopStart

Above, lined up with the start edge.

Top

Above, centered (the default for tooltips).

TopEnd

Above, lined up with the end edge.

Start

Beside, on the start side (the left in left-to-right languages).

End

Beside, on the end side (the right in left-to-right languages).

ToolbarOverflow

enum

When an item of a Toolbar moves into its "…" menu.

ToolbarOverflow values
ValueDescription
Auto

When there's no room for it, in order of Priority (the default).

Never

Never: it stays in the bar, such as the main action.

Always

Always: it's only in the menu, such as Print or Version history.

ToolbarPosition

enum

Where an item of a Toolbar sits.

ToolbarPosition values
ValueDescription
Start

At the start (the left in left-to-right text), the default.

Center

In the middle, kept centered between the start and the end.

End

At the end, before the "…" menu.