### Project setup prompts for solid-start Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/solid-start.mdx Example responses for the project creation prompts. Use 'with-tailwindcss' template and TypeScript. ```txt Project Name? my-app Is this a Solid-Start project? yes Which template would you like to use? with-tailwindcss Use TypeScript? yes ``` -------------------------------- ### solidui-cli init configuration prompts Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/astro.mdx Example responses to the solidui-cli init prompts, including TypeScript, global CSS file, tailwind config location, and import alias. ```txt Would you like to use TypeScript? (recommended) yes Where is your global CSS file? src/style/globals.css Where is your tailwind.config.js located? tailwind.config.mjs Configure the import alias for the src directory: ~/* ``` -------------------------------- ### Configure ui.config.json prompts Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/solid-start.mdx Example responses for the solidui-cli init prompts. Configure TypeScript, global CSS file, tailwind config location, and import alias. ```txt Would you like to use TypeScript? (recommended) yes Where is your global CSS file? src/app.css Where is your tailwind.config.js located? tailwind.config.cjs Configure the import alias for the src directory: ~/* ``` -------------------------------- ### Vite project setup prompts Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/vite.mdx Expected prompts when creating a Vite project with Solid and TypeScript. ```txt ✔ Project name: ... vite-project ✔ Select a framework: › Solid ✔ Select a variant: › TypeScript ``` -------------------------------- ### Import and use the Button component Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/vite.mdx Example of importing the Button component from ~/components/ui/button and using it in a Solid component. ```tsx import { Button } from "~/components/ui/button" export default function Home() { return (
) } ``` -------------------------------- ### Install Node.js type definitions Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/vite.mdx Install @types/node so you can import 'path' without error. ```bash # (so you can import "path" without error) npm i -D @types/node ``` -------------------------------- ### Astro project configuration prompts Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/astro.mdx Example responses to the Astro CLI prompts when creating a project. The answers include using sample files, TypeScript, and strict type checking. ```txt - Where should we create your new project? ./shining-saturn - How would you like to start your new project? Include sample files - Do you plan to write TypeScript? Yes - How strict should TypeScript be? Strict ``` -------------------------------- ### App structure reference Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/solid-start.mdx A typical SolidStart project structure with components, lib, and routes folders. ```txt . ├── public │ ├── favicon.ico │ └── ... ├── src │ ├── components │ │ ├── ui │ │ │ ├── button.tsx │ │ │ ├── input.tsx │ │ │ └── ... │ │ ├── main-nav.tsx │ │ ├── page-header.tsx │ │ └── ... │ ├── lib │ │ └── utils.ts │ ├── routes │ │ ├── [...404].tsx │ │ ├── index.tsx │ │ └── ... │ ├── app.css │ ├── app.tsx │ └── ... ├── app.config.ts ├── tailwind.config.cjs └── ... ``` -------------------------------- ### Install TanStack Solid Table Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/data-table.mdx Install the @tanstack/solid-table dependency. ```bash npm install @tanstack/solid-table ``` -------------------------------- ### Install Tailwind CSS and generate config files Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/vite.mdx Install tailwindcss v3 and its peer dependencies, then generate tailwind.config.js and postcss.config.js. ```bash npm install -D tailwindcss@3 postcss autoprefixer npx tailwindcss init -p ``` -------------------------------- ### Create a new Tauri project Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/tauri.mdx Run this command to scaffold a new Tauri project. When prompted, select Solid as the UI template and TypeScript as the flavor. ```bash npm create tauri-app@latest ``` ```txt ✔ Project name · tauri-app ✔ Choose which language to use for your frontend · TypeScript / JavaScript ✔ Choose your UI template · Solid ✔ Choose your UI flavor · TypeScript ``` -------------------------------- ### solidui-cli configuration prompts Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/vite.mdx Expected prompts when configuring ui.config.json. ```txt Would you like to use TypeScript? (recommended) yes Where is your global CSS file? src/App.css Where is your tailwind.config.js located? tailwind.config.js Configure the import alias for the src directory: ~/* ``` -------------------------------- ### Install @kobalte/core dependency Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/alert-dialog.mdx Manual installation step: install the required dependency @kobalte/core. ```bash npm install @kobalte/core ``` -------------------------------- ### Create a new Vite project Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/vite.mdx Run this command to scaffold a new Vite project. When prompted, select Solid and TypeScript. ```bash npm create vite@latest ``` -------------------------------- ### Add Table component Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/data-table.mdx Install the Table component using the solidui CLI. ```bash npx solidui-cli@latest add table ``` -------------------------------- ### Add button and dropdown-menu components Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/dark-mode/vite.mdx Install the required button and dropdown-menu components using the SolidUI CLI. ```bash npx solidui-cli@latest add button dropdown-menu ``` -------------------------------- ### Import and use Button component in Astro Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/astro.mdx Example of importing the Button component from '~/components/ui/button' and using it in an Astro page. ```astro --- import { Button } from "~/components/ui/button" --- Astro ``` -------------------------------- ### Create a new SolidStart project Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/solid-start.mdx Run this command to create a new SolidJS project using the solid-start template. When prompted, select the 'with-tailwindcss' template and TypeScript. ```bash npm init solid@latest ``` -------------------------------- ### Install @ark-ui/solid dependency Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/date-picker.mdx Manual installation step: install the required Ark UI dependency before copying the component code. ```bash npm install @ark-ui/solid ``` -------------------------------- ### Install Inter font package Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/solid-start.mdx Install the @fontsource/inter package to use the Inter font in your SolidStart project. ```bash npm install @fontsource/inter ``` -------------------------------- ### Install chart.js dependency Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/charts.mdx Install the chart.js library as a dependency for manual setup. ```bash npm install chart.js ``` -------------------------------- ### Install Grid with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/grid.mdx Installs the Grid component using the SolidUI CLI. Run this command in your project directory. ```bash npx solidui-cli@latest add grid ``` -------------------------------- ### Add Solid to Astro project Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/astro.mdx Installs Solid integration via the Astro CLI. Answer 'Yes' to all prompts when prompted. ```bash npx astro add solid ``` -------------------------------- ### Install Tailwind CSS dependencies Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/manual.mdx Run this npm command to add the required dependencies for styling and utility classes: tailwindcss-animate, class-variance-authority, clsx, and tailwind-merge. ```bash npm install tailwindcss-animate class-variance-authority clsx tailwind-merge ``` -------------------------------- ### Add a component with solidui-cli Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/tauri.mdx Add the Button component to your project, then import it in your app. ```bash npx solidui-cli@latest add button ``` ```tsx import { Button } from "~/components/ui/button" export default function App() { return (
) } ``` -------------------------------- ### Create a new Astro project Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/astro.mdx Run this command to scaffold a new Astro project. It will prompt you to configure the project. ```bash npm create astro@latest ``` -------------------------------- ### Configure tailwind.config.js Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/manual.mdx Example Tailwind CSS configuration for Solid UI. It sets up dark mode, content paths, theme colors, border radius, keyframes, and animations, and includes the tailwindcss-animate plugin. ```js /**@type {import("tailwindcss").Config} */ module.exports = { darkMode: ["variant", [".dark &", '[data-kb-theme="dark"] &']], content: ["./src/**/*.{ts,tsx}"], theme: { container: { center: true, padding: "2rem", screens: { "2xl": "1400px" } }, extend: { colors: { border: "hsl(var(--border))", input: "hsl(var(--input))", ring: "hsl(var(--ring))", background: "hsl(var(--background))", foreground: "hsl(var(--foreground))", primary: { DEFAULT: "hsl(var(--primary))", foreground: "hsl(var(--primary-foreground))" }, secondary: { DEFAULT: "hsl(var(--secondary))", foreground: "hsl(var(--secondary-foreground))" }, destructive: { DEFAULT: "hsl(var(--destructive))", foreground: "hsl(var(--destructive-foreground))" }, info: { DEFAULT: "hsl(var(--info))", foreground: "hsl(var(--info-foreground))" }, success: { DEFAULT: "hsl(var(--success))", foreground: "hsl(var(--success-foreground))" }, warning: { DEFAULT: "hsl(var(--warning))", foreground: "hsl(var(--warning-foreground))" }, error: { DEFAULT: "hsl(var(--error))", foreground: "hsl(var(--error-foreground))" }, muted: { DEFAULT: "hsl(var(--muted))", foreground: "hsl(var(--muted-foreground))" }, accent: { DEFAULT: "hsl(var(--accent))", foreground: "hsl(var(--accent-foreground))" }, popover: { DEFAULT: "hsl(var(--popover))", foreground: "hsl(var(--popover-foreground))" }, card: { DEFAULT: "hsl(var(--card))", foreground: "hsl(var(--card-foreground))" } }, borderRadius: { xl: "calc(var(--radius) + 4px)", lg: "var(--radius)", md: "calc(var(--radius) - 2px)", sm: "calc(var(--radius) - 4px)" }, keyframes: { "accordion-down": { from: { height: 0 }, to: { height: "var(--kb-accordion-content-height)" } }, "accordion-up": { from: { height: "var(--kb-accordion-content-height)" }, to: { height: 0 } }, "content-show": { from: { opacity: 0, transform: "scale(0.96)" }, to: { opacity: 1, transform: "scale(1)" } }, "content-hide": { from: { opacity: 1, transform: "scale(1)" }, to: { opacity: 0, transform: "scale(0.96)" } } }, animation: { "accordion-down": "accordion-down 0.2s ease-out", "accordion-up": "accordion-up 0.2s ease-out", "content-show": "content-show 0.2s ease-out", "content-hide": "content-hide 0.2s ease-out" } } }, plugins: [require("tailwindcss-animate")] } ``` -------------------------------- ### Install Tailwind CSS and generate config files Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/tauri.mdx Install tailwindcss, postcss, and autoprefixer as dev dependencies, then generate tailwind.config.js and postcss.config.js. ```bash npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p ``` -------------------------------- ### Install Pagination with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/pagination.mdx Run this command to add the Pagination component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add pagination ``` -------------------------------- ### Install @corvu/resizable dependency Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/resizable.mdx Manual installation step: install the required dependency for the resizable component. ```bash npm install @corvu/resizable ``` -------------------------------- ### Install Dependencies for Command Component Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/command.mdx Install the required dependencies for the command component when setting up manually. ```bash npm install @kobalte/core cmdk-solid ``` -------------------------------- ### Install Toggle via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/toggle.mdx Install the toggle component using the SolidUI CLI. Run this command in your project directory. ```bash npx solidui-cli@latest add toggle ``` -------------------------------- ### Install Toast with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/toast.mdx Run this command to add the toast component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add toast ``` -------------------------------- ### Install Drawer via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/drawer.mdx Use the SolidUI CLI to add the drawer component to your project. ```bash npx solidui-cli@latest add drawer ``` -------------------------------- ### Install @corvu/otp-field dependency Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/otp-field.mdx Install the required dependency for manual setup of the OTP Field component. ```bash npm install @corvu/otp-field ``` -------------------------------- ### Install @corvu/drawer dependency Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/drawer.mdx Manual installation step: install the required dependency before copying the component code. ```bash npm install @corvu/drawer ``` -------------------------------- ### Add path aliases to tsconfig.json Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/vite.mdx Add baseUrl and paths to tsconfig.json to resolve the ~/* alias to ./src/*. ```ts { "compilerOptions": { // ... "baseUrl": ".", "paths": { "~/*": [ "./src/*" ] } // ... } } ``` -------------------------------- ### Install Switch via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/switch.mdx Run this command to add the Switch component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add switch ``` -------------------------------- ### Configure Vite alias for ~ Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/vite.mdx Update vite.config.ts to resolve the ~ alias to the src directory using path.resolve. ```ts import path from "path" import solid from 'vite-plugin-solid'; import { defineConfig } from "vite" export default defineConfig({ plugins: [solid()], resolve: { alias: { "~": path.resolve(__dirname, "./src") } } }) ``` -------------------------------- ### Add Tailwind CSS to Astro project Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/astro.mdx Installs Tailwind CSS integration via the Astro CLI. Answer 'Yes' to all prompts when prompted. ```bash npx astro add tailwind ``` -------------------------------- ### Install Menubar via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/menubar.mdx Run this command to add the menubar component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add menubar ``` -------------------------------- ### Import globals.css in Astro page Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/astro.mdx Add this import to src/pages/index.astro to include the global styles. ```astro --- import "~/styles/globals.css" --- ``` -------------------------------- ### Install Context Menu via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/context-menu.mdx Use the SolidUI CLI to add the context-menu component to your project. ```bash npx solidui-cli@latest add context-menu ``` -------------------------------- ### Install Tooltip via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/tooltip.mdx Run this command to add the Tooltip component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add tooltip ``` -------------------------------- ### Install sidebar component with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/sidebar.mdx Run this command to install the sidebar.tsx component using the Solid UI CLI. ```bash npx solidui-cli@latest add sidebar ``` -------------------------------- ### Install Resizable via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/resizable.mdx Use this command to add the resizable component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add resizable ``` -------------------------------- ### Install Select component with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/select.mdx Run this command in your terminal to add the Select component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add select ``` -------------------------------- ### Install Sheet with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/sheet.mdx Use the SolidUI CLI to add the Sheet component to your project. ```bash npx solidui-cli@latest add sheet ``` -------------------------------- ### Menubar usage example Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/menubar.mdx Example of a menubar with a File menu containing items, separators, and a keyboard shortcut. Use this to create a persistent menu bar in your application. ```tsx File New Tab ⌘T New Window Share Print ``` -------------------------------- ### Install Separator with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/separator.mdx Run this command to add the Separator component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add separator ``` -------------------------------- ### Create basic AppSidebar component Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/sidebar.mdx Create a new sidebar component at components/app-sidebar.tsx with Sidebar and SidebarContent. This is the second step in the basic sidebar setup. ```tsx import { Sidebar, SidebarContent } from "~/components/ui/sidebar" export function AppSidebar() { return ( ) } ``` -------------------------------- ### Install solid-sonner dependency Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/sonner.mdx Install the solid-sonner package manually as a dependency. ```bash npm install solid-sonner ``` -------------------------------- ### Install Aspect Ratio via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/aspect-ratio.mdx Run this command to add the aspect-ratio component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add aspect-ratio ``` -------------------------------- ### Install embla-carousel-solid dependency Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/carousel.mdx Manual installation step: install the Embla Carousel Solid package. ```bash npm install embla-carousel-solid ``` -------------------------------- ### Install Slider via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/slider.mdx Use the SolidUI CLI to add the Slider component to your project. ```bash npx solidui-cli@latest add slider ``` -------------------------------- ### Install Skeleton via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/skeleton.mdx Run this command to add the Skeleton component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add skeleton ``` -------------------------------- ### Install Callout via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/callout.mdx Run this command to add the Callout component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add callout ``` -------------------------------- ### Install Combobox via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/combobox.mdx Use this command to add the combobox component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add combobox ``` -------------------------------- ### Install Alert component via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/alert.mdx Run this command to add the Alert component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add alert ``` -------------------------------- ### Install Flex via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/flex.mdx Run this command in your terminal to add the Flex component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add flex ``` -------------------------------- ### Install dropdown-menu via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/dropdown-menu.mdx Run this command to add the dropdown-menu component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add dropdown-menu ``` -------------------------------- ### Install Avatar via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/avatar.mdx Install the Avatar component using the SolidUI CLI. Run this command in your project root. ```bash npx solidui-cli@latest add avatar ``` -------------------------------- ### Install navigation-menu via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/navigation-menu.mdx Run this command to add the navigation-menu component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add navigation-menu ``` -------------------------------- ### Install Timeline via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/timeline.mdx Run this command to add the timeline component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add timeline ``` -------------------------------- ### Install Hover Card via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/hover-card.mdx Use the SolidUI CLI to add the hover-card component to your project. ```bash npx solidui-cli@latest add hover-card ``` -------------------------------- ### Pagination usage example Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/pagination.mdx Example of using the Pagination component with custom item and ellipsis components, including previous, items, and next controls. ```tsx {props.page}} ellipsisComponent={() => } > ``` -------------------------------- ### Install Accordion via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/accordion.mdx Run this command to add the accordion component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add accordion ``` -------------------------------- ### Manual installation: copy sidebar component source Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/sidebar.mdx Copy and paste the sidebar component source code into your project for manual installation. ```tsx ``` -------------------------------- ### Configure path alias in vite.config.ts Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/manual.mdx Add the resolve.alias configuration to your vite.config.ts to map '~' to './src' using Node's path module. This ensures your app can resolve paths without error. ```ts import path from "path" import solid from "@vitejs/plugin-solid" import { defineConfig } from "vite" export default defineConfig({ plugins: [solid()], resolve: { alias: { "~": path.resolve(__dirname, "./src") } } }) ``` -------------------------------- ### Install Label Component via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/label.mdx Run this command to add the Label component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add label ``` -------------------------------- ### Table Usage Example Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/table.mdx A responsive table component example showing a list of recent invoices with header and body rows. ```tsx A list of your recent invoices. Invoice Status Method Amount INV001 Paid Credit Card $250.00
``` -------------------------------- ### Install Dialog with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/dialog.mdx Use this command to add the Dialog component to your project via the Solid UI CLI. ```bash npx solidui-cli@latest add dialog ``` -------------------------------- ### Combobox usage example Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/combobox.mdx Example of a combobox with a list of fruit options, a search input, and a trigger. ```tsx const ALL_OPTIONS = ["Apple", "Banana", "Blueberry", "Grapes", "Pineapple"] ( {props.item.rawValue} )} > ``` -------------------------------- ### Install sonner via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/sonner.mdx Use the SolidUI CLI to add the sonner component to your project. ```bash npx solidui-cli@latest add sonner ``` -------------------------------- ### Install Popover via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/popover.mdx Use this command to add the Popover component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add popover ``` -------------------------------- ### Initialize project with npx solidui-cli init Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/cli.mdx Run this command to initialize configuration and dependencies for a new project. It installs dependencies, adds the cn utility, configures tailwind.config.cjs, and sets up CSS variables. It also creates a ui.config.json file where you can modify the componentDir property to change where components are stored. ```bash npx solidui-cli@latest init ``` -------------------------------- ### Define cn helper in lib/utils.ts Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/manual.mdx Add this TypeScript helper to lib/utils.ts to conditionally merge Tailwind CSS classes using clsx and tailwind-merge. It accepts any number of class values and returns the merged string. ```ts import type { ClassValue } from "clsx" import { clsx } from "clsx" import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } ``` -------------------------------- ### Add Tailwind CSS variables and base styles to app.css Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/installation/manual.mdx Add this CSS to your app.css file to set up Tailwind directives, CSS variables for theming (light and dark), base layer styles, and responsive container padding. The variables include colors for background, foreground, muted, popover, border, input, card, primary, secondary, accent, destructive, info, success, warning, error, ring, and radius. The dark theme is applied via the .dark class or [data-kb-theme="dark"] attribute. ```css @tailwind base; @tailwind components; @tailwind utilities; @layer base { :root { --background: 0 0% 100%; --foreground: 240 10% 3.9%; --muted: 240 4.8% 95.9%; --muted-foreground: 240 3.8% 46.1%; --popover: 0 0% 100%; --popover-foreground: 240 10% 3.9%; --border: 240 5.9% 90%; --input: 240 5.9% 90%; --card: 0 0% 100%; --card-foreground: 240 10% 3.9%; --primary: 240 5.9% 10%; --primary-foreground: 0 0% 98%; --secondary: 240 4.8% 95.9%; --secondary-foreground: 240 5.9% 10%; --accent: 240 4.8% 95.9%; --accent-foreground: 240 5.9% 10%; --destructive: 0 84.2% 60.2%; --destructive-foreground: 0 0% 98%; --info: 204 94% 94%; --info-foreground: 199 89% 48%; --success: 149 80% 90%; --success-foreground: 160 84% 39%; --warning: 48 96% 89%; --warning-foreground: 25 95% 53%; --error: 0 93% 94%; --error-foreground: 0 84% 60%; --ring: 240 5.9% 10%; --radius: 0.5rem; } .dark, [data-kb-theme="dark"] { --background: 240 10% 3.9%; --foreground: 0 0% 98%; --muted: 240 3.7% 15.9%; --muted-foreground: 240 5% 64.9%; --accent: 240 3.7% 15.9%; --accent-foreground: 0 0% 98%; --popover: 240 10% 3.9%; --popover-foreground: 0 0% 98%; --border: 240 3.7% 15.9%; --input: 240 3.7% 15.9%; --card: 240 10% 3.9%; --card-foreground: 0 0% 98%; --primary: 0 0% 98%; --primary-foreground: 240 5.9% 10%; --secondary: 240 3.7% 15.9%; --secondary-foreground: 0 0% 98%; --destructive: 0 62.8% 30.6%; --destructive-foreground: 0 0% 98%; --info: 204 94% 94%; --info-foreground: 199 89% 48%; --success: 149 80% 90%; --success-foreground: 160 84% 39%; --warning: 48 96% 89%; --warning-foreground: 25 95% 53%; --error: 0 93% 94%; --error-foreground: 0 84% 60%; --ring: 240 4.9% 83.9%; --radius: 0.5rem; } } @layer base { * { @apply border-border; } body { @apply bg-background text-foreground; font-feature-settings: "rlig" 1, "calt" 1; } } @media (max-width: 640px) { .container { @apply px-4; } } ``` -------------------------------- ### Install Collapsible via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/collapsible.mdx Run this command to add the collapsible component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add collapsible ``` -------------------------------- ### Install Checkbox with CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/checkbox.mdx Run this command in your terminal to add the checkbox component using the Solid UI CLI. ```bash npx solidui-cli@latest add checkbox ``` -------------------------------- ### Install Toggle Group via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/toggle-group.mdx Use the SolidUI CLI to add the toggle-group component to your project. ```bash npx solidui-cli@latest add toggle-group ``` -------------------------------- ### Basic Resizable usage Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/resizable.mdx Example of a horizontal resizable layout with two panels and a handle. ```tsx One Two ``` -------------------------------- ### Alert usage example Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/alert.mdx Basic usage of the Alert component with a title and description. ```tsx Heads up! You can add components and dependencies to your app using the cli. ``` -------------------------------- ### Install Card component via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/card.mdx Run this command in your terminal to add the Card component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add card ``` -------------------------------- ### Install carousel via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/carousel.mdx Run this command to add the carousel component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add carousel ``` -------------------------------- ### Install Button Component via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/button.mdx Use this command to add the Button component to your project with the Solid UI CLI. ```bash npx solidui-cli@latest add button ``` -------------------------------- ### Install Date Picker via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/date-picker.mdx Use this command to add the date-picker component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add date-picker ``` -------------------------------- ### Install Badge via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/badge.mdx Run this command in your terminal to add the Badge component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add badge ``` -------------------------------- ### List available components with npx solidui-cli@latest add Source: https://github.com/stefan-karger/solid-ui/blob/main/packages/cli/README.md Run the add command without arguments to view a list of all available components. ```bash npx solidui-cli@latest add ``` -------------------------------- ### Basic navigation-menu usage Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/navigation-menu.mdx Example of a basic navigation menu with a trigger, icon, content, and link. ```tsx Item one Link ``` -------------------------------- ### Flex usage example Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/flex.mdx Example of using Flex to create a flex container inside a Card component, displaying two blocks of ticket statistics. ```tsx

Tickets sold

9,876

Average Selling Price

$ 175.20

``` -------------------------------- ### Install Progress component via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/progress.mdx Run this command in your terminal to add the Progress component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add progress ``` -------------------------------- ### Install Progress Circle via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/progress-circle.mdx Run this command to add the progress-circle component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add progress-circle ``` -------------------------------- ### Install charts component via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/charts.mdx Run this command to add the charts component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add charts ``` -------------------------------- ### Install Command Component via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/command.mdx Run this command in your terminal to add the command component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add command ``` -------------------------------- ### Install Bar List via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/bar-list.mdx Run this command in your terminal to add the bar-list component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add bar-list ``` -------------------------------- ### Install Tabs component via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/tabs.mdx Run this command to add the Tabs component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add tabs ``` -------------------------------- ### Basic Drawer usage Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/drawer.mdx Example of a basic drawer with a trigger, content, header, title, description, footer, and close button. ```tsx Open Are you absolutely sure? This action cannot be undone. ``` -------------------------------- ### Callout usage example Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/callout.mdx Use the Callout component with a title and content to display a hint, disclaimer, tip, or warning. ```tsx Title Lorem ipsum dolor sit amet consectetur, adipisicing elit. Tempora cupiditate sapiente officiis ullam, nulla nam sunt? Ipsa facilis ut aspernatur debitis. Qui dolorem modi, assumenda nihil eligendi commodi tempore eos? ``` -------------------------------- ### Install Text Field via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/text-field.mdx Run this command to add the text-field component to your project using the SolidUI CLI. ```bash npx solidui-cli@latest add text-field ``` -------------------------------- ### Install Breadcrumb via CLI Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/breadcrumb.mdx Run this command to add the breadcrumb component to your project using the Solid UI CLI. ```bash npx solidui-cli@latest add breadcrumb ``` -------------------------------- ### Add a component with npx solidui-cli@latest add [component] Source: https://github.com/stefan-karger/solid-ui/blob/main/packages/cli/README.md Use this command to add a component to your project and install all required dependencies. Replace [component] with the component name. ```bash npx solidui-cli@latest add [component] ``` -------------------------------- ### Basic Collapsible usage Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/collapsible.mdx Example of a collapsible with a trigger and content. The content expands/collapses when the trigger is clicked. ```tsx Can I use this in my project? Yes. Free to use for personal and commercial projects. No attribution required. ``` -------------------------------- ### Basic Context Menu usage Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/components/context-menu.mdx Example of a context menu with a trigger and content containing label, separator, and items. ```tsx Open My Account Profile Billing Team Subscription ``` -------------------------------- ### Wrap app with ColorModeProvider and ColorModeScript Source: https://github.com/stefan-karger/solid-ui/blob/main/apps/docs/src/routes/(app)/docs/dark-mode/vite.mdx Add ColorModeProvider and ColorModeScript to app.tsx, using createLocalStorageManager to persist the theme. ```tsx import { ColorModeProvider, ColorModeScript, createLocalStorageManager } from "@kobalte/core" export default function App() { const storageManager = createLocalStorageManager("vite-ui-theme") return ( ( <>