Installation
Add the package, load the tokens, and register the elements.
Install
lit is a peer dependency, so your app shares one copy with the components.
Register the elements
Import the design tokens once, then define every element. Registration is a side effect, so it belongs in your app’s entry module.
Then use the elements in your markup:
Entry points
@tweakpad/ui@tweakpad/ui/register@tweakpad/ui/widgets@tweakpad/ui/register/widgets@tweakpad/ui/emoji@tweakpad/ui/text-editor@tweakpad/ui/icons/<name>@tweakpad/ui/styles.cssWidgets are opt-in: neither @tweakpad/ui nor @tweakpad/ui/register includes them. The text editor also needs an editing engine, Tiptap or Lexical, that your app installs; the library depends on neither.
Frameworks
The elements work in any framework that renders custom elements. For React and Vue the package also ships components that wrap them, typed from each element, and for Preact, Solid, Svelte and Vue templates, types for the elements’ own tags.
@tweakpad/ui/react, @tweakpad/ui/widgets/react@tweakpad/ui/vue, @tweakpad/ui/widgets/vuev-model, one per element@tweakpad/ui/react/jsx<tp-…> tags in React@tweakpad/ui/vue/elements<tp-…> tags in Vue templates@tweakpad/ui/preact, /solid, /svelte (and /widgets/…)<tp-…> tags in those frameworksA component defines its element when it first renders, and importing one bundles only that element. Frameworks covers events, controlled values, slots and server rendering in each framework.
Browser support
Current versions of Chrome, Edge, Firefox and Safari.