Documentation
How FelicityUI distributes native UI source across React, SwiftUI, and Jetpack Compose.
FelicityUI is a source registry, not a component library you import at runtime.
npx felicityui@latest add button --platform react
copies platform-native files into your app. Edit them. Commit them. Review them like any other code you did not write yourself.
Use CLI 0.1.6 or later. Native Android source-set detection and Kotlin package rewrite landed there. If npx felicityui still prints an older version, pin @latest.
How it works
One specification, one token catalog, three implementations. The CLI never evaluates TypeScript, Swift, or Kotlin from the registry.
| Platform | After init / add |
|---|---|
| React | Files under components/ui (or src/…). Tailwind, clsx, and @/lib/cn are wired automatically in Vite and Next.js. |
| SwiftUI | Files under UI/Components and UI/Tokens. Add them to the Xcode target. Requires Xcode 15+ / iOS 17+. |
| Compose | Files on app/src/main/java or kotlin, packages rewritten to the Gradle namespace. Needs Material 3. |
React is plug-and-play in a clean Vite or Next.js app. SwiftUI still needs target membership — the CLI cannot edit .pbxproj. Compose is plug-and-play when you run it from a real Android module; an empty folder still writes top-level ui/ with com.felicityui.ui.*.
Catalog
Complete components: Button, Input, Accordion, Dialog, and Drawer. Each exists to prove platform adaptation, not to pad the catalog.
Segmented controls use pressed on React and selected on SwiftUI and Compose.
Start here
- Installation — init, add, configure
- CLI — init, add, list, info, doctor
- MCP — read-only catalog for agents
- Registry protocol
- Tokens
- Accessibility
- Platforms: React, SwiftUI, Compose