Action buttons & icons
Choose supported icons and presets for confirmed content actions.
Public exports
Import from @scape-wtf/sdk.
ACTION_BUTTON_PRESETS, ACTION_ICONS, ActionButton, ActionButtonPreset, ActionIcon, actionButtonIcon.
Type declarations
Import the public exports listed above from the package entry point.
ts
/** Approved host-rendered icon IDs. Artwork stays in Scape, never in the SDK. */
export declare const ACTION_ICONS: readonly ["check", "refresh", "media-play-filled", "media-pause-filled", "lock", "trash", "plus", "xmark", "gear", "clone-2", "download", "import", "paper-plane-2", "external-link", "volume", "ban", "broom", "star"];
export type ActionIcon = (typeof ACTION_ICONS)[number];
/** Presets choose an icon; authors still supply meaningful labels and actions. */
export declare const ACTION_BUTTON_PRESETS: Readonly<{
readonly save: "check";
readonly reset: "refresh";
readonly start: "media-play-filled";
readonly pause: "media-pause-filled";
readonly close: "lock";
readonly delete: "trash";
readonly add: "plus";
readonly cancel: "xmark";
}>;
export type ActionButtonPreset = keyof typeof ACTION_BUTTON_PRESETS;
/** Icon first, then the same icon and confirmation text. No custom artwork. */
export type ActionButton = {
preset: ActionButtonPreset;
icon?: never;
} | {
icon: ActionIcon;
preset?: never;
};
export declare function actionButtonIcon(button: ActionButton): ActionIcon;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Usage and limits
See Gizmo guides, working examples, and limits for lifecycle, validation and Scape behavior.
