using-vela-ui-components

Installation
SKILL.md

Using vela-ui components

Make a kit host first

Components take their theme and base styles from the nearest kit host, and floating parts (menus, popovers, select lists, tooltips, dialogs) mount into it. On a page of your own:

import { createTheme, ensureUIHost } from '@luxalgo/vela-ui/theme';

const app = document.getElementById('app')!;
ensureUIHost(app, createTheme()); // dark by default; the theming-vela-ui skill covers the rest

Next to a Vela chart, the chart's root already is a kit host: mount inside it, or pass a plugin's ctx.host as host. Use ensureUIHost, not applyTheme, to set a host up: applyTheme only themes an element, so a menu opened from it mounts unthemed in <body>.

One shape for every component

Installs
3
Repository
luxalgo/vela
GitHub Stars
1.3K
First Seen
2 days ago