Skip to content
项目

关于

Accessible UI components for React, Solid, Svelte and Vue. Built on Ark UI, styled with CSS Modules or Tailwind, installable from npm or via the shadcn CLI

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+5
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

moduix banner

npm License: MIT npm downloads CI

moduix

Accessible UI components for React, Solid, Vue, and Svelte. 80+ components and ready-made blocks built on Ark UI, with the same API in every framework. Style them with CSS Modules or Tailwind CSS v4, and install from npm or copy the source into your app with the shadcn CLI.

Documentation · Quick start · Components · Blocks · Packages

Projects dashboard built with moduix for Solid: a dialog form adds a row, the counters update, and a toast confirms it

Current packages

Runtime CSS Modules Tailwind
React @moduix/react @moduix/react-tailwind
Solid @moduix/solid @moduix/solid-tailwind
Vue @moduix/vue @moduix/vue-tailwind
Svelte @moduix/svelte @moduix/svelte-tailwind

Why moduix

  • Ark-backed behavior. Dialogs, menus, inputs, and other complex interactions keep Ark UI's keyboard support, state management, form behavior, and accessibility semantics.
  • The same component names across frameworks. React, Solid, Vue, and Svelte use flat exports such as Dialog, DialogTrigger, and DialogContent, with framework-native props and events.
  • Two styling paths. Choose CSS Modules for ordinary, locally scoped component styles, or Tailwind CSS v4 for utility-first composition and overrides. Neither path adds a styling runtime.
  • Two install methods. Keep dependencies package-managed or copy component source into your application through the shadcn registry.

Get started

The example below uses React with CSS Modules. Quick start covers every shipped framework, both styling tracks, and package or registry installation.

Start a new app

Use a standalone Vite starter with TypeScript and either CSS Modules or Tailwind CSS v4:

Framework CSS Modules Tailwind CSS v4
React react-vite · StackBlitz react-vite-tailwind · StackBlitz
Solid solid-vite · StackBlitz solid-vite-tailwind · StackBlitz
Vue vue-vite · StackBlitz vue-vite-tailwind · StackBlitz
Svelte svelte-vite · StackBlitz svelte-vite-tailwind · StackBlitz
pnpm dlx giget@latest gh:Blinks44/moduix/starters/react-vite my-app
cd my-app
pnpm install
pnpm dev

Replace react-vite with solid-vite, vue-vite, or svelte-vite, or append -tailwind for a Tailwind CSS v4 starter (for example react-vite-tailwind).

Use the published package

Install moduix and its Ark UI peer dependency:

pnpm add @moduix/react @ark-ui/react

Import the reset and foundation once in your application entry point. If your application already provides an equivalent reset, omit reset.css:

import '@moduix/react/reset.css';
import '@moduix/react/style.css';

Import a component from its subpath:

import { Button } from '@moduix/react/button';

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

There is no package-root export. Optional integrations (Chart with @tanstack/charts and Image with @unpic/core, unpic, plus @unpic/react on React) install their peer dependencies only when you use them. The package README shows how to compose a component from named parts.

Own the source with the registry

Use the registry when a component should live in your repository and evolve with your product. Initialize your framework and styling track in one step (writes components.json, installs base dependencies, and copies foundation styles):

pnpm dlx shadcn@latest init https://moduix.dev/r/react/init.json

Replace react with solid, vue, svelte, or the matching -tailwind track (for example react-tailwind). Then add only the components you need:

pnpm dlx shadcn@latest add @moduix-react/button @moduix-react/dialog

The generated source includes the component, its CSS Module (or Tailwind utility classes), and any required supporting files. The registry preserves the same component contracts and design tokens as the published package, and your components.json aliases determine the destination paths.

The registry also installs blocks, including sign-in forms, a sidebar dashboard, settings, pricing, AI chat, and a data table. CSS Modules blocks include their source, a layout CSS Module, and required UI components; Tailwind blocks ship pure Tailwind utility markup with zero .module.css files. After the same registry setup, install a block with one command:

pnpm dlx shadcn@latest add @moduix-react/login-simple

Choose the matching framework and styling namespace, such as @moduix-vue-tailwind/login-simple.

Styling and theming

Pass className (React) or class (Solid, Vue, and Svelte) to a root or named part. CSS Modules packages support ordinary CSS and component variables; Tailwind packages merge utility overrides with tailwind-merge. Both tracks share the same design tokens and optional presets: dense, soft, and contrast.

See Styling, Themes, and Tokens for customization.

AI and coding agents

moduix ships an Agent Skill in skills/moduix that helps coding agents detect the project's framework, styling track, and install method before editing components:

pnpm dlx skills add https://github.com/Blinks44/moduix --skill moduix

Machine-readable documentation is available at llms.txt, llms-full.txt, and per-framework bundles (llms-react.txt, llms-solid.txt, llms-vue.txt, llms-svelte.txt). See AI tools for details.

Versioning

moduix follows semantic versioning. The 3.x API is stable: breaking changes ship only in major versions, each with a migration guide, and deprecated APIs stay available until the next major. See Versioning and stability.

Comparing options? See moduix vs shadcn/ui, Mantine, Park UI, and Chakra UI.

Contributing

Contributions are welcome, especially focused component improvements, accessibility fixes, bug reports, and documentation corrections. Keep public component behavior, local component notes, documentation, and registry output synchronized when a public contract changes.

See CONTRIBUTING.md for the repository layout, local setup, and checks, and AGENTS.md for repository conventions. Security issues go through SECURITY.md.

Acknowledgements

moduix is possible because of the work and ideas of these projects:

  • Ark UI for interaction primitives.
  • Chakra UI for component composition and styling patterns.
  • shadcn/ui for source distribution through registries.
  • Lucide for the open-source icon set used throughout the component library.
  • UnoCSS and Tailwind CSS for the foundations adapted by the optional reset.
  • Rstack for its Rust-based ecosystem: Rspress for documentation, Rslib for library builds, and Rstest for tests.
  • VoidZero for the JavaScript tooling used throughout the workspace.

Also by Sergey V.

  • Hearth: Local dev environment dashboard for runtimes, projects, Docker, Kubernetes, databases, and AI agents.
  • Monny: Native macOS system monitor for CPU, memory, disk, network, Apple silicon sensors, and AI usage quotas.
  • Rebind: Native macOS utility for remapping keys, mouse buttons, Logitech mice, and trackpad gestures.

License

MIT

Third-party licenses and attribution are listed in THIRD_PARTY_NOTICES.md.

探索相关项目

加载中…