Installation
Get started with Fluxo UI in your React project
Prerequisites
Before installing Fluxo UI, make sure you have the following:
- React 16.8+ or React 17+
- TypeScript 4.0+ (recommended)
NPM Installation
Install Fluxo UI using your preferred package manager. View the package on npm.
npm install fluxo-uiyarn add fluxo-uipnpm add fluxo-uiSetup
Styles are automatic
There is no required global stylesheet import. Importing any component applies that component's CSS along with the base design tokens and dark-mode support, and your bundler includes only the CSS for the components you actually import. To use a brand theme other than the default blue, see the Theming section below.
Start using components
Import and use components in your React application:
import React, { useState } from 'react';
import { Button, TextInput, Checkbox } from 'fluxo-ui';
function MyForm() {
const [name, setName] = useState('');
const [agreed, setAgreed] = useState(false);
return (
<div>
<TextInput
label="Full Name"
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="Enter your name"
/>
<Checkbox
checked={agreed}
onChange={(e) => setAgreed(e.target.checked)}
label="I agree to the terms and conditions"
/>
<Button
variant="primary"
disabled={!name || !agreed}
onClick={() => console.log('Submit')}
>
Submit
</Button>
</div>
);
}
export default MyForm;Theming & Dark Mode
Components render in the default blue palette out of the box. To switch to another brand theme, import that theme's CSS once at your app entry, then add the matching class to the body element. Each theme is a separate import, so only the theme you actually use is bundled.
import 'fluxo-ui/themes/purple';
document.body.classList.add('theme-purple');Available themes
| Theme | Import | Body class |
|---|---|---|
| Blue (default) | fluxo-ui/themes/blue | theme-blue |
| Green | fluxo-ui/themes/green | theme-green |
| Orange | fluxo-ui/themes/orange | theme-orange |
| Purple | fluxo-ui/themes/purple | theme-purple |
| Lara | fluxo-ui/themes/lara | theme-lara |
| Indigo | fluxo-ui/themes/indigo | theme-indigo |
| Rose | fluxo-ui/themes/rose | theme-rose |
| Amber | fluxo-ui/themes/amber | theme-amber |
| Teal | fluxo-ui/themes/teal | theme-teal |
| Emerald | fluxo-ui/themes/emerald | theme-emerald |
| Fuchsia | fluxo-ui/themes/fuchsia | theme-fuchsia |
| Slate | fluxo-ui/themes/slate | theme-slate |
Dark mode
Add the mode-dark class to the body element. It works with or without a brand theme — no extra import is needed because dark-mode tokens ship with every component.
document.body.classList.add('theme-purple', 'mode-dark');Loading every theme (theme switcher)
If you let users switch themes at runtime, import the all-themes bundle once instead of an individual theme:
import 'fluxo-ui/styles';TypeScript Support
Fluxo UI is built with TypeScript and provides complete type definitions out of the box. No additional @types packages are needed.
// All components are fully typed
import { Button, ButtonProps } from 'fluxo-ui';
// Props are strongly typed with IntelliSense support
const MyButton: React.FC<ButtonProps> = (props) => {
return <Button {...props} />;
};AI / MCP Integration
Fluxo UI ships with an MCP server bundled inside the package — so Claude Code, GitHub Copilot, Cursor, and any other AI assistant can write correct Fluxo UI code on the first try. No extra install, no separate package.
Enable it in Claude Code with one command:
claude mcp add fluxo-ui -- npx fluxo-ui-mcpNext Steps
Troubleshooting
Styles not loading?
Component styles are injected automatically when you import a component, so confirm your bundler is configured to handle the CSS imports that ship inside the package (the default for Vite, Next.js, and Create React App). If only the brand colors look wrong, you likely added a theme-* class to the body without importing that theme — import it once at your entry point:
import 'fluxo-ui/themes/purple';TypeScript errors?
Ensure your TypeScript version is 4.0+ and your tsconfig.json includes:
{
"compilerOptions": {
"moduleResolution": "node",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"jsx": "react-jsx"
}
}