Installation
Get started with Dynamic UI by installing the package and configuring your project.Prerequisites
Before installing Dynamic UI, ensure your development environment meets these requirements:Node.js Version
Node.js Version
Dynamic UI requires Node.js 22.0.0 or higher.Check your Node.js version:If you need to upgrade, visit nodejs.org or use a version manager like nvm.
React Version
React Version
Dynamic UI supports React 18.x and 19.x.
package.json
TypeScript (Optional)
TypeScript (Optional)
While TypeScript is optional, Dynamic UI includes full TypeScript definitions.For the best development experience, use TypeScript 5.2+:
Package Installation
Install Dynamic UI using your preferred package manager:The package is published as
@dynamic-framework/ui-react on npm with public access.Peer Dependencies
Dynamic UI requires several peer dependencies for full functionality:Importing Styles
Dynamic UI is built on Bootstrap 5 and requires CSS imports. You have two options:Option 1: Import Bootstrap CSS (Recommended)
Import the Bootstrap CSS in your main application file:App.tsx
Option 2: Include in HTML
Alternatively, add the Bootstrap CSS via CDN in yourindex.html:
index.html
Setting Up Context Provider
Many Dynamic UI components require theDContextProvider for configuration. Wrap your application with it:
main.tsx
Context Configuration
You can customize the context provider with icon families and other settings:TypeScript Configuration
If using TypeScript, ensure yourtsconfig.json is configured correctly:
tsconfig.json
Starter Templates
The fastest way to get started is using an official template:Dynamic React Base Template
The official starter template with Dynamic UI pre-configured:The base template includes:
- Pre-configured Dynamic UI setup
- Bootstrap 5 integration
- TypeScript configuration
- Example components and layouts
- Routing with React Router
- Development server with Vite
Verification
Verify your installation by creating a simple component:App.tsx
Troubleshooting
Styles not appearing
Styles not appearing
Problem: Components render but have no styling.Solution: Ensure you’ve imported Bootstrap CSS:Or verify the Bootstrap CDN link is in your HTML.
Peer dependency warnings
Peer dependency warnings
Problem: npm warns about unmet peer dependencies.Solution: Install all required peer dependencies:
TypeScript errors
TypeScript errors
Problem: TypeScript cannot find type definitions.Solution:
- Ensure TypeScript 5.2+ is installed
- Check that
node_modules/@dynamic-framework/ui-react/dist/typesexists - Try deleting
node_modulesand reinstalling:
Icons not displaying
Icons not displaying
Problem: Icons in components are not showing.Solution: Install and configure an icon library, or set up the context provider with your preferred icon family:For Lucide React (recommended):
Node version errors
Node version errors
Problem: Build fails with Node.js version error.Solution: Dynamic UI requires Node.js 22.0.0+. Upgrade your Node.js:
Build Configuration
Dynamic UI is distributed with multiple formats for maximum compatibility:package.json exports
CDN Usage (Not Recommended for Production)
For quick prototyping, you can use the CDN version:Next Steps
Quick Start Guide
Build your first component with Dynamic UI
Component Documentation
Explore all available components in Storybook
Need help? Open an issue on GitHub or check the official documentation.