diff --git a/apps/www/app/(app)/docs/[[...slug]]/page.tsx b/apps/www/app/(app)/docs/[[...slug]]/page.tsx
index d33ce0523..824de6563 100644
--- a/apps/www/app/(app)/docs/[[...slug]]/page.tsx
+++ b/apps/www/app/(app)/docs/[[...slug]]/page.tsx
@@ -11,6 +11,7 @@ import { siteConfig } from "@/config/site"
import { getTableOfContents } from "@/lib/toc"
import { absoluteUrl, cn } from "@/lib/utils"
import { Mdx } from "@/components/mdx-components"
+import { OpenInV0Cta } from "@/components/open-in-v0-cta"
import { DocsPager } from "@/components/pager"
import { DashboardTableOfContents } from "@/components/toc"
import { badgeVariants } from "@/registry/new-york/ui/badge"
@@ -135,17 +136,14 @@ export default async function DocPage({ params }: DocPageProps) {
- {doc.toc && (
-
-
-
-
-
-
-
-
+
+
+
+ {doc.toc && }
+
+
- )}
+
)
}
diff --git a/apps/www/components/open-in-v0-cta.tsx b/apps/www/components/open-in-v0-cta.tsx
new file mode 100644
index 000000000..5ad3c5d43
--- /dev/null
+++ b/apps/www/components/open-in-v0-cta.tsx
@@ -0,0 +1,35 @@
+import Link from "next/link"
+
+import { cn } from "@/lib/utils"
+import { Button } from "@/registry/new-york/ui/button"
+
+export function OpenInV0Cta({ className }: React.ComponentProps<"div">) {
+ return (
+
+
+ Bring your app built with shadcn to life on Vercel
+
+
Trusted by OpenAI, Sonos, Chick-fil-A, and more.
+
+ Vercel provides tools and infrastructure to deploy apps and features at
+ scale.
+
+
+
+ Deploy to Vercel
+
+
+ )
+}
diff --git a/apps/www/components/toc.tsx b/apps/www/components/toc.tsx
index 29838f03b..ffbd5b2f7 100644
--- a/apps/www/components/toc.tsx
+++ b/apps/www/components/toc.tsx
@@ -26,7 +26,7 @@ export function DashboardTableOfContents({ toc }: TocProps) {
const activeHeading = useActiveItem(itemIds)
const mounted = useMounted()
- if (!toc?.items || !mounted) {
+ if (!toc?.items?.length) {
return null
}
diff --git a/apps/www/config/docs.ts b/apps/www/config/docs.ts
index 48df75f2f..aa4ebcc0b 100644
--- a/apps/www/config/docs.ts
+++ b/apps/www/config/docs.ts
@@ -77,6 +77,12 @@ export const docsConfig: DocsConfig = {
href: "/docs/components/typography",
items: [],
},
+ {
+ title: "Open in v0",
+ href: "/docs/v0",
+ items: [],
+ label: "New",
+ },
{
title: "Figma",
href: "/docs/figma",
diff --git a/apps/www/content/docs/v0.mdx b/apps/www/content/docs/v0.mdx
new file mode 100644
index 000000000..9d6273870
--- /dev/null
+++ b/apps/www/content/docs/v0.mdx
@@ -0,0 +1,30 @@
+---
+title: Open in v0
+description: Open components in v0 for customization.
+---
+
+Every component on ui.shadcn.com is editable on [v0 by Vercel](https://v0.dev). This allows you to easily customize the components in natural language and paste into your app.
+
+
+
+
+ Open in v0
+
+
+To use v0, sign-up for a freeĀ [Vercel account here](https://vercel.com/signup?utm_source=shad&utm_medium=web&utm_campaign=docs_cta_signup). In addition to v0, this gives you free access to Vercel's frontend cloud platform by the creators of Next.js, where you can deploy and host your project for free.
+
+Learn more about getting started with [Vercel here](https://vercel.com/docs/getting-started-with-vercel?utm_source=shadcn_site&utm_medium=web&utm_campaign=docs_cta_about_vercel).
+
+Learn more about getting started with [v0 here](https://v0.dev/faq).
diff --git a/apps/www/public/images/open-in-v0-dark.png b/apps/www/public/images/open-in-v0-dark.png
new file mode 100644
index 000000000..7d221046c
Binary files /dev/null and b/apps/www/public/images/open-in-v0-dark.png differ
diff --git a/apps/www/public/images/open-in-v0.png b/apps/www/public/images/open-in-v0.png
new file mode 100644
index 000000000..5746e7e2b
Binary files /dev/null and b/apps/www/public/images/open-in-v0.png differ
diff --git a/packages/shadcn/test/utils/schema/__snapshots__/registry-resolve-items-tree.test.ts.snap b/packages/shadcn/test/utils/schema/__snapshots__/registry-resolve-items-tree.test.ts.snap
index 5c734cd98..2ea9442db 100644
--- a/packages/shadcn/test/utils/schema/__snapshots__/registry-resolve-items-tree.test.ts.snap
+++ b/packages/shadcn/test/utils/schema/__snapshots__/registry-resolve-items-tree.test.ts.snap
@@ -12,11 +12,9 @@ exports[`registryResolveItemTree > should resolve index 1`] = `
"tailwindcss-animate",
"class-variance-authority",
"lucide-react",
- "",
"tailwindcss-animate",
"class-variance-authority",
"lucide-react",
- "",
"@radix-ui/react-label",
"clsx",
"tailwind-merge",