@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / UiStyle
Type Alias: UiStyle ​
ts
type UiStyle = {
fill?: UiPaint;
border?: {
width: number;
paint: UiPaint;
};
radius?: number | [number, number, number, number];
corners?: "round" | "cut";
pattern?: UiPattern;
shadows?: UiShadow[];
edge?: {
width: number;
color: string;
};
opacity?: number;
text?: UiTextStyle;
hover?: UiStateStyle;
pressed?: UiStateStyle;
selected?: UiStateStyle;
disabled?: UiStateStyle;
motion?: UiMotion;
};Defined in: ui/uiStyle.ts:81
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
fill? | UiPaint | - | ui/uiStyle.ts:82 |
border? | { width: number; paint: UiPaint; } | - | ui/uiStyle.ts:83 |
border.width | number | - | ui/uiStyle.ts:83 |
border.paint | UiPaint | - | ui/uiStyle.ts:83 |
radius? | number | [number, number, number, number] | One radius, or top-left, top-right, bottom-right, bottom-left. A radius past half the short side is clamped there, so 1 always gives a pill. | ui/uiStyle.ts:88 |
corners? | "round" | "cut" | cut bevels the corners by the radius instead of rounding them. | ui/uiStyle.ts:90 |
pattern? | UiPattern | - | ui/uiStyle.ts:91 |
shadows? | UiShadow[] | - | ui/uiStyle.ts:92 |
edge? | { width: number; color: string; } | A thin highlight along the top inner edge. | ui/uiStyle.ts:94 |
edge.width | number | - | ui/uiStyle.ts:94 |
edge.color | string | - | ui/uiStyle.ts:94 |
opacity? | number | 0–1. Multiplies down the widget tree, so fading a panel fades its menu. | ui/uiStyle.ts:96 |
text? | UiTextStyle | - | ui/uiStyle.ts:97 |
hover? | UiStateStyle | Drawn over the widget while a pointer is on it (buttons). | ui/uiStyle.ts:99 |
pressed? | UiStateStyle | Drawn while it's held down (buttons). | ui/uiStyle.ts:101 |
selected? | UiStateStyle | A button with selected on: the current tab, the chosen card. | ui/uiStyle.ts:103 |
disabled? | UiStateStyle | A button with disabled on. It takes no hover or press. | ui/uiStyle.ts:105 |
motion? | UiMotion | - | ui/uiStyle.ts:106 |

