Launch77 UI library plugin - Setup Radix UI component library with design system integration
npm install @launch77-shared/plugin-uiLaunch77 UI library plugin - Setup Radix UI component library with design system integration.
This plugin installs and configures the @launch77-shared/lib-ui component library in your Launch77 application. It automatically:
- ✅ Installs @launch77-shared/lib-ui package
- ✅ Configures Tailwind to include UI library components
- ✅ Verifies design system integration
- ✅ Provides interactive component showcase
- ✅ Includes comprehensive documentation
- Design System Plugin: This plugin requires the design-system plugin to be installed first
- Tailwind CSS: Your application must have Tailwind CSS configured
- Next.js: Compatible with Next.js App Router applications
From your Launch77 application directory:
``bash`
launch77 plugin:install ui
The plugin will automatically:
1. Check for design-system plugin dependency
2. Install @launch77-shared/lib-ui packagetailwind.config.ts
3. Update to include UI library in content paths
4. Copy example pages and documentation to your app
- @launch77-shared/lib-ui - UI component library
tailwind.config.ts
- Adds node_modules/@launch77-shared/lib-ui/dist/*/.js to content array
- Ensures Tailwind processes UI component styles
``
src/
├── app/
│ └── ui-examples/
│ └── page.tsx # Interactive component showcase
└── modules/
└── ui/
├── README.md # Component documentation
└── index.ts # Convenience re-exports
`tsx
// Direct import from library
import { Button, Input, Card } from '@launch77-shared/lib-ui'
// Or from module re-exports
import { Button, Input, Card } from '@/modules/ui'
export default function MyComponent() {
return (
Hello World
)
}
`
- Form Controls: Button, Input, Textarea, Select, Checkbox, Switch
- Layout: Card, Sidebar
- Feedback: Alert, Badge, Dialog
- Display: Avatar
- Form Utilities: FormField, FormError, FormHelperText
Visit the interactive showcase to explore all components:
`bash`
npm run devNavigate to http://localhost:3000/ui-examples
After installation, view detailed component documentation at:
- src/modules/ui/README.md - Full API reference and examples/ui-examples
- - Live interactive examples
1. Plugin Dependencies: Declares design-system as a required plugin@launch77-shared/lib-ui
2. Package Installation: Adds to your package.json
3. Tailwind Integration: Updates content paths so Tailwind processes component styles
4. Template Copy: Copies example pages and documentation to your app
The plugin's generator (src/generator.ts) extends StandardGenerator and:
1. updateDependencies() - Merges library dependencies into your package.json
2. installDependencies() - Runs npm install to fetch packagescopyTemplates()
3. - Copies example and documentation filesinjectCode()
4. - Updates Tailwind config with UI library content pathshowNextSteps()
5. - Displays usage instructions
All components support Tailwind utility classes via className prop:
`tsx`
Customize the design system tokens that affect all UI components:
`css`
/ src/modules/design-system/config/brand.css /
:root {
--primary: 220 90% 56%;
--secondary: 240 5% 26%;
/ ... more tokens /
}
Create custom variants by wrapping base components:
`tsx
// src/components/PrimaryButton.tsx
import { Button } from '@launch77-shared/lib-ui'
export function PrimaryButton(props) {
return
}
`
If component styles aren't applying:
1. Check Tailwind Config: Verify tailwind.config.ts includes:
`ts`
content: [
// ... other paths
'node_modules/@launch77-shared/lib-ui/dist/*/.js',
]
2. Rebuild: Restart your dev server:
`bash`
npm run dev
3. Design System: Ensure design-system plugin is installed:
`bash`
launch77 plugin:install design-system
If you see TypeScript errors importing components:
1. Install Dependencies:
`bash`
npm install
2. Check Package: Verify @launch77-shared/lib-ui is in your package.json
If example page shows missing components:
1. Verify Installation: Check node_modules/@launch77-shared/lib-ui exists`
2. Reinstall Plugin:
bash`
launch77 plugin:install ui
`bash`
cd plugins/ui
npm run build
`bash`In your app directory
launch77 plugin:install ui
- design-system (required) - Provides design tokens and Tailwind preset
- analytics-web - Track user interactions with UI components
UNLICENSED - Internal use only
For issues or questions:
1. Check src/modules/ui/README.md for component documentation/design-system-test`
2. Review design system at
3. Open an issue in the Launch77 CLI repository