File: README.md
Creative Tim UI
Creative Tim UI is a comprehensive component library built on top of shadcn/ui to help you build modern web applications faster.
Overview
Creative Tim UI provides pre-built, customizable React components and blocks designed for building beautiful, production-ready web applications.
The CLI makes it easy to add these components to your Next.js project.
Installation
You can use the Creative Tim UI CLI directly with npx, or install it globally:
# Use directly (recommended)
npx @creative-tim/ui@latest add <component-name>
# Or using shadcn cli
npx shadcn@latest add https://creative-tim.com/ui/r/all.jsonPrerequisites
Before using Creative Tim UI, ensure your Next.js project meets these requirements:
- Node.js 18 or later
- shadcn/ui initialized in your project (npx shadcn@latest init)
- Tailwind CSS configured
Usage
Install All Components
Install all available Creative Tim UI components at once:
npx @creative-tim/ui@latest add allThis command will:
- Set up shadcn/ui if not already configured
- Install all Creative Tim UI components to your configured components directory
- Add necessary dependencies to your project
Install Specific Components
Install individual components using the components add command:
npx @creative-tim/ui@latest add <component-name>Examples:
# Install the orb component
npx @creative-tim/ui@latest add cardAlternative: Use with shadcn CLI
You can also install components using the standard shadcn/ui CLI:
# Install all components
npx shadcn@latest add https://creative-tim.com/ui/r/all.json
# Install a specific component
npx shadcn@latest add https://creative-tim.com/ui/r/button.jsonAll available components can be found here or explore a list of example blocks here.
Blocks
Explore our collection of ready-to-use blocks organized by category. Each block is fully customizable and can be added to your project with a single command.
Application UI
| Modals
5 Blocks | Account
7 Blocks | Billing
5 Blocks |
| --- | --- | --- |
Marketing
| Testimonial Sections
17 Blocks | Contact Sections
15 Blocks | Footers
16 Blocks |
| --- | --- | --- |
| FAQs
6 Blocks | Blog
15 Blocks | |
Ecommerce UI
Ready-to-use blocks for product listings, shopping carts, and checkout flows.
| Ecommerce Sections
| 14 Blocks |
|---|
Web 3.0
Innovative sections built for decentralized applications, blockchain projects, and crypto platforms.
| Web 3.0 Cards
| 5 Blocks |
|---|
Contributing
If you'd like to contribute to Creative Tim UI, please follow these steps:
- Fork the repository
- Create a new branch
- Make your changes to the components in the registry.
- Open a PR to the main branch.
Please read the contributing guide.
Copyrights and Licenses
Creative Tim UI is built upon the incredible work of the open source community:
- shadcn/ui - The documentation structure, registry system, and foundational (atomic) components are from the open source work in shadcn/ui. MIT License
- Material Tailwind by Creative Tim - The blocks and component designs are inspired by and based on Material Tailwind Framework. MIT License
- Eleven Labs UI - General inspiration for the documentation structure and approach of blocks. MIT License
- Geist Font by Vercel - The beautiful typeface used throughout the interface. SIL Open Font License 1.1
We are grateful to these projects for making their work available under open source licenses.
License
Licensed under the MIT license.
Made with love by Creative Tim.
File: apps/www/content/docs/components/card.mdx
title: Card featured: true component: true
Installation
npx @creative-tim/ui@latest add cardnpm install lucide-reactUsage
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/components/ui/card"Examples
Plain Card
A simple card with just content.
<Card>
<CardContent className="pt-6">
This is a plain card with simple content. Perfect for displaying basic
information.
</CardContent>
</Card>Card with Title, Description, and Button
A card with header elements and a call-to-action button.
<Card>
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>
This is a brief description of the card content.
</CardDescription>
</CardHeader>
<CardContent>
More detailed information goes here in the card content area.
</CardContent>
<CardFooter>
Learn More
</CardFooter>
</Card>Blog Card
A card designed for blog post previews with image, title, excerpt, and metadata.
<Card className="overflow-hidden">
<CardHeader>
<Calendar className="h-4 w-4" />
March 15, 2025
โข
5 min read
<CardTitle>Getting Started with Next.js</CardTitle>
<CardDescription>
Learn how to build modern web applications with Next.js, React, and
TypeScript.
</CardDescription>
</CardHeader>
<CardFooter>
Read More
</CardFooter>
</Card>E-commerce Product Card
A card designed for product listings with image, pricing, and add to cart functionality.
<Card className="overflow-hidden">
New
<CardHeader>
<CardTitle>Premium Wireless Headphones</CardTitle>
<CardDescription>
High-quality audio with active noise cancellation
</CardDescription>
</CardHeader>
<CardContent>
<Star className="h-4 w-4 fill-yellow-400 text-yellow-400" />
<Star className="h-4 w-4 fill-yellow-400 text-yellow-400" />
<Star className="h-4 w-4 fill-yellow-400 text-yellow-400" />
<Star className="h-4 w-4 fill-yellow-400 text-yellow-400" />
<Star className="h-4 w-4" />
(128)
$299
</CardContent>
<CardFooter className="gap-2">
<ShoppingCart className="mr-2 h-4 w-4" />
Add to Cart
<Heart className="h-4 w-4" />
</CardFooter>
</Card>API Reference
Card
The root card container component.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
undefined |
Additional CSS classes |
| children | ReactNode |
undefined |
Card content |
CardHeader
Container for card header content (title, description).
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
undefined |
Additional CSS classes |
| children | ReactNode |
undefined |
Header content |
CardTitle
The card title component.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
undefined |
Additional CSS classes |
| children | ReactNode |
undefined |
Title text |
CardDescription
The card description component.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
undefined |
Additional CSS classes |
| children | ReactNode |
undefined |
Description text |
CardContent
Container for the main card content.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
undefined |
Additional CSS classes |
| children | ReactNode |
undefined |
Card body content |
CardFooter
Container for card footer content (buttons, actions).
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
undefined |
Additional CSS classes |
| children | ReactNode |
undefined |
Footer content |
Notes
- Cards are fully responsive and adapt to their container
- Use
overflow-hiddenclass on Card to clip images at rounded corners - Combine with other components like Button, Badge, and icons for rich layouts
- Based on shadcn/ui Card component with Material Tailwind design enhancements
File: apps/www/content/docs/components/index.mdx
title: Components
File: apps/www/content/docs/components/software-purchase-card.mdx
title: Software Purchase Card featured: true component: true
Installation
npx shadcn@latest add software-purchase-cardnpm install lucide-reactUsage
import { SoftwarePurchaseCard } from "@/components/cards/software-purchase"Basic Usage
<SoftwarePurchaseCard
softwareName="Enterprise Cloud Suite"
startDate="2025-01-15"
seats={50}
pricingType="per-seat"
price="$2,500"
onApprove={() => console.log("Approved")}
onDiscard={() => console.log("Discarded")}
/>Flat Rate Pricing
<SoftwarePurchaseCard
softwareName="Design Tools Pro"
startDate="2025-02-01"
seats={25}
pricingType="flat-rate"
price="$999"
onApprove={handleApprove}
onDiscard={handleDiscard}
/>Usage-Based Pricing
<SoftwarePurchaseCard
softwareName="API Gateway Service"
startDate="2025-01-20"
seats={10}
pricingType="usage-based"
price="$0.05/request"
onApprove={handleApprove}
onDiscard={handleDiscard}
/>API Reference
SoftwarePurchaseCard
The main card component for displaying software purchase details.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| softwareName | string |
"Enterprise Cloud Suite" |
Name of the software |
| startDate | string |
"2025-01-15" |
Start date in ISO format (YYYY-MM-DD) |
| seats | number |
50 |
Number of user seats/licenses |
| pricingType | "per-seat" | "flat-rate" | "usage-based" |
"per-seat" |
Type of pricing model |
| price | string |
"$2,500" |
Price display string (can include formatting) |
| onApprove | () => void |
undefined |
Callback function when approve button clicked |
| onDiscard | () => void |
undefined |
Callback function when discard button clicked |
Examples
With State Management
function PurchaseApproval() {
const [status, setStatus] = useState<"pending" | "approved" | "discarded">(
"pending"
)
const handleApprove = () => {
setStatus("approved")
// API call to approve purchase
approvePurchase(purchaseId)
}
const handleDiscard = () => {
setStatus("discarded")
// API call to discard purchase
discardPurchase(purchaseId)
}
return (
<SoftwarePurchaseCard
softwareName="Marketing Automation Suite"
startDate="2025-03-01"
seats={75}
pricingType="per-seat"
price="$3,750"
onApprove={handleApprove}
onDiscard={handleDiscard}
/>
)
}With Loading State
function PurchaseApprovalWithLoading() {
const [loading, setLoading] = useState(false)
const handleApprove = async () => {
setLoading(true)
try {
await approvePurchaseRequest()
toast.success("Purchase approved successfully")
} catch (error) {
toast.error("Failed to approve purchase")
} finally {
setLoading(false)
}
}
return (
<SoftwarePurchaseCard
softwareName="Analytics Platform"
startDate="2025-02-15"
seats={100}
pricingType="flat-rate"
price="$5,000"
onApprove={handleApprove}
onDiscard={() => {}}
/>
)
}Multiple Cards in a List
function PurchaseRequestList() {
const requests = [
{
id: 1,
softwareName: "CRM Software",
startDate: "2025-01-15",
seats: 50,
pricingType: "per-seat" as const,
price: "$2,500",
},
{
id: 2,
softwareName: "Project Management Tool",
startDate: "2025-02-01",
seats: 30,
pricingType: "flat-rate" as const,
price: "$999",
},
]
return (
{requests.map((request) => (
<SoftwarePurchaseCard
key={request.id}
{...request}
onApprove={() => handleApprove(request.id)}
onDiscard={() => handleDiscard(request.id)}
/>
))}
)
}Block Example
For a full-page implementation with detailed purchase information, check out the software-purchase-01 block.
Notes
- The date is automatically formatted using
toLocaleDateStringwith US locale - The pricing type badge displays in a secondary variant for visual hierarchy
- Icons from
lucide-reactare used for visual clarity (Calendar, Users, CreditCard, DollarSign) - The component uses the shadcn/ui Card, Button, and Badge components
- The card is fully responsive with a max width of
md(28rem)
File: apps/www/content/docs/(root)/components.mdx
title: Components
Installing Creative Tim UI components is straightforward and can be done in a couple of ways. You can use the dedicated CLI command for the fastest setup, or integrate via the standard shadcn/ui CLI if you've already adopted shadcn's workflow.
npx @creative-tim/ui@latest add buttonnpx shadcn@latest add https://creative-tim.com/ui/r/button.jsonPrerequisites
Before installing Creative Tim UI, make sure your environment meets the following requirements:
- Node.js version 18 or later
- A Next.js project
- shadcn/ui setup in your project. If you don't have it setup, running any install command will set it up for you.
Installing components
You can install Creative Tim UI components using either the @creative-tim/ui CLI or the shadcn/ui CLI. Both achieve the same result: adding the selected componentโs code and any needed dependencies to your project.
The CLI will download the component's code and integrate it into your project's directory (usually under your components folder).
After running the command, you should see a confirmation in your terminal that the files were added. You can then proceed to use the component in your code.
File: apps/www/content/docs/(root)/how-it-works.mdx
title: How It Works
Creative Tim UI components integrate directly into your project as source code, not as dependencies locked in external packages. This means each component lives in your codebase, giving you complete control to customize, extend, or modify them to match your exact requirements.
Example
Once you've installed a component, simply import it like any other React component in your application. Here's a practical example showing a form card with inputs:
You can use the installed components throughout your application with full flexibility to adapt them to your needs.
Block Example
Blocks are larger, pre-built sections that combine multiple components together. Here's a testimonial block that showcases customer stories with rich typography and layout:
File: apps/www/content/docs/(root)/index.mdx
title: Introduction
Creative Tim UI is a comprehensive component library and custom registry built on top of shadcn/ui to help you build beautiful, modern web applications faster. It provides pre-built, customizable React components and blocks designed for production-ready applications.
Installation
Components are available via the @creative-tim/ui command.
npx @creative-tim/ui@latest add <component>For example, to install a button component, you can run:
npx @creative-tim/ui@latest add buttonAlternatively, you can use the standard shadcn CLI:
npx shadcn@latest add https://creative-tim.com/ui/r/<component>.jsonCopyrights and Licenses
Creative Tim UI is built upon the incredible work of the open source community:
- shadcn/ui - The documentation structure, registry system, and foundational (atomic) components are from the open source work in shadcn/ui. MIT License
- Material Tailwind by Creative Tim - The blocks and component designs are inspired by and based on Material Tailwind Framework. MIT License
- Eleven Labs UI - General inspiration for the documentation structure and approach of blocks. MIT License
- Geist Font by Vercel - The beautiful typeface used throughout the interface. SIL Open Font License 1.1
We are grateful to these projects for making their work available under open source licenses.
Featured Components
Here are some examples of what you can build with Creative Tim UI components:
Cards
Versatile card components for displaying content in various formats - from simple content cards to blog posts and e-commerce products.
Resources
You can explore all available blocks here, view the full component library, or check out the source code on GitHub.
File: apps/www/content/docs/(root)/registry.mdx
title: Registry
What is the Registry?
The Creative Tim UI registry is a centralized catalog system that enables CLI-based component installation based on shadcn/ui. Unlike traditional npm packages where components are locked in external dependencies, our registry delivers components as source code directly into your project.
How the Registry Works
When you run the installation command, the CLI:
- Fetches Component Metadata: Retrieves the component definition from our registry endpoint
- Downloads Dependencies: Identifies and installs required npm packages
- Copies Source Files: Places component files directly into your codebase
- Manages Imports: Automatically configures path aliases and imports
Registry Structure
Each component in the registry includes:
- Component Source Code: The actual React component files
- Type Definitions: Full TypeScript support with strict types
- Dependencies: List of required npm packages (Radix UI, etc.)
- Files Metadata: Information about where files should be placed
- Registry Dependencies: Other registry components it depends on
Installation Endpoints
Components are available through JSON endpoints:
# Base UI Components
/r/button.json
/r/card.json
/r/avatar.json
# Custom Blocks
/r/testimonials-09.jsonThese endpoints return structured JSON that the CLI uses to install components.
Registry vs NPM
| Feature | Registry (Source Code) | NPM Package |
|---|---|---|
| Customization | Full control, edit directly | Limited to props/config |
| Updates | Manual, opt-in | Automatic via package manager |
| Bundle Size | Only what you use | Entire package included |
| Version Control | Part of your codebase | External dependency |
| Flexibility | Modify, extend freely | Constrained by package API |
Registry Components
The Creative Tim UI registry currently includes:
- 47 Base UI Components: All shadcn/ui components (button, card, avatar, etc.)
- 100+ Custom Blocks: Pre-built sections like testimonials, forms, and more
- Full TypeScript Support: Type-safe component definitions
- Dark Mode Ready: Built-in theme support with CSS variables
Private Components
The registry supports private components with API key authentication for PRO features:
- Access control via Bearer tokens or API keys
- Gated installation for premium components
- Environment variable support for CI/CD workflows
Best Practices
- Install Only What You Need: Each component is standalone, no bloat
- Customize After Install: Treat installed components as your own code
- Version Control: Commit installed components to your repository
- Update Selectively: Re-run install commands to update specific components
File: apps/www/docs/private-registry.md
Private Registry Authentication
The Creative Tim UI registry supports private components that require API key authentication. This allows you to secure premium or internal components while maintaining the same installation experience.
Private Components
The following components are currently private and require authentication:
testimonials-03- Testimonial with statistics and metricstestimonials-04- Three column testimonials with star ratings
Authentication Methods
The private registry supports multiple authentication methods:
1. Environment Variable (Recommended)
Add your API key to .env.local:
API_KEY=your_api_key_hereThen install private components normally:
npx @creative-tim/ui@latest add testimonials-032. Authorization Header
Use Bearer token authentication:
curl -H "Authorization: Bearer your_api_key" \
https://ui.creative-tim.com/r/testimonials-03.json3. X-API-Key Header
Use custom API key header:
curl -H "X-API-Key: your_api_key" \
https://ui.creative-tim.com/r/testimonials-03.json4. Query Parameter
Pass the token as a query parameter:
curl https://ui.creative-tim.com/r/testimonials-03.json?token=your_api_keyCLI Configuration
To use private components with the shadcn CLI, configure your components.json:
{
"registries": {
"@creative-tim": {
"url": "https://ui.creative-tim.com/r/{name}.json",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}Error Handling
401 Unauthorized
If you see this error, ensure your API key is set correctly:
Authentication required for private components. Set API_KEY in your .env.local file
or provide it via Authorization header, X-API-Key header, or ?token= query parameter.Solutions:
- Set
API_KEYin your.env.localfile - Check that your API key is valid
- Ensure you're not committing your API key to version control
403 Forbidden
This means your API key is valid but doesn't have access to the requested component.
404 Not Found
The component either doesn't exist or is not a private component.
Security Best Practices
Never commit API keys to version control
- Always use environment variables
- Add
.env.localto your.gitignore
Use HTTPS
- Always use HTTPS URLs to protect your API key in transit
Rotate keys regularly
- Change your API key periodically for better security
Use different keys for different environments
- Development, staging, and production should use separate keys
Getting Your API Key
Contact us to get your API key for accessing private components:
- Email: [email protected]
- Website: https://ui.creative-tim.com/contact
Example Usage
# Set your API key
export API_KEY=your_api_key_here
# Install a private component
npx @creative-tim/ui@latest add testimonials-03
# Or use curl to download directly
curl -H "Authorization: Bearer $API_KEY" \
https://ui.creative-tim.com/r/testimonials-03.json -o testimonials-03.jsonTechnical Details
Private components are served through an authenticated API route (/api/r/[name]) that validates your API key before returning the component definition. The registry middleware automatically redirects requests for private components to this authenticated endpoint.
Public components continue to be served statically from /r/*.json without authentication.