Get Started

Installation

Learn how to install and configure @xingxingmofashu/ui in a React application.

Requires React 19, React DOM 19, Tailwind CSS 4, and Node.js 22+.

Setup

Add to a React project

Install the package

pnpm add @xingxingmofashu/ui

Add the package styles

@import "tailwindcss";
@import "@xingxingmofashu/ui";

The package root resolves to dist/index.css through its style export. The stylesheet includes its own Tailwind source scan, so no extra @source directive is needed.

Import a component

import { Button } from "@xingxingmofashu/ui";

export function Example() {
  return <Button label="Continue" />;
}

Tip

Deep imports are available for a single component or theme recipe:

import { Button } from "@xingxingmofashu/ui/components/button";
import buttonTheme from "@xingxingmofashu/ui/theme/button";

Requirements

  • Node.js 22 or newer.
  • React and React DOM 19.
  • Tailwind CSS 4.
  • An ESM-capable bundler. The package publishes ES modules only.
  • A current evergreen browser with backdrop-filter, color-mix, container units, and :has.

Card is server-safe and can render from a React Server Component. The interactive components are client components.

Theming

Light and dark tokens are selected by .light / .dark, or by data-theme="light" / data-theme="dark":

<html class="dark">

or:

<html data-theme="dark">

A nested .light / [data-theme="light"] subtree can switch back to light tokens. Shared colors and glass parameters live in the --ui-* tokens; override them in your own theme layer. Tailwind aliases use the ui- prefix (text-ui-ink, outline-ui-glass-focus, and so on) to avoid colliding with host tokens.

Troubleshooting

Next steps