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

ToolbarDropdownItem

Item in a toolbar dropdown menu

Signature

interface ToolbarDropdownItem {
    id: string;
    label: string;
    icon?: string;
    shortcut?: ItemShortcutConfig;
    action: (ctx: ToolbarContext) => void | Promise<void>;
    disabled?: (ctx: ToolbarContext) => boolean;
    danger?: boolean;
}

Members

NameTypeRequiredDescription
idstringyes
labelstringyes
iconstringno
shortcutItemShortcutConfigno
action(ctx: ToolbarContext) => void | Promise<void>yes
disabled(ctx: ToolbarContext) => booleanno
dangerbooleanno