Phials developer documentation
User guide
AI Notice: Most documentation right now was auto-generated by an LLM. Handwritten documentation will be implemented over time on the road to 1.0

ToolbarButtonDropdownDefinition

Toolbar button that opens a dropdown menu

Signature

interface ToolbarButtonDropdownDefinition {
    id: string;
    label: string;
    icon?: string | ((ctx: ToolbarContext) => string);
    dropdownItems: ToolbarDropdownItem[];
    disabled?: (ctx: ToolbarContext) => boolean;
    hidden?: (ctx: ToolbarContext) => boolean;
    fixed?: boolean;
    priority?: number;
}

Members

NameTypeRequiredDescription
idstringyes
labelstringyes
iconstring | (ctx: ToolbarContext) => stringno
dropdownItemsToolbarDropdownItem[]yes
disabled(ctx: ToolbarContext) => booleanno
hidden(ctx: ToolbarContext) => booleanno
fixedbooleannoIf true, cannot be removed in edit mode
prioritynumbernoHigher priority items stay visible longer when collapsing (default 0)