CommandBar
Description
A toolbar for housing commands
Command Bars provide a surface for common actions related to a specific context, such as a page or a selected item in a list.
They typically contain buttons with icons and labels, and can be split into 'near' items (left-aligned) and 'far' items (right-aligned).
API reference
public sealed class CommandBar : ComponentBase<CommandBar, HTMLElement>A horizontal bar of commands (buttons, dropdowns) typically anchored to the top of an application surface.
Constructors
Methods
public CommandBar AddItem(IComponent item)Adds the given item to the component.
public CommandBar AddItems(params IComponent[] items)Adds the given items to the component.
public CommandBar AddFarItem(IComponent item)Adds the given far item to the component.
public CommandBar AddFarItems(params IComponent[] items)Adds the given far items to the component.
public CommandBar Items(params IComponent[] items)Adds the given items to the component.
public CommandBar FarItems(params IComponent[] items)Configures the far items on the component.
public sealed class CommandBarItem : ComponentBase<CommandBarItem, HTMLButtonElement>Constructors
Properties
public string Text { get ; set ; }Gets or sets the text shown in the component.
public string Icon { get ; set ; }Gets or sets the icon shown by the component.
Methods
public CommandBarItem SetText(string text)Sets the text of the component.
public CommandBarItem SetIcon(UIcons icon)Sets the icon of the component.
public CommandBarItem Disabled(bool value = true)Disables the component.
public CommandBarItem Primary(bool value = true)Styles the component using the primary tone.
public CommandBarItem OnClick(Action action)Registers a callback invoked when the click event fires.