View Source ToolbarItem
<ToolbarItem>
Toolbar element for placing items.
Overview
Optionally specify a placement
to reposition the element.
<ToolbarItem placement="destructiveAction">
<Button phx-click="delete">Delete</Button>
</ToolbarItem>
Customizable Items
A customizable toolbar is a toolbar modifier with an id
.
toolbar(id: "unique-toolbar-id", content: :my_toolbar_content)
Set the id
attribute to a unique value on each customizable item.
<ToolbarItem id="delete">
...
</ToolbarItem>
To prevent customization of an item in a customizable toolbar, set the customizationBehavior
attribute to disabled
.
<ToolbarItem id="delete" customizationBehavior="disabled">
...
</ToolbarItem>
The default visibility and options can be configured with the defaultVisibility
and alwaysAvailable
attributes.
<ToolbarItem id="delete" defaultVisibility="hidden" alwaysAvailable>
...
</ToolbarItem>
Attributes
References
Link to this reference
placement
The position of this item in the toolbar.