kit
Variable of @v12-engine/client/kit
ts
kit: {
classes: typeof classes;
cn: typeof cn;
render: typeof render;
tooltip: typeof tooltip;
pointAt: typeof pointAt;
button(label: string, run: () => void, options?: {
variant?: 'default' | 'primary' | 'ghost' | 'danger' | 'chosen';
size?: 'sm' | 'md' | 'lg' | 'icon' | 'icon-sm';
tip?: string;
key?: string;
}): HTMLButtonElement;
panel(options?: Parameters<typeof classes.panel>[0]): HTMLDivElement;
searchField(onValue: (value: string) => void, options?: {
placeholder?: string;
size?: 'sm' | 'md';
shortcut?: boolean;
}): HTMLDivElement & {
set(value: string): void;
};
highlight(text: string, found: string | readonly MatchRange[]): HTMLSpanElement;
}The kit for code that builds the page itself: the looks as classes (kit.classes.button({ variant: 'primary' })), tooltips, and putting a kit component into an element. Messages, questions and menus from code are a place's overlays: an app's (StartedApp.overlays), a game's, the editor's