- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
The sd-ui CLI does not scaffold a new Laravel app. Start by creating a Laravel app with the React starter kit, then choose how you want to configure StyleDriven UI.
Create Project
Create a new Laravel app using the Laravel installer:
laravel new my-appIf you already have a Laravel app with React and Inertia configured, skip this step.
Choose the React starter kit when prompted. For more information, see the official Laravel frontend documentation.
Then move into your project directory:
cd my-appBuild your preset visually and generate a Laravel init command.
Configure StyleDriven UI in your Laravel app directly from the terminal.
Use shadcn/create
Build Your Preset
Open shadcn/create and build your preset visually. Choose your style, colors, fonts, icons, and more.
Open shadcn/create
Run the Command
Click Create Project, choose your package manager, and copy the generated command.
The generated command will look similar to this:
pnpm dlx shadcn@latest init --preset [CODE] --template laravel
Run the command from the root of your Laravel app.
When asked to overwrite components.json and components, choose Yes.
Add Components
Add the Switch component to your project:
pnpm dlx shadcn@latest add switch
The command above will add the Switch component to resources/js/components/ui/switch.tsx. You can then import it like this:
import { Switch } from "@/components/ui/switch"
const MyPage = () => {
return (
<div>
<Switch />
</div>
)
}
export default MyPageUse the CLI
Run the CLI
Run the sd-ui init command from the root of your Laravel app:
pnpm dlx shadcn@latest init
When asked to overwrite components.json and components, choose Yes.
Add Components
Add the Switch component to your project:
pnpm dlx shadcn@latest add switch
The command above will add the Switch component to resources/js/components/ui/switch.tsx. You can then import it like this:
import { Switch } from "@/components/ui/switch"
const MyPage = () => {
return (
<div>
<Switch />
</div>
)
}
export default MyPage