diff --git a/apps/www/__registry__/index.tsx b/apps/www/__registry__/index.tsx index 7fcfda380b..4996505a07 100644 --- a/apps/www/__registry__/index.tsx +++ b/apps/www/__registry__/index.tsx @@ -1,9 +1,269 @@ +// @ts-nocheck // This file is autogenerated by scripts/build-registry.ts // Do not edit this file directly. import * as React from "react" export const Index: Record = { "default": { + "accordion": { + name: "accordion", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/accordion")), + files: ["registry/default/ui/accordion.tsx"], + }, + "alert": { + name: "alert", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/alert")), + files: ["registry/default/ui/alert.tsx"], + }, + "alert-dialog": { + name: "alert-dialog", + type: "components:ui", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/default/ui/alert-dialog")), + files: ["registry/default/ui/alert-dialog.tsx"], + }, + "aspect-ratio": { + name: "aspect-ratio", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/aspect-ratio")), + files: ["registry/default/ui/aspect-ratio.tsx"], + }, + "avatar": { + name: "avatar", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/avatar")), + files: ["registry/default/ui/avatar.tsx"], + }, + "badge": { + name: "badge", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/badge")), + files: ["registry/default/ui/badge.tsx"], + }, + "button": { + name: "button", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/button")), + files: ["registry/default/ui/button.tsx"], + }, + "calendar": { + name: "calendar", + type: "components:ui", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/default/ui/calendar")), + files: ["registry/default/ui/calendar.tsx"], + }, + "card": { + name: "card", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/card")), + files: ["registry/default/ui/card.tsx"], + }, + "checkbox": { + name: "checkbox", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/checkbox")), + files: ["registry/default/ui/checkbox.tsx"], + }, + "collapsible": { + name: "collapsible", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/collapsible")), + files: ["registry/default/ui/collapsible.tsx"], + }, + "command": { + name: "command", + type: "components:ui", + registryDependencies: ["dialog"], + component: React.lazy(() => import("@/registry/default/ui/command")), + files: ["registry/default/ui/command.tsx"], + }, + "context-menu": { + name: "context-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/context-menu")), + files: ["registry/default/ui/context-menu.tsx"], + }, + "dialog": { + name: "dialog", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/dialog")), + files: ["registry/default/ui/dialog.tsx"], + }, + "dropdown-menu": { + name: "dropdown-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/dropdown-menu")), + files: ["registry/default/ui/dropdown-menu.tsx"], + }, + "form": { + name: "form", + type: "components:ui", + registryDependencies: ["button","label"], + component: React.lazy(() => import("@/registry/default/ui/form")), + files: ["registry/default/ui/form.tsx"], + }, + "hover-card": { + name: "hover-card", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/hover-card")), + files: ["registry/default/ui/hover-card.tsx"], + }, + "input": { + name: "input", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/input")), + files: ["registry/default/ui/input.tsx"], + }, + "label": { + name: "label", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/label")), + files: ["registry/default/ui/label.tsx"], + }, + "menubar": { + name: "menubar", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/menubar")), + files: ["registry/default/ui/menubar.tsx"], + }, + "navigation-menu": { + name: "navigation-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/navigation-menu")), + files: ["registry/default/ui/navigation-menu.tsx"], + }, + "popover": { + name: "popover", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/popover")), + files: ["registry/default/ui/popover.tsx"], + }, + "progress": { + name: "progress", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/progress")), + files: ["registry/default/ui/progress.tsx"], + }, + "radio-group": { + name: "radio-group", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/radio-group")), + files: ["registry/default/ui/radio-group.tsx"], + }, + "scroll-area": { + name: "scroll-area", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/scroll-area")), + files: ["registry/default/ui/scroll-area.tsx"], + }, + "select": { + name: "select", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/select")), + files: ["registry/default/ui/select.tsx"], + }, + "separator": { + name: "separator", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/separator")), + files: ["registry/default/ui/separator.tsx"], + }, + "sheet": { + name: "sheet", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/sheet")), + files: ["registry/default/ui/sheet.tsx"], + }, + "skeleton": { + name: "skeleton", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/skeleton")), + files: ["registry/default/ui/skeleton.tsx"], + }, + "slider": { + name: "slider", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/slider")), + files: ["registry/default/ui/slider.tsx"], + }, + "switch": { + name: "switch", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/switch")), + files: ["registry/default/ui/switch.tsx"], + }, + "table": { + name: "table", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/table")), + files: ["registry/default/ui/table.tsx"], + }, + "tabs": { + name: "tabs", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/tabs")), + files: ["registry/default/ui/tabs.tsx"], + }, + "textarea": { + name: "textarea", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/textarea")), + files: ["registry/default/ui/textarea.tsx"], + }, + "toast": { + name: "toast", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/toast")), + files: ["registry/default/ui/toast.tsx","registry/default/ui/use-toast.ts","registry/default/ui/toaster.tsx"], + }, + "toggle": { + name: "toggle", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/toggle")), + files: ["registry/default/ui/toggle.tsx"], + }, + "tooltip": { + name: "tooltip", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/default/ui/tooltip")), + files: ["registry/default/ui/tooltip.tsx"], + }, "accordion-demo": { name: "accordion-demo", type: "components:example", @@ -747,6 +1007,265 @@ export const Index: Record = { files: ["registry/default/example/mode-toggle.tsx"], }, }, "new-york": { + "accordion": { + name: "accordion", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/accordion")), + files: ["registry/new-york/ui/accordion.tsx"], + }, + "alert": { + name: "alert", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/alert")), + files: ["registry/new-york/ui/alert.tsx"], + }, + "alert-dialog": { + name: "alert-dialog", + type: "components:ui", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/new-york/ui/alert-dialog")), + files: ["registry/new-york/ui/alert-dialog.tsx"], + }, + "aspect-ratio": { + name: "aspect-ratio", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/aspect-ratio")), + files: ["registry/new-york/ui/aspect-ratio.tsx"], + }, + "avatar": { + name: "avatar", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/avatar")), + files: ["registry/new-york/ui/avatar.tsx"], + }, + "badge": { + name: "badge", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/badge")), + files: ["registry/new-york/ui/badge.tsx"], + }, + "button": { + name: "button", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/button")), + files: ["registry/new-york/ui/button.tsx"], + }, + "calendar": { + name: "calendar", + type: "components:ui", + registryDependencies: ["button"], + component: React.lazy(() => import("@/registry/new-york/ui/calendar")), + files: ["registry/new-york/ui/calendar.tsx"], + }, + "card": { + name: "card", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/card")), + files: ["registry/new-york/ui/card.tsx"], + }, + "checkbox": { + name: "checkbox", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/checkbox")), + files: ["registry/new-york/ui/checkbox.tsx"], + }, + "collapsible": { + name: "collapsible", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/collapsible")), + files: ["registry/new-york/ui/collapsible.tsx"], + }, + "command": { + name: "command", + type: "components:ui", + registryDependencies: ["dialog"], + component: React.lazy(() => import("@/registry/new-york/ui/command")), + files: ["registry/new-york/ui/command.tsx"], + }, + "context-menu": { + name: "context-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/context-menu")), + files: ["registry/new-york/ui/context-menu.tsx"], + }, + "dialog": { + name: "dialog", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/dialog")), + files: ["registry/new-york/ui/dialog.tsx"], + }, + "dropdown-menu": { + name: "dropdown-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/dropdown-menu")), + files: ["registry/new-york/ui/dropdown-menu.tsx"], + }, + "form": { + name: "form", + type: "components:ui", + registryDependencies: ["button","label"], + component: React.lazy(() => import("@/registry/new-york/ui/form")), + files: ["registry/new-york/ui/form.tsx"], + }, + "hover-card": { + name: "hover-card", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/hover-card")), + files: ["registry/new-york/ui/hover-card.tsx"], + }, + "input": { + name: "input", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/input")), + files: ["registry/new-york/ui/input.tsx"], + }, + "label": { + name: "label", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/label")), + files: ["registry/new-york/ui/label.tsx"], + }, + "menubar": { + name: "menubar", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/menubar")), + files: ["registry/new-york/ui/menubar.tsx"], + }, + "navigation-menu": { + name: "navigation-menu", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/navigation-menu")), + files: ["registry/new-york/ui/navigation-menu.tsx"], + }, + "popover": { + name: "popover", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/popover")), + files: ["registry/new-york/ui/popover.tsx"], + }, + "progress": { + name: "progress", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/progress")), + files: ["registry/new-york/ui/progress.tsx"], + }, + "radio-group": { + name: "radio-group", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/radio-group")), + files: ["registry/new-york/ui/radio-group.tsx"], + }, + "scroll-area": { + name: "scroll-area", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/scroll-area")), + files: ["registry/new-york/ui/scroll-area.tsx"], + }, + "select": { + name: "select", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/select")), + files: ["registry/new-york/ui/select.tsx"], + }, + "separator": { + name: "separator", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/separator")), + files: ["registry/new-york/ui/separator.tsx"], + }, + "sheet": { + name: "sheet", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/sheet")), + files: ["registry/new-york/ui/sheet.tsx"], + }, + "skeleton": { + name: "skeleton", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/skeleton")), + files: ["registry/new-york/ui/skeleton.tsx"], + }, + "slider": { + name: "slider", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/slider")), + files: ["registry/new-york/ui/slider.tsx"], + }, + "switch": { + name: "switch", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/switch")), + files: ["registry/new-york/ui/switch.tsx"], + }, + "table": { + name: "table", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/table")), + files: ["registry/new-york/ui/table.tsx"], + }, + "tabs": { + name: "tabs", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/tabs")), + files: ["registry/new-york/ui/tabs.tsx"], + }, + "textarea": { + name: "textarea", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/textarea")), + files: ["registry/new-york/ui/textarea.tsx"], + }, + "toast": { + name: "toast", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/toast")), + files: ["registry/new-york/ui/toast.tsx","registry/new-york/ui/use-toast.ts","registry/new-york/ui/toaster.tsx"], + }, + "toggle": { + name: "toggle", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/toggle")), + files: ["registry/new-york/ui/toggle.tsx"], + }, + "tooltip": { + name: "tooltip", + type: "components:ui", + registryDependencies: undefined, + component: React.lazy(() => import("@/registry/new-york/ui/tooltip")), + files: ["registry/new-york/ui/tooltip.tsx"], + }, "accordion-demo": { name: "accordion-demo", type: "components:example", diff --git a/apps/www/components/code-block-wrapper.tsx b/apps/www/components/code-block-wrapper.tsx index bb5fd27f11..1f961adf3c 100644 --- a/apps/www/components/code-block-wrapper.tsx +++ b/apps/www/components/code-block-wrapper.tsx @@ -40,7 +40,7 @@ export function CodeBlockWrapper({
diff --git a/apps/www/components/component-source.tsx b/apps/www/components/component-source.tsx index 70d4bb13af..31150384c0 100644 --- a/apps/www/components/component-source.tsx +++ b/apps/www/components/component-source.tsx @@ -9,7 +9,11 @@ interface ComponentSourceProps extends React.HTMLAttributes { src: string } -export function ComponentSource({ children, className }: ComponentSourceProps) { +export function ComponentSource({ + children, + className, + ...props +}: ComponentSourceProps) { return ( & { + __style__?: Style["name"] __rawString__?: string __withMeta__?: boolean __src__?: string __event__?: Event["name"] } & NpmCommands) => { return ( - <> +
         )}
-      
+      
     )
   },
   code: ({ className, ...props }: React.HTMLAttributes) => (
@@ -219,12 +230,60 @@ const components = {
   CodeBlockWrapper: ({ ...props }) => (
     
   ),
+  Step: ({ className, ...props }: React.ComponentProps<"h3">) => (
+    

+ ), Steps: ({ ...props }) => (
), + Tabs: ({ className, ...props }: React.ComponentProps) => ( + + ), + TabsList: ({ + className, + ...props + }: React.ComponentProps) => ( + + ), + TabsTrigger: ({ + className, + ...props + }: React.ComponentProps) => ( + + ), + TabsContent: ({ + className, + ...props + }: React.ComponentProps) => ( + + ), } interface MdxProps { @@ -232,7 +291,10 @@ interface MdxProps { } export function Mdx({ code }: MdxProps) { - const Component = useMDXComponent(code) + const [config] = useConfig() + const Component = useMDXComponent(code, { + style: config.style, + }) return (
diff --git a/apps/www/components/style-wrapper.tsx b/apps/www/components/style-wrapper.tsx new file mode 100644 index 0000000000..c53352fffb --- /dev/null +++ b/apps/www/components/style-wrapper.tsx @@ -0,0 +1,20 @@ +"use client" + +import * as React from "react" + +import { useConfig } from "@/hooks/use-config" +import { Style } from "@/registry/styles" + +interface StyleWrapperProps extends React.HTMLAttributes { + styleName?: Style["name"] +} + +export function StyleWrapper({ styleName, children }: StyleWrapperProps) { + const [config] = useConfig() + + if (!styleName || config.style === styleName) { + return <>{children} + } + + return null +} diff --git a/apps/www/content/docs/components/accordion.mdx b/apps/www/content/docs/components/accordion.mdx index 5f7bf9ed07..3542dfbe5a 100644 --- a/apps/www/content/docs/components/accordion.mdx +++ b/apps/www/content/docs/components/accordion.mdx @@ -14,15 +14,24 @@ radix: ## Installation + + + + CLI + Manual + + + + -### Command +Run the following command: ```bash npx shadcn-ui@latest add accordion ``` -### tailwind.config.js +Update `tailwind.config.js` Add the following animations to your `tailwind.config.js` file: @@ -50,7 +59,55 @@ module.exports = { } ``` -### Usage + + + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + +Update `tailwind.config.js` + +Add the following animations to your `tailwind.config.js` file: + +```js title="tailwind.config.js" {5-18} +/** @type {import('tailwindcss').Config} */ +module.exports = { + theme: { + extend: { + keyframes: { + "accordion-down": { + from: { height: 0 }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: 0 }, + }, + }, + animation: { + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + }, + }, + }, +} +``` + + + + + + + +## Usage ```tsx import { @@ -71,5 +128,3 @@ import { ``` - - diff --git a/apps/www/content/docs/components/alert-dialog.mdx b/apps/www/content/docs/components/alert-dialog.mdx index 0467c2fea3..eb191ff687 100644 --- a/apps/www/content/docs/components/alert-dialog.mdx +++ b/apps/www/content/docs/components/alert-dialog.mdx @@ -12,15 +12,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add alert-dialog ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -54,5 +76,3 @@ import { ``` - - diff --git a/apps/www/content/docs/components/alert.mdx b/apps/www/content/docs/components/alert.mdx index 8356aad070..e3e55effc8 100644 --- a/apps/www/content/docs/components/alert.mdx +++ b/apps/www/content/docs/components/alert.mdx @@ -8,15 +8,37 @@ component: true ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add alert ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert" @@ -32,8 +54,6 @@ import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert" ``` - - ## Examples ### Default diff --git a/apps/www/content/docs/components/aspect-ratio.mdx b/apps/www/content/docs/components/aspect-ratio.mdx index 6d14e24450..773238adfc 100644 --- a/apps/www/content/docs/components/aspect-ratio.mdx +++ b/apps/www/content/docs/components/aspect-ratio.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add aspect-ratio ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import Image from "next/image" @@ -38,5 +60,3 @@ import { AspectRatio } from "@/components/ui/aspect-ratio"
``` - - diff --git a/apps/www/content/docs/components/avatar.mdx b/apps/www/content/docs/components/avatar.mdx index aed1c49ec4..5eec3019c1 100644 --- a/apps/www/content/docs/components/avatar.mdx +++ b/apps/www/content/docs/components/avatar.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add avatar ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" @@ -31,5 +53,3 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" CN ``` - - diff --git a/apps/www/content/docs/components/badge.mdx b/apps/www/content/docs/components/badge.mdx index 5129f94ef2..1786bdd672 100644 --- a/apps/www/content/docs/components/badge.mdx +++ b/apps/www/content/docs/components/badge.mdx @@ -8,15 +8,37 @@ component: true ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add badge ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Badge } from "@/components/ui/badge" @@ -26,8 +48,6 @@ import { Badge } from "@/components/ui/badge" Badge ``` - - ### Link You can use the `badgeVariants` helper to create a link that looks like a badge. diff --git a/apps/www/content/docs/components/button.mdx b/apps/www/content/docs/components/button.mdx index 48f1d08131..d61ac4c168 100644 --- a/apps/www/content/docs/components/button.mdx +++ b/apps/www/content/docs/components/button.mdx @@ -9,15 +9,37 @@ component: true ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add button ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Button } from "@/components/ui/button" @@ -27,9 +49,7 @@ import { Button } from "@/components/ui/button" ``` - - -### Link +## Link You can use the `buttonVariants` helper to create a link that looks like a button. diff --git a/apps/www/content/docs/components/calendar.mdx b/apps/www/content/docs/components/calendar.mdx index fec63d710b..146c5caab9 100644 --- a/apps/www/content/docs/components/calendar.mdx +++ b/apps/www/content/docs/components/calendar.mdx @@ -12,15 +12,37 @@ The `Calendar` component is built on top of [React DayPicker](https://react-day- ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add calendar ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Calendar } from "@/components/ui/calendar" @@ -41,8 +63,6 @@ return ( See the [React DayPicker](https://react-day-picker.js.org) documentation for more information. - - ## Date Picker You can use the `` component to build a date picker. See the [Date Picker](/docs/components/date-picker) page for more information. diff --git a/apps/www/content/docs/components/card.mdx b/apps/www/content/docs/components/card.mdx index eda4d05abe..d4c1309e0d 100644 --- a/apps/www/content/docs/components/card.mdx +++ b/apps/www/content/docs/components/card.mdx @@ -4,19 +4,41 @@ description: Displays a card with header, content, and footer. component: true --- - + ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add card ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -44,8 +66,6 @@ import { ``` - - ## Examples - + diff --git a/apps/www/content/docs/components/checkbox.mdx b/apps/www/content/docs/components/checkbox.mdx index 163fcdeea5..da8f30a75f 100644 --- a/apps/www/content/docs/components/checkbox.mdx +++ b/apps/www/content/docs/components/checkbox.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add checkbox ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Checkbox } from "@/components/ui/checkbox" @@ -29,8 +51,6 @@ import { Checkbox } from "@/components/ui/checkbox" ``` - - ## Examples ### With text @@ -39,7 +59,7 @@ import { Checkbox } from "@/components/ui/checkbox" ### Disabled - + ### Form diff --git a/apps/www/content/docs/components/collapsible.mdx b/apps/www/content/docs/components/collapsible.mdx index 25806632bc..2e9ce76e81 100644 --- a/apps/www/content/docs/components/collapsible.mdx +++ b/apps/www/content/docs/components/collapsible.mdx @@ -12,15 +12,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add collapsible ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -39,5 +61,3 @@ import { ``` - - diff --git a/apps/www/content/docs/components/combobox.mdx b/apps/www/content/docs/components/combobox.mdx index 5f727cf0ca..7f8b537f21 100644 --- a/apps/www/content/docs/components/combobox.mdx +++ b/apps/www/content/docs/components/combobox.mdx @@ -8,13 +8,11 @@ component: true ## Installation - +The Combobox is built using a composition of the `` and the `` components. -### About +See installation instructions for the [Popover](/docs/components/popover#installation) and the [Command](/docs/components/command#installation) components. -The Combobox is built using a composition of the `` and the `` components. See installation instructions for the [Popover](/docs/components/popover#installation) and the [Command](/docs/components/command#installation) components. - -### Usage +## Usage ```tsx "use client" @@ -109,8 +107,6 @@ export function ComboboxDemo() { } ``` - - ## Examples ### Combobox diff --git a/apps/www/content/docs/components/command.mdx b/apps/www/content/docs/components/command.mdx index 83a491f6d9..6ca274186b 100644 --- a/apps/www/content/docs/components/command.mdx +++ b/apps/www/content/docs/components/command.mdx @@ -16,15 +16,37 @@ The `` component uses the [`cmdk`](https://cmdk.paco.me) component by ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add command ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -59,10 +81,6 @@ import { ``` - - ---- - ## Examples ### Dialog diff --git a/apps/www/content/docs/components/context-menu.mdx b/apps/www/content/docs/components/context-menu.mdx index cfcb18e373..ef2bb995f6 100644 --- a/apps/www/content/docs/components/context-menu.mdx +++ b/apps/www/content/docs/components/context-menu.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add context-menu ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -41,5 +63,3 @@ import { ``` - - diff --git a/apps/www/content/docs/components/date-picker.mdx b/apps/www/content/docs/components/date-picker.mdx index 2ff8f6c241..040dbf8959 100644 --- a/apps/www/content/docs/components/date-picker.mdx +++ b/apps/www/content/docs/components/date-picker.mdx @@ -8,11 +8,9 @@ component: true ## Installation - +The Date Picker is built using a composition of the `` and the `` components. -### About - -The Date Picker is built using a composition of the `` and the `` components. See installation instructions for the [Popover](/docs/components/popover#installation) and the [Calendar](/docs/components/calendar#installation) components. +See installation instructions for the [Popover](/docs/components/popover#installation) and the [Calendar](/docs/components/calendar#installation) components. ## Usage @@ -64,8 +62,6 @@ export function DatePickerDemo() { See the [React DayPicker](https://react-day-picker.js.org) documentation for more information. - - ## Examples ### Date Picker diff --git a/apps/www/content/docs/components/dialog.mdx b/apps/www/content/docs/components/dialog.mdx index d4c5b97e12..1f35039431 100644 --- a/apps/www/content/docs/components/dialog.mdx +++ b/apps/www/content/docs/components/dialog.mdx @@ -12,15 +12,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add dialog ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -48,10 +70,6 @@ import { ``` - - ---- - ## Notes To activate the `Dialog` component from within a `Context Menu` or `Dropdown Menu`, you must encase the `Context Menu` or diff --git a/apps/www/content/docs/components/dropdown-menu.mdx b/apps/www/content/docs/components/dropdown-menu.mdx index b6f59bef78..ff8730d196 100644 --- a/apps/www/content/docs/components/dropdown-menu.mdx +++ b/apps/www/content/docs/components/dropdown-menu.mdx @@ -12,15 +12,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add dropdown-menu ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -47,10 +69,6 @@ import { ``` - - ---- - ## Examples ### Checkboxes diff --git a/apps/www/content/docs/components/hover-card.mdx b/apps/www/content/docs/components/hover-card.mdx index ae7d23063b..0273ec8bf7 100644 --- a/apps/www/content/docs/components/hover-card.mdx +++ b/apps/www/content/docs/components/hover-card.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add hover-card ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -37,5 +59,3 @@ import { ``` - - diff --git a/apps/www/content/docs/components/input.mdx b/apps/www/content/docs/components/input.mdx index 2e22bd8fc6..af4bdfbaef 100644 --- a/apps/www/content/docs/components/input.mdx +++ b/apps/www/content/docs/components/input.mdx @@ -8,15 +8,37 @@ component: true ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add input ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Input } from "@/components/ui/input" @@ -26,10 +48,6 @@ import { Input } from "@/components/ui/input" ``` - - ---- - ## Examples ### Default diff --git a/apps/www/content/docs/components/label.mdx b/apps/www/content/docs/components/label.mdx index 477f84ca75..c95d9c779f 100644 --- a/apps/www/content/docs/components/label.mdx +++ b/apps/www/content/docs/components/label.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add label ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Label } from "@/components/ui/label" @@ -28,5 +50,3 @@ import { Label } from "@/components/ui/label" ```tsx ``` - - diff --git a/apps/www/content/docs/components/menubar.mdx b/apps/www/content/docs/components/menubar.mdx index d8a0fa7cc7..a7625d4a40 100644 --- a/apps/www/content/docs/components/menubar.mdx +++ b/apps/www/content/docs/components/menubar.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add menubar ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -50,5 +72,3 @@ import { ``` - - diff --git a/apps/www/content/docs/components/navigation-menu.mdx b/apps/www/content/docs/components/navigation-menu.mdx index 6760035a8e..f801077fd6 100644 --- a/apps/www/content/docs/components/navigation-menu.mdx +++ b/apps/www/content/docs/components/navigation-menu.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add navigation-menu ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -47,8 +69,6 @@ import { ``` - - ## Examples ### Link Component diff --git a/apps/www/content/docs/components/popover.mdx b/apps/www/content/docs/components/popover.mdx index 816f46d3ef..26cb2649a2 100644 --- a/apps/www/content/docs/components/popover.mdx +++ b/apps/www/content/docs/components/popover.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add popover ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -35,5 +57,3 @@ import { Place content for the popover here. ``` - - diff --git a/apps/www/content/docs/components/progress.mdx b/apps/www/content/docs/components/progress.mdx index 7a129a546d..f362f0b811 100644 --- a/apps/www/content/docs/components/progress.mdx +++ b/apps/www/content/docs/components/progress.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add progress ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Progress } from "@/components/ui/progress" @@ -28,5 +50,3 @@ import { Progress } from "@/components/ui/progress" ```tsx ``` - - diff --git a/apps/www/content/docs/components/radio-group.mdx b/apps/www/content/docs/components/radio-group.mdx index 8ae1da9650..ba1530f4c1 100644 --- a/apps/www/content/docs/components/radio-group.mdx +++ b/apps/www/content/docs/components/radio-group.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add radio-group ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Label } from "@/components/ui/label" @@ -39,8 +61,6 @@ import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group" ``` - - ## Examples ### Form diff --git a/apps/www/content/docs/components/scroll-area.mdx b/apps/www/content/docs/components/scroll-area.mdx index 02951eeeff..5120e9e66b 100644 --- a/apps/www/content/docs/components/scroll-area.mdx +++ b/apps/www/content/docs/components/scroll-area.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add scroll-area ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { ScrollArea } from "@/components/ui/scroll-area" @@ -35,5 +57,3 @@ import { ScrollArea } from "@/components/ui/scroll-area" started laughing, they couldn't stop. ``` - - diff --git a/apps/www/content/docs/components/select.mdx b/apps/www/content/docs/components/select.mdx index bc8433890c..2ada78957d 100644 --- a/apps/www/content/docs/components/select.mdx +++ b/apps/www/content/docs/components/select.mdx @@ -12,15 +12,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add select ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -45,10 +67,6 @@ import { ``` - - ---- - ## Examples ### Form diff --git a/apps/www/content/docs/components/separator.mdx b/apps/www/content/docs/components/separator.mdx index 8c83944e15..87e7123e60 100644 --- a/apps/www/content/docs/components/separator.mdx +++ b/apps/www/content/docs/components/separator.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### CommandMenu + + CLI + Manual + + ```bash npx shadcn-ui@latest add separator ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Separator } from "@/components/ui/separator" @@ -28,5 +50,3 @@ import { Separator } from "@/components/ui/separator" ```tsx ``` - - diff --git a/apps/www/content/docs/components/sheet.mdx b/apps/www/content/docs/components/sheet.mdx index c91b5c2d61..ccadaca7df 100644 --- a/apps/www/content/docs/components/sheet.mdx +++ b/apps/www/content/docs/components/sheet.mdx @@ -11,14 +11,36 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add sheet ``` + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + ### Usage ```tsx @@ -47,10 +69,6 @@ import { ``` - - ---- - ## Examples ### Side diff --git a/apps/www/content/docs/components/skeleton.mdx b/apps/www/content/docs/components/skeleton.mdx index deb856aa9b..c44b401ffd 100644 --- a/apps/www/content/docs/components/skeleton.mdx +++ b/apps/www/content/docs/components/skeleton.mdx @@ -8,15 +8,41 @@ component: true ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add skeleton ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +```bash +npx shadcn-ui@latest add skeleton +``` + +## Usage ```tsx import { Skeleton } from "@/components/ui/skeleton" @@ -25,5 +51,3 @@ import { Skeleton } from "@/components/ui/skeleton" ```tsx ``` - - diff --git a/apps/www/content/docs/components/slider.mdx b/apps/www/content/docs/components/slider.mdx index 95bdc325ed..2900c15b64 100644 --- a/apps/www/content/docs/components/slider.mdx +++ b/apps/www/content/docs/components/slider.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add slider ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Slider } from "@/components/ui/slider" @@ -28,5 +50,3 @@ import { Slider } from "@/components/ui/slider" ```tsx ``` - - diff --git a/apps/www/content/docs/components/switch.mdx b/apps/www/content/docs/components/switch.mdx index bf0838d43e..2bad0bc164 100644 --- a/apps/www/content/docs/components/switch.mdx +++ b/apps/www/content/docs/components/switch.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add switch ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Switch } from "@/components/ui/switch" @@ -29,8 +51,6 @@ import { Switch } from "@/components/ui/switch" ``` - - ## Examples ### Form diff --git a/apps/www/content/docs/components/table.mdx b/apps/www/content/docs/components/table.mdx index d854ec194e..64b3f0e0ed 100644 --- a/apps/www/content/docs/components/table.mdx +++ b/apps/www/content/docs/components/table.mdx @@ -8,15 +8,37 @@ component: true ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add table ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { @@ -52,8 +74,6 @@ import { ``` - - ## Data Table You can use the `` component to build more complex data tables. Combine it with [@tanstack/react-table](https://tanstack.com/table/v8) to create tables with sorting, filtering and pagination. diff --git a/apps/www/content/docs/components/tabs.mdx b/apps/www/content/docs/components/tabs.mdx index fc3247fd8b..8cbaa1e2b5 100644 --- a/apps/www/content/docs/components/tabs.mdx +++ b/apps/www/content/docs/components/tabs.mdx @@ -11,15 +11,37 @@ radix: ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add tabs ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" @@ -35,5 +57,3 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" Change your password here. ``` - - diff --git a/apps/www/content/docs/components/textarea.mdx b/apps/www/content/docs/components/textarea.mdx index 6847db4294..bafe12436c 100644 --- a/apps/www/content/docs/components/textarea.mdx +++ b/apps/www/content/docs/components/textarea.mdx @@ -8,15 +8,37 @@ component: true ## Installation - + -### Command + + CLI + Manual + + ```bash npx shadcn-ui@latest add textarea ``` -### Usage + + + + + + +Copy and paste the following code into your project. + + + +Update the import paths to match your project setup. + + + + + + + +## Usage ```tsx import { Textarea } from "@/components/ui/textarea" @@ -26,8 +48,6 @@ import { Textarea } from "@/components/ui/textarea"