A plugin that integrates Shadcn UI components with PayloadCMS, providing a modern and accessible UI toolkit for your admin panel.
- 🎨 Modern UI components based on Radix UI
- 🌗 Dark mode support
- ♿ Accessible components
- 🎯 Type-safe with TypeScript
- 📱 Responsive design
- 🔧 Highly customizable
npm install @payloadcmsdirectory/shadcn-ui
# or
yarn add @payloadcmsdirectory/shadcn-ui
# or
pnpm add @payloadcmsdirectory/shadcn-ui
Add the plugin to your Payload config:
import shadcnPlugin from "@payloadcmsdirectory/shadcn-ui";
import { buildConfig } from "payload/config";
export default buildConfig({
plugins: [
shadcnPlugin({
// Plugin options
enableAll: true, // Enable all components
}),
],
});
The plugin includes all the components from Shadcn UI, pre-configured for use with PayloadCMS:
- Accordion
- Alert Dialog
- Avatar
- Button
- Calendar
- Card
- Checkbox
- Collapsible
- Command
- Context Menu
- Dialog
- Dropdown Menu
- Form
- Hover Card
- Input
- Label
- Menubar
- Navigation Menu
- Popover
- Progress
- Radio Group
- ScrollArea
- Select
- Separator
- Sheet
- Slider
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Tooltip
You can customize which components to enable and their default styles:
shadcnPlugin({
// Enable specific components
components: {
button: true,
input: true,
select: true,
// ...
},
// Customize theme
theme: {
extend: {
colors: {
// Your custom colors
},
},
},
});
Please read our Contributing Guide before submitting a Pull Request to the project.
MIT © PayloadCMS Directory