uniskin.dev GitHub

v1.0 · Tailwind CSS v4 plugin · CSS only · no runtime JS

Write the classes once. Swap the skin in one line.

Uniskin is one semantic ui-* vocabulary — ui-button ui-primary ui-outline ui-sm — that any “skin” can wear. Pick the default look, a shadcn/ui, daisyUI, Bootstrap, Flowbite or Radix Themes look, or write your own adapter. Switching never touches your markup.

$ pnpm add uniskin @uniskin/shadcn

/* app.css */
@import "tailwindcss";
@plugin "uniskin" { adapter: "shadcn"; }

<!-- anywhere: HTML, JSX, Vue, PHP -->
<button class="ui-button ui-primary ui-outline ui-sm">Save</button>

One HTML file, six stylesheets — the control only swaps /adapters/default.css. The markup is identical for every adapter.

01 How it works

01

Write the vocabulary

ui-button, ui-input, ui-card … semantic classes plus modifiers — intents, styles, sizes, states. They compile to compound selectors, so ui-outline on a button and a card can mean different things.

02

Pick an adapter

One @plugin option decides how the vocabulary looks: "default", "shadcn", "daisyui", "bootstrap", "flowbite", "radix", or a path to your own adapter file.

03

Ship plain CSS

Tailwind emits a stylesheet from the classes it finds — the same scan that finds p-4 finds ui-button. No runtime JS; re-skinning is a one-line CSS change.

02 The vocabulary

Components plus four modifier kinds. Everything below renders with the adapter you selected above — these are live examples, not screenshots.

Components

Twenty-six components — ui-button ui-input ui-select ui-checkbox ui-switch ui-card ui-alert ui-modal ui-tabs ui-table ui-accordion ui-tooltip ui-toast ui-menu ui-pagination ui-slider and more — plus part classes like ui-card-header and ui-modal-box.

Intents

ui-primary ui-secondary ui-success ui-warning ui-danger — unset is neutral. Intents set five --ui-c* variables on the element; styles read them.

Styles

ui-outline ui-ghost ui-soft; omitted means solid. Intents and styles combine freely — ui-danger ui-outline needs no special rule.

Sizes

ui-sm and ui-lg; omitted means md. On ui-card the size scales the padding of all its parts.

States

ui-disabled ui-loading ui-active — each is emitted together with its native equivalents (:disabled, [aria-busy], [aria-selected]…), so the accessible attribute is also the styling hook.

03 Components

Every public class in vocabulary v1 — rendered live in the selected skin, with the exact markup from docs/vocabulary.md. This list is generated from that file, so it can’t drift.

Live examples require JavaScript.

04 Adapters

An adapter is a plain object that describes how the vocabulary looks, deep-merged over the built-in default. Anything it omits falls back.

default

Ships inside uniskin — a neutral token-driven skin that covers the whole vocabulary. No extra package.

@plugin "uniskin";

shadcn

The shadcn/ui look — near-black primary, neutral outline and ghost, ring focus — as pure CSS. No React, no Radix required.

@plugin "uniskin" { adapter: "shadcn"; }

daisyui

Maps Uniskin tokens onto daisyUI’s own --color-* variables, so ui-* classes follow the active daisyUI theme — including data-theme="dark" and custom themes.

@plugin "uniskin" { adapter: "daisyui"; }

bootstrap

The Bootstrap 5.3 look, with every colour as var(--bs-*) and Bootstrap’s own value as the fallback, and data-bs-theme="dark" support. Defines the whole vocabulary.

@plugin "uniskin" { adapter: "bootstrap"; }

flowbite

The Flowbite look on Tailwind’s own --color-* theme variables: override one in @theme and the skin follows. Defines the whole vocabulary.

@plugin "uniskin" { adapter: "flowbite"; }

radix

The Radix Themes look on its 12-step colour scales (--blue-9 and friends), with .dark and .dark-theme support. Defines the whole vocabulary.

@plugin "uniskin" { adapter: "radix"; }

Write your own

Override only what you change — often just the tokens. Remap --ui-primary & friends and every component, style and size inherits your palette; hover and soft shades derive with color-mix().

Full adapter guide →

import { defineAdapter } from "uniskin/adapter";

export default defineAdapter({
  name: "acme",
  tokens: { "--ui-primary": "rebeccapurple" },
  components: {
    button: { base: { "border-radius": "999px" } },
  },
});

05 Dark mode & prefix

Dark mode, your way

dark: "media" (default) follows prefers-color-scheme and honors .dark / [data-theme="dark"]; "class" restricts it to the selectors; false emits no dark tokens. The toggle above drives the same class + data-theme pair.

@plugin "uniskin" { dark: "class"; }

Your prefix

Don’t want ui-*? Set prefix and every class, compound selector and keyframe follows — uk-button uk-primary uk-outline.

@plugin "uniskin" { prefix: "uk"; }