Skip to content

classes ​

Namespace of @v12-engine/client/kit

Members ​

button beta ​

ts
button: import("./cn").Styled<{
    variant: {
        default: string;
        primary: string;
        ghost: string;
        danger: string;
        chosen: string;
    };
    size: {
        sm: string;
        md: string;
        lg: string;
        icon: string;
        'icon-sm': string;
        unsized: string;
    };
}>

A button: default stone, primary for the one thing to do, ghost with no face, danger, and chosen for what is picked

checkBox beta ​

ts
checkBox: import("./cn").Styled<{}>

A box to tick: lit when it is, with a line through it when it is neither

dialogBackdrop beta ​

ts
dialogBackdrop: import("./cn").Styled<{}>

A dialog: what darkens the page behind it, where it is put, and its panel. The backdrop takes every press on it, so that nothing under it does: the HUD's own panels take presses whatever the page says (pointer-events: auto), which a modal dialog's turning the page off would otherwise not reach

dialogContent beta ​

ts
dialogContent: import("./cn").Styled<{
    size: {
        md: string;
        lg: string;
        xl: string;
    };
}>

A dialog's panel: as wide as a form (md), or wide enough for a list with a few columns (lg), the screen's width short of that

dialogPositioner beta ​

ts
dialogPositioner: import("./cn").Styled<{}>

The classes of the box a dialog is centred in, fixed over the whole window

faceButton beta ​

ts
faceButton: import("./cn").Styled<{
    pressed: {
        true: string;
        false: string;
    };
    size: {
        sm: string;
        md: string;
        square: string;
        'square-sm': string;
        unsized: string;
    };
}>

A small plate to press, set in the skin's metal as the HUD has them (.vg-plate): the top bar's buttons, the minimap's, the tray's (Button's variant: 'face'). pressed lit (aria-pressed), size: sm, md, square, square-sm, or unsized for one laid out by itself

field beta ​

ts
field: import("./cn").Styled<{
    size: {
        sm: string;
        md: string;
    };
    invalid: {
        true: string;
        false: string;
    };
    wide: {
        true: string;
        false: string;
    };
}>

Text fields, numbers and lists to pick from

floating beta ​

ts
floating: import("./cn").Styled<{
    kind: {
        tooltip: string;
        menu: string;
        popover: string;
    };
}>

What floats over the page: a tooltip, a menu, a popover

kbd beta ​

ts
kbd: import("./cn").Styled<{
    tone: {
        default: string;
        accent: string;
    };
}>

A key on the keyboard, as a hint: Q, Ctrl

loading beta ​

ts
loading: import("./cn").Styled<{}>

The whole page, for what is shown while a game or the editor loads, or what stopped it

ts
menuEntry = "grid gap-0.5 rounded-panel border border-border bg-panel-deep px-5 py-2.5 text-start text-foreground transition-colors select-none hover:border-accent disabled:pointer-events-none disabled:opacity-40"

A line of a menu screen to press: its name, and what it does under it

ts
menuItem: import("./cn").Styled<{
    tone: {
        default: string;
        danger: string;
    };
}>

A line of a menu: lit while the pointer or the keyboard is on it (Ark's data-highlighted)

ts
menuTitle = "font-display text-[44px] leading-[normal] font-bold text-accent"

The title of a menu screen: the game's name over its buttons

meterFill beta ​

ts
meterFill: import("./cn").Styled<{
    kind: {
        health: string;
        'health-mid': string;
        'health-low': string;
        mana: string;
        xp: string;
        progress: string;
        accent: string;
        danger: string;
    };
}>

...and what fills it, coloured by what it measures

meterTrack beta ​

ts
meterTrack: import("./cn").Styled<{
    size: {
        xs: string;
        sm: string;
        md: string;
        lg: string;
    };
}>

A bar that fills: its track...

motion beta ​

ts
motion: {
    readonly presence: 'vg-presence';
    readonly slide: 'vg-slide';
    readonly stagger: 'vg-stagger';
    readonly leaves: 'vg-leaves';
}

The classes of motion (UX1), for a screen of a game's own as for the kit's (Presence, Stagger, ScreenTransition), each as long as the theme's --vg-motion says: presence comes in and goes by Ark's data-state (open, closed), faded from a little below; slide the same, sliding; stagger has what is in it come in one after another (--vg-stagger apart, 45ms when left out); leaves slides off as the scene it is in goes

option beta ​

ts
option: import("./cn").Styled<{}>

A line of a list to pick from: lit under the pointer or the keyboard, marked when it is the one picked

page beta ​

ts
page: import("./cn").Styled<{}>

The page a game or the editor draws in: what holds its two canvases, the 3D view (pageView) and the one for bars and boxes over it (pageOverlay)

pageOverlay beta ​

ts
pageOverlay: import("./cn").Styled<{}>

The classes of the page's overlay canvas, which fills the page and lets the pointer through, cropped as the view is

pageView beta ​

ts
pageView: import("./cn").Styled<{}>

The classes of the page's 3D view canvas, which fills the page and takes the pointer. Its picture is cropped to the page while the two differ in size (a panel sliding, before the editor follows the new size: resizeSoon), not stretched

panel beta ​

ts
panel: import("./cn").Styled<{
    tone: {
        default: string;
        raised: string;
        flat: string;
    };
    selected: {
        true: string;
        false: string;
    };
    padding: {
        none: string;
        sm: string;
        md: string;
        lg: string;
    };
}>

A panel of the HUD or a menu: stone with an edge, raised lighter, flat with no shadow; selected with the selection's edge

scrollArea beta ​

ts
scrollArea: import("./cn").Styled<{}>

A list that can grow long, with thin scroll bars

sliderControl beta ​

ts
sliderControl: import("./cn").Styled<{}>

A slider: what it slides in, its track, what is filled of it, and what is dragged

sliderRange beta ​

ts
sliderRange: import("./cn").Styled<{}>

The classes of the filled part of a slider's track

sliderThumb beta ​

ts
sliderThumb: import("./cn").Styled<{}>

The classes of a slider's thumb, the knob that is dragged

sliderTrack beta ​

ts
sliderTrack: import("./cn").Styled<{}>

The classes of a slider's track, the rail the thumb slides on

splitBar beta ​

ts
splitBar: import("./cn").Styled<{}>

The bar between two panes, dragged to share the room between them

stepper beta ​

ts
stepper: import("./cn").Styled<{}>

A number to type: the two small buttons that step it

tab beta ​

ts
tab: import("./cn").Styled<{
    selected: {
        true: string;
        false: string;
    };
}>

The classes of one tab, by whether it is selected (selected, false when left out)

tabList beta ​

ts
tabList: import("./cn").Styled<{}>

The row of tabs, and each tab

text beta ​

ts
text: import("./cn").Styled<{
    kind: {
        title: string;
        heading: string;
        label: string;
        note: string;
        body: string;
    };
}>

Words: a title of a page, a heading of a section, a label of a field, a note that explains

toast beta ​

ts
toast: import("./cn").Styled<{
    tone: {
        default: string;
        success: string;
        danger: string;
    };
}>

A message that comes and goes. Where it is among the others, and how far in or out, are Ark's to say, in variables (--x, --y, --scale, --opacity, --height, --z-index): the classes at the end put them to use

toastMotion beta ​

ts
toastMotion: import("./cn").Styled<{}>

Where a toast is among the others, and how far in or out, with no look: for a toast of a game's own

toggleThumb beta ​

ts
toggleThumb: import("./cn").Styled<{
    on: {
        true: string;
        false: string;
    };
}>

Its knob: light on the lit track, dim on the dark one, with a shadow that keeps it apart from either

toggleTrack beta ​

ts
toggleTrack: import("./cn").Styled<{
    on: {
        true: string;
        false: string;
    };
}>

A switch: its track, lit when on

treeNode beta ​

ts
treeNode: import("./cn").Styled<{}>

A line of a tree: indented by how deep it is (Ark's --depth), lit under the keyboard, marked when picked