Setup
Get Moto UI running within your project
- Gaming
- Music
- Film
- Reading
- Cycling
- Running
- Swimming
- Hiking
- Golf
- Karate
Built on the robust foundations of Ark UI and PandaCSS, Moto UI gives you a head start with sensible styling and structural defaults.
Installation
Follow these steps to set up Moto UI and its styling engine, Panda CSS.
Prerequisites
Before you begin, ensure your project meets the following requirements:
- React: Version 18.0.0 or higher (including React 19).
- TypeScript: Recommended for the best developer experience.
- Panda CSS: Moto UI requires Panda CSS for styling.
1. Install Packages
Install the core library along with the Panda CSS presets and development dependencies.
npm install @moto-ui/preset-base @moto-ui/react
npm install -D @pandacss/devpnpm add @moto-ui/preset-base @moto-ui/react
pnpm add -D @pandacss/devyarn add @moto-ui/preset-base @moto-ui/react
yarn add --dev @pandacss/devbun add @moto-ui/preset-base @moto-ui/react
bun add --dev @pandacss/dev2. Panda CSS Configuration
Initialize Panda CSS in your project if you haven't already.
npx panda init --postcsspnpm dlx panda init --postcssyarn dlx panda init --postcssbun x panda init --postcssThen, update your panda.config.ts to include the Moto UI base preset. Crucially, you must include the Moto UI build info in your include path so that Panda can scan the library's components for styles.
For framework specific Pandacss Installation, check out pandacss setup and once you're done, come back to this guide.
3. Configure Global CSS
Update your global CSS file (e.g., src/index.css) to include the Panda CSS layers. These layers ensure correct CSS specificity and allow Moto UI's recipes to work correctly alongside your own utilities.
4. Import Global CSS
Import the CSS file at the root of your application (usually main.tsx or app.tsx).
5. Start Building
You're all set! You can now start using Moto UI components.
Troubleshooting
Styles not appearing?
If you see the components but they have no styling, ensure that:
- Your
includearray contains all your[...paths]array. - You have run
npx panda(or your build script). - You have imported your
index.cssfile at the root of your project.
Font Issues
Moto UI presets use --font-sans-default and --font-mono-default variables. If your fonts look off, make sure these are defined in your globalVars.