Control | PowerActions
PowerActions#
Description#
- Set of system power actions: suspend, hibernate, reboot, power off, log out, and lock. Presented as a row of icons or as tiles with the label below. The library emits the action; the consumer runs the corresponding command.
Props#
actions(readonly PowerAction[]) — Which actions to show, in order. Default:['suspend', 'reboot', 'poweroff'].variant('icons' | 'tiles') — Visual format. Default:'icons'.buttonVariant('secondary' | 'ghost' | 'overlay') — Button style foricons;overlayfor wallpaper backgrounds. Default:'secondary'.labels(Partial<Record<PowerAction, string») — Translated labels. Missing ones fall back to the catalog or English.label(string) — Group name for screen readers.disabled(boolean) — Disables all actions. Default:false.
Emits#
action(PowerAction) — When the user picks an action.
Usage#
| |
Notes#
PowerActionis'suspend' | 'hibernate' | 'reboot' | 'poweroff' | 'logout' | 'lock'.- Icons use freedesktop names:
system-suspend,system-reboot, etc. - The library executes no action and asks for confirmation; that depends on the screen.