This guide will help you get started with Prism UI in your React project. We'll cover everything from installation to basic usage.
Prerequisites
Before you begin, make sure you have:
- Node.js 18.0 or later
- React project using Next.js 13/14 with App Router
- TypeScript (recommended)
Installation
- Create a new Next.js project or set up an existing one using the shadcn CLI:
You can use the -d
flag for defaults (New York style, Zinc color, and CSS variables):
- During setup, you'll be asked a few questions to configure
components.json
:
- Start adding components to your project:
Basic Usage
Import and use components in your project:
Using Pre-built Sections
Prism UI provides several pre-built sections that you can use in your application. Here's how to use the Hero section:
Creating a Basic Layout
Here's an example of how to create a basic page layout using Prism UI components:
Dark Mode Support
Prism UI includes built-in dark mode support. To enable it:
- Add the
dark
class to your root layout when dark mode is active - Use the included dark mode variants in your Tailwind classes
Remember to check out our components overview guide for a detailed look at all available components and sections.
Next Steps
- Explore our Components Overview
- Check out the shadcn/ui documentation for base component details
- Join our Discord community for support