repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-lock-body.ts | deprecated/www/hooks/use-lock-body.ts | import * as React from "react"
// @see https://usehooks.com/useLockBodyScroll.
export function useLockBody() {
React.useLayoutEffect((): (() => void) => {
const originalStyle: string = window.getComputedStyle(
document.body
).overflow
document.body.style.overflow = "hidden"
return () => (docume... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-themes-config.ts | deprecated/www/hooks/use-themes-config.ts | import { useAtom } from "jotai"
import { atomWithStorage } from "jotai/utils"
import { THEMES, Theme } from "@/lib/themes"
type ThemesConfig = {
activeTheme: Theme
}
const configAtom = atomWithStorage<ThemesConfig>("themes:config2", {
activeTheme: THEMES[0],
})
export function useThemesConfig() {
const [theme... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-meta-color.ts | deprecated/www/hooks/use-meta-color.ts | import * as React from "react"
import { useTheme } from "next-themes"
import { META_THEME_COLORS } from "@/config/site"
export function useMetaColor() {
const { resolvedTheme } = useTheme()
const metaColor = React.useMemo(() => {
return resolvedTheme !== "dark"
? META_THEME_COLORS.light
: META_TH... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-copy-to-clipboard.ts | deprecated/www/hooks/use-copy-to-clipboard.ts | "use client"
import * as React from "react"
export function useCopyToClipboard({
timeout = 2000,
onCopy,
}: {
timeout?: number
onCopy?: () => void
} = {}) {
const [isCopied, setIsCopied] = React.useState(false)
const copyToClipboard = (value: string) => {
if (typeof window === "undefined" || !navigat... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-project.ts | deprecated/www/hooks/use-project.ts | "use client"
import * as React from "react"
import { useAtom } from "jotai"
import { atomWithStorage } from "jotai/utils"
type Project = {
blocks: string[]
}
const projectAtom = atomWithStorage<Project>("project", {
blocks: [],
})
export function useProject() {
const [isAdded, setIsAdded] = React.useState(fal... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-media-query.tsx | deprecated/www/hooks/use-media-query.tsx | import * as React from "react"
export function useMediaQuery(query: string) {
const [value, setValue] = React.useState(false)
React.useEffect(() => {
function onChange(event: MediaQueryListEvent) {
setValue(event.matches)
}
const result = matchMedia(query)
result.addEventListener("change", ... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-colors.ts | deprecated/www/hooks/use-colors.ts | import { useAtom } from "jotai"
import { atomWithStorage } from "jotai/utils"
import { ColorFormat } from "@/lib/colors"
import { useMounted } from "@/hooks/use-mounted"
type Config = {
format: ColorFormat
}
const colorsAtom = atomWithStorage<Config>("colors", {
format: "hsl",
})
export function useColors() {
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-mounted.ts | deprecated/www/hooks/use-mounted.ts | import * as React from "react"
export function useMounted() {
const [mounted, setMounted] = React.useState(false)
React.useEffect(() => {
setMounted(true)
}, [])
return mounted
}
| typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-lift-mode.ts | deprecated/www/hooks/use-lift-mode.ts | import { useAtom } from "jotai"
import { atomWithStorage } from "jotai/utils"
const configAtom = atomWithStorage<string[]>("lift-mode", [])
export function useLiftMode(name: string) {
const [chunks, setChunks] = useAtom(configAtom)
function toggleLiftMode(name: string) {
setChunks((prev) => {
return pr... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/hooks/use-mutation-observer.ts | deprecated/www/hooks/use-mutation-observer.ts | import * as React from "react"
export const useMutationObserver = (
ref: React.MutableRefObject<HTMLElement | null>,
callback: MutationCallback,
options = {
attributes: true,
characterData: true,
childList: true,
subtree: true,
}
) => {
React.useEffect(() => {
if (ref.current) {
con... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/pages/api/components.ts | deprecated/www/pages/api/components.ts | import { NextApiRequest, NextApiResponse } from "next"
import components from "./components.json"
export default async function handler(
req: NextApiRequest,
res: NextApiResponse
) {
if (req.method !== "GET") {
return res.status(405).end()
}
return res.status(200).json(components)
}
| typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/callout.tsx | deprecated/www/components/callout.tsx | import { cn } from "@/lib/utils"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/registry/new-york/ui/alert"
export function Callout({
title,
children,
icon,
className,
...props
}: React.ComponentProps<typeof Alert> & { icon?: string }) {
return (
<Alert className={cn("bg-muted/50", class... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/providers.tsx | deprecated/www/components/providers.tsx | "use client"
import * as React from "react"
import { Provider as JotaiProvider } from "jotai"
import { ThemeProvider as NextThemesProvider } from "next-themes"
import { TooltipProvider } from "@/registry/new-york/ui/tooltip"
export function ThemeProvider({
children,
...props
}: React.ComponentProps<typeof NextTh... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/framework-docs.tsx | deprecated/www/components/framework-docs.tsx | "use client"
import * as React from "react"
import { allDocs } from "contentlayer/generated"
import { Mdx } from "./mdx-components"
interface FrameworkDocsProps extends React.HTMLAttributes<HTMLDivElement> {
data: string
}
export function FrameworkDocs({ ...props }: FrameworkDocsProps) {
const frameworkDoc = al... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/blocks-nav.tsx | deprecated/www/components/blocks-nav.tsx | "use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { ScrollArea, ScrollBar } from "@/registry/new-york/ui/scroll-area"
import { registryCategories } from "@/registry/registry-categories"
export function BlocksNav() {
const pathname = usePathname()
return (
<div cl... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/color-format-selector.tsx | deprecated/www/components/color-format-selector.tsx | "use client"
import * as React from "react"
import { getColorFormat, type Color } from "@/lib/colors"
import { cn } from "@/lib/utils"
import { useColors } from "@/hooks/use-colors"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/registry/new-york/ui/select"
import { Skelet... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/mode-toggle.tsx | deprecated/www/components/mode-toggle.tsx | "use client"
import * as React from "react"
import { MoonIcon, SunIcon } from "lucide-react"
import { useTheme } from "next-themes"
import { Button } from "@/registry/new-york/ui/button"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/registry/new-york/ui/dropdown-... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/mode-switcher.tsx | deprecated/www/components/mode-switcher.tsx | "use client"
import * as React from "react"
import { MoonIcon, SunIcon } from "lucide-react"
import { useTheme } from "next-themes"
import { META_THEME_COLORS } from "@/config/site"
import { useMetaColor } from "@/hooks/use-meta-color"
import { Button } from "@/registry/new-york/ui/button"
export function ModeSwitch... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/mdx-components.tsx | deprecated/www/components/mdx-components.tsx | // @ts-nocheck
"use client"
import * as React from "react"
import Image from "next/image"
import Link from "next/link"
import { useMDXComponent } from "next-contentlayer2/hooks"
import { NpmCommands } from "types/unist"
import { Event } from "@/lib/events"
import { cn } from "@/lib/utils"
import { useConfig } from "@... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/command-menu.tsx | deprecated/www/components/command-menu.tsx | "use client"
import * as React from "react"
import { useRouter } from "next/navigation"
import { type DialogProps } from "@radix-ui/react-dialog"
import { Circle, File, Laptop, Moon, Sun } from "lucide-react"
import { useTheme } from "next-themes"
import { docsConfig } from "@/config/docs"
import { cn } from "@/lib/u... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/code-block-command.tsx | deprecated/www/components/code-block-command.tsx | "use client"
import * as React from "react"
import { CheckIcon, ClipboardIcon } from "lucide-react"
import { NpmCommands } from "@/types/unist"
import { useConfig } from "@/hooks/use-config"
import { copyToClipboardWithMeta } from "@/components/copy-button"
import { Tabs } from "@/registry/default/ui/tabs"
import { B... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/block-viewer.tsx | deprecated/www/components/block-viewer.tsx | "use client"
import * as React from "react"
import Image from "next/image"
import Link from "next/link"
import {
Check,
ChevronRight,
Clipboard,
File,
Folder,
Fullscreen,
Monitor,
Smartphone,
Tablet,
Terminal,
} from "lucide-react"
import { ImperativePanelHandle } from "react-resizable-panels"
impo... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/docs-nav.tsx | deprecated/www/components/docs-nav.tsx | "use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { SidebarNavItem } from "types/nav"
import { type DocsConfig } from "@/config/docs"
import { cn } from "@/lib/utils"
export function DocsNav({ config }: { config: DocsConfig }) {
const pathname = usePathname()
const i... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/open-in-v0-cta.tsx | deprecated/www/components/open-in-v0-cta.tsx | 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 (
<div
className={cn(
"group relative flex flex-col gap-2 rounded-lg border p-4 text-sm",
cl... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/analytics.tsx | deprecated/www/components/analytics.tsx | "use client"
import { Analytics as VercelAnalytics } from "@vercel/analytics/react"
export function Analytics() {
return <VercelAnalytics />
}
| typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/style-switcher.tsx | deprecated/www/components/style-switcher.tsx | "use client"
import * as React from "react"
import { type SelectTriggerProps } from "@radix-ui/react-select"
import { cn } from "@/lib/utils"
import { useConfig } from "@/hooks/use-config"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/registry/new-york/ui/select"
import {... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/drawer.tsx | deprecated/www/components/drawer.tsx | "use client"
import { forwardRef } from "react"
import { Drawer as DrawerPrimitive } from "vaul"
import { cn } from "@/lib/utils"
const DrawerTrigger = DrawerPrimitive.Trigger
const DrawerContent = forwardRef<
React.ElementRef<typeof DrawerPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DrawerPrimitiv... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/theme-component.tsx | deprecated/www/components/theme-component.tsx | "use client"
import * as React from "react"
import { Index } from "@/__registry__"
import { cn } from "@/lib/utils"
import { useConfig } from "@/hooks/use-config"
import { Icons } from "@/components/icons"
interface ThemeComponentProps extends React.HTMLAttributes<HTMLDivElement> {
name: string
extractClassname?... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/pager.tsx | deprecated/www/components/pager.tsx | import Link from "next/link"
import { Doc } from "contentlayer/generated"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { NavItem, NavItemWithChildren } from "types/nav"
import { docsConfig } from "@/config/docs"
import { Button } from "@/registry/new-york/ui/button"
interface DocsPagerProps {
doc... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/main-nav.tsx | deprecated/www/components/main-nav.tsx | "use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { siteConfig } from "@/config/site"
import { cn } from "@/lib/utils"
import { Icons } from "@/components/icons"
export function MainNav() {
const pathname = usePathname()
return (
<div className="mr-4 hidden md:fl... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/announcement.tsx | deprecated/www/components/announcement.tsx | import Link from "next/link"
import { ArrowRight } from "lucide-react"
export function Announcement() {
return (
<Link
href="/docs/tailwind-v4"
className="group mb-2 inline-flex items-center gap-2 px-0.5 text-sm font-medium"
>
<svg
role="img"
viewBox="0 0 24 24"
xmln... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/charts-nav.tsx | deprecated/www/components/charts-nav.tsx | "use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { cn } from "@/lib/utils"
import { ScrollArea, ScrollBar } from "@/registry/new-york/ui/scroll-area"
const links = [
{
name: "All Charts",
href: "/charts",
},
{
name: "Area Chart",
href: "/charts#area... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/examples-nav.tsx | deprecated/www/components/examples-nav.tsx | "use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { cn } from "@/lib/utils"
import { ScrollArea, ScrollBar } from "@/registry/new-york/ui/scroll-area"
const examples = [
{
name: "Mail",
href: "/examples/mail",
code: "https://github.com/shadcn/ui/tree/main/ap... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/project-add-button.tsx | deprecated/www/components/project-add-button.tsx | "use client"
import { Check, PlusCircle } from "lucide-react"
import { cn } from "@/lib/utils"
import { useProject } from "@/hooks/use-project"
import { Button } from "@/registry/new-york/ui/button"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/registry/new-york/ui/tooltip"
export function Projec... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/component-source.tsx | deprecated/www/components/component-source.tsx | "use client"
import * as React from "react"
import { cn } from "@/lib/utils"
import { CodeBlockWrapper } from "@/components/code-block-wrapper"
interface ComponentSourceProps extends React.HTMLAttributes<HTMLDivElement> {
src: string
}
export function ComponentSource({
children,
className,
...props
}: Compo... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/tailwind-indicator.tsx | deprecated/www/components/tailwind-indicator.tsx | export function TailwindIndicator() {
if (process.env.NODE_ENV === "production") return null
return (
<div
data-tailwind-indicator=""
className="fixed bottom-1 left-1 z-50 flex h-6 w-6 items-center justify-center rounded-full bg-gray-800 p-3 font-mono text-xs text-white"
>
<div className=... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/chart-code-viewer.tsx | deprecated/www/components/chart-code-viewer.tsx | import * as React from "react"
import { cn } from "@/lib/utils"
import { useMediaQuery } from "@/hooks/use-media-query"
import { useThemesConfig } from "@/hooks/use-themes-config"
import { ChartCopyButton } from "@/components/chart-copy-button"
import { Chart } from "@/components/chart-display"
import { V0Button } fro... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/theme-customizer.tsx | deprecated/www/components/theme-customizer.tsx | "use client"
import * as React from "react"
import template from "lodash/template"
import { Check, ClipboardIcon, Copy } from "lucide-react"
import { useTheme } from "next-themes"
import { cn } from "@/lib/utils"
import { useConfig } from "@/hooks/use-config"
import { copyToClipboardWithMeta } from "@/components/copy... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/site-footer.tsx | deprecated/www/components/site-footer.tsx | import { siteConfig } from "@/config/site"
export function SiteFooter() {
return (
<footer className="border-grid border-t py-6 md:py-0">
<div className="container-wrapper">
<div className="container py-4">
<div className="text-balance text-center text-sm leading-loose text-muted-foregrou... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/component-example.tsx | deprecated/www/components/component-example.tsx | "use client"
import * as React from "react"
import { cn } from "@/lib/utils"
import { CopyButton, CopyWithClassNames } from "@/components/copy-button"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from "@/registry/new-york/ui/tabs"
interface ComponentExampleProps extends React.HTMLAttributes<HTMLDivEl... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/site-header.tsx | deprecated/www/components/site-header.tsx | import Link from "next/link"
import { siteConfig } from "@/config/site"
import { CommandMenu } from "@/components/command-menu"
import { Icons } from "@/components/icons"
import { MainNav } from "@/components/main-nav"
import { MobileNav } from "@/components/mobile-nav"
import { ModeSwitcher } from "@/components/mode-... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/mobile-nav.tsx | deprecated/www/components/mobile-nav.tsx | "use client"
import * as React from "react"
import Link, { LinkProps } from "next/link"
import { useRouter } from "next/navigation"
import { docsConfig } from "@/config/docs"
import { cn } from "@/lib/utils"
import { useMetaColor } from "@/hooks/use-meta-color"
import { Button } from "@/registry/new-york/ui/button"
i... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/code-block-wrapper.tsx | deprecated/www/components/code-block-wrapper.tsx | "use client"
import * as React from "react"
import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york/ui/button"
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "@/registry/new-york/ui/collapsible"
interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/themes-selector.tsx | deprecated/www/components/themes-selector.tsx | "use client"
import * as React from "react"
import { useTheme } from "next-themes"
import { THEMES, Theme } from "@/lib/themes"
import { cn } from "@/lib/utils"
import { useMediaQuery } from "@/hooks/use-media-query"
import { useThemesConfig } from "@/hooks/use-themes-config"
import { Skeleton } from "@/registry/new-... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/code-tabs.tsx | deprecated/www/components/code-tabs.tsx | "use client"
import * as React from "react"
import { useConfig } from "@/hooks/use-config"
import { Tabs } from "@/registry/default/ui/tabs"
export function CodeTabs({ children }: React.ComponentProps<typeof Tabs>) {
const [config, setConfig] = useConfig()
const installationType = React.useMemo(() => {
retu... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/v0-button.tsx | deprecated/www/components/v0-button.tsx | "use client"
import * as React from "react"
import { editInV0 } from "@/actions/edit-in-v0"
import { Loader2 } from "lucide-react"
import { useFormStatus } from "react-dom"
import { toast } from "sonner"
import { cn } from "@/lib/utils"
import { Button, ButtonProps } from "@/registry/new-york/ui/button"
import {
To... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/theme-wrapper.tsx | deprecated/www/components/theme-wrapper.tsx | "use client"
import { cn } from "@/lib/utils"
import { useConfig } from "@/hooks/use-config"
interface ThemeWrapperProps extends React.ComponentProps<"div"> {
defaultTheme?: string
}
export function ThemeWrapper({
defaultTheme,
children,
className,
}: ThemeWrapperProps) {
const [config] = useConfig()
re... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/chart-display.tsx | deprecated/www/components/chart-display.tsx | import * as React from "react"
import { registryItemSchema } from "shadcn/schema"
import { z } from "zod"
import { highlightCode } from "@/lib/highlight-code"
import { getRegistryItem } from "@/lib/registry"
import { cn } from "@/lib/utils"
import { ChartToolbar } from "@/components/chart-toolbar"
export type Chart =... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/component-card.tsx | deprecated/www/components/component-card.tsx | import React from "react"
import { cn } from "@/lib/utils"
import { AspectRatio } from "@/registry/new-york/ui/aspect-ratio"
export function ComponentCard({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<AspectRatio ratio={1 / 1} asChild>
<div
className={cn(
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/chart-toolbar.tsx | deprecated/www/components/chart-toolbar.tsx | "use client"
import { cn } from "@/lib/utils"
import { ChartCodeViewer } from "@/components/chart-code-viewer"
import { Separator } from "@/registry/new-york/ui/separator"
import "@/styles/mdx.css"
import {
AreaChart,
BarChartBig,
Hexagon,
LineChart,
MousePointer2,
PieChart,
Radar,
} from "lucide-react"... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/style-wrapper.tsx | deprecated/www/components/style-wrapper.tsx | "use client"
import * as React from "react"
import { useConfig } from "@/hooks/use-config"
import { Style } from "@/registry/registry-styles"
interface StyleWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
styleName?: Style["name"]
}
export function StyleWrapper({ styleName, children }: StyleWrapperPro... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/toc.tsx | deprecated/www/components/toc.tsx | // @ts-nocheck
"use client"
import * as React from "react"
import { TableOfContents } from "@/lib/toc"
import { cn } from "@/lib/utils"
import { useMounted } from "@/hooks/use-mounted"
interface TocProps {
toc: TableOfContents
}
export function DashboardTableOfContents({ toc }: TocProps) {
const itemIds = React... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/themes-styles.tsx | deprecated/www/components/themes-styles.tsx | "use client"
import { useThemesConfig } from "@/hooks/use-themes-config"
export function ThemesStyle() {
const { themesConfig } = useThemesConfig()
if (!themesConfig.activeTheme) {
return null
}
return (
<style>
{`
.themes-wrapper,
[data-chart] {
${Object.entries(themesConfig.activeTheme.css... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/copy-button.tsx | deprecated/www/components/copy-button.tsx | "use client"
import * as React from "react"
import { DropdownMenuTriggerProps } from "@radix-ui/react-dropdown-menu"
import { CheckIcon, ClipboardIcon } from "lucide-react"
import { NpmCommands } from "types/unist"
import { Event, trackEvent } from "@/lib/events"
import { cn } from "@/lib/utils"
import { Button, Butt... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/block-display.tsx | deprecated/www/components/block-display.tsx | import * as React from "react"
import { registryItemFileSchema } from "shadcn/schema"
import { z } from "zod"
import { highlightCode } from "@/lib/highlight-code"
import {
createFileTreeForRegistryItemFiles,
getRegistryItem,
} from "@/lib/registry"
import { BlockViewer } from "@/components/block-viewer"
export as... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/icons.tsx | deprecated/www/components/icons.tsx | type IconProps = React.HTMLAttributes<SVGElement>
export const Icons = {
logo: (props: IconProps) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" {...props}>
<rect width="256" height="256" fill="none" />
<line
x1="208"
y1="128"
x2="128"
y2="208"
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/chart-copy-button.tsx | deprecated/www/components/chart-copy-button.tsx | "use client"
import * as React from "react"
import { CheckIcon, ClipboardIcon } from "lucide-react"
import { Event, trackEvent } from "@/lib/events"
import { cn } from "@/lib/utils"
import { Button, ButtonProps } from "@/registry/new-york/ui/button"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/re... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/color-palette.tsx | deprecated/www/components/color-palette.tsx | import * as React from "react"
import { type ColorPalette } from "@/lib/colors"
import { Color } from "@/components/color"
import {
ColorFormatSelector,
ColorFormatSelectorSkeleton,
} from "@/components/color-format-selector"
export function ColorPalette({ colorPalette }: { colorPalette: ColorPalette }) {
retur... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/page-header.tsx | deprecated/www/components/page-header.tsx | import { cn } from "@/lib/utils"
function PageHeader({
className,
children,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<section className={cn("border-grid border-b", className)} {...props}>
<div className="container-wrapper">
<div className="container flex flex-col items-sta... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/component-preview.tsx | deprecated/www/components/component-preview.tsx | "use client"
import * as React from "react"
import Image from "next/image"
import { Index } from "@/__registry__"
import { cn } from "@/lib/utils"
import { useConfig } from "@/hooks/use-config"
import { CopyButton } from "@/components/copy-button"
import { Icons } from "@/components/icons"
import { StyleSwitcher } fr... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/theme-switcher.tsx | deprecated/www/components/theme-switcher.tsx | "use client"
import * as React from "react"
import { useSelectedLayoutSegment } from "next/navigation"
import { useConfig } from "@/hooks/use-config"
export function ThemeSwitcher() {
const [config] = useConfig()
const segment = useSelectedLayoutSegment()
React.useEffect(() => {
document.body.classList.fo... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/block-image.tsx | deprecated/www/components/block-image.tsx | import Image from "next/image"
import { cn } from "@/lib/utils"
export function BlockImage({
name,
width = 1440,
height = 900,
className,
}: Omit<React.ComponentProps<typeof Image>, "src" | "alt"> & { name: string }) {
return (
<div
className={cn(
"relative aspect-[1440/900] w-full overflo... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/color.tsx | deprecated/www/components/color.tsx | "use client"
import { Check, Clipboard } from "lucide-react"
import { toast } from "sonner"
import { type Color } from "@/lib/colors"
import { trackEvent } from "@/lib/events"
import { useColors } from "@/hooks/use-colors"
import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard"
export function Color({ col... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/promo-video.tsx | deprecated/www/components/promo-video.tsx | "use client"
import { AspectRatio } from "@/registry/new-york/ui/aspect-ratio"
export function PromoVideo() {
return (
<AspectRatio
ratio={16 / 9}
className="overflow-hidden rounded-lg border bg-white shadow-xl"
>
<video autoPlay muted playsInline>
<source
src="https://ui... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/create-account.tsx | deprecated/www/components/cards/create-account.tsx | "use client"
import { Icons } from "@/components/icons"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import { Input } from "@/registry/new-york/ui/input"
import { Label } from "@/r... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/activity-goal.tsx | deprecated/www/components/cards/activity-goal.tsx | "use client"
import * as React from "react"
import { Minus, Plus } from "lucide-react"
import { Bar, BarChart } from "recharts"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/cookie-settings.tsx | deprecated/www/components/cards/cookie-settings.tsx | "use client"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import { Label } from "@/registry/new-york/ui/label"
import { Switch } from "@/registry/new-york/ui/switch"
export functi... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/share.tsx | deprecated/www/components/cards/share.tsx | "use client"
import {
Avatar,
AvatarFallback,
AvatarImage,
} from "@/registry/new-york/ui/avatar"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import { Input } from "@/registry/new-york/ui... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/index.tsx | deprecated/www/components/cards/index.tsx | import { CardsActivityGoal } from "@/components/cards/activity-goal"
import { CardsCalendar } from "@/components/cards/calendar"
import { CardsChat } from "@/components/cards/chat"
import { CardsCookieSettings } from "@/components/cards/cookie-settings"
import { CardsCreateAccount } from "@/components/cards/create-acco... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/data-table.tsx | deprecated/www/components/cards/data-table.tsx | "use client"
import * as React from "react"
import {
ColumnDef,
ColumnFiltersState,
SortingState,
VisibilityState,
flexRender,
getCoreRowModel,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
useReactTable,
} from "@tanstack/react-table"
import { ArrowUpDown, ChevronDown, MoreHorizon... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/stats.tsx | deprecated/www/components/cards/stats.tsx | "use client"
import { Bar, BarChart, Line, LineChart } from "recharts"
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import { ChartConfig, ChartContainer } from "@/registry/new-york/ui/chart"
const data = [
{
revenue: 10400,
subscription: 240,
},
{
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/metric.tsx | deprecated/www/components/cards/metric.tsx | "use client"
import { Line, LineChart } from "recharts"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import {
ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
} from "@/registry/new-york/ui/chart"
const data = [
{
aver... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/report-issue.tsx | deprecated/www/components/cards/report-issue.tsx | "use client"
import * as React from "react"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import { Input } from "@/registry/new-york/ui/input"
import { Label } from "@/registry/new... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/payment-method.tsx | deprecated/www/components/cards/payment-method.tsx | "use client"
import { Icons } from "@/components/icons"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import { Input } from "@/registry/new-york/ui/input"
import { Label } from "@/r... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/chat.tsx | deprecated/www/components/cards/chat.tsx | "use client"
import * as React from "react"
import { Check, Plus, Send } from "lucide-react"
import { cn } from "@/lib/utils"
import {
Avatar,
AvatarFallback,
AvatarImage,
} from "@/registry/new-york/ui/avatar"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardFooter,
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/team-members.tsx | deprecated/www/components/cards/team-members.tsx | "use client"
import { ChevronDown } from "lucide-react"
import {
Avatar,
AvatarFallback,
AvatarImage,
} from "@/registry/new-york/ui/avatar"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
i... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/components/cards/calendar.tsx | deprecated/www/components/cards/calendar.tsx | "use client"
import { addDays } from "date-fns"
import { Calendar } from "@/registry/new-york/ui/calendar"
import { Card, CardContent } from "@/registry/new-york/ui/card"
const start = new Date(2023, 5, 5)
export function CardsCalendar() {
return (
<Card className="max-w-[260px]">
<CardContent className... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/actions/edit-in-v0.ts | deprecated/www/actions/edit-in-v0.ts | "use server"
import { track } from "@vercel/analytics/server"
import { capitalCase } from "change-case"
import { getRegistryItem } from "@/lib/registry"
import { Style } from "@/registry/registry-styles"
const TAILWIND_CONFIG_BLOCKS = ["dashboard-01"]
export async function editInV0({
name,
style,
url,
}: {
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/types/nav.ts | deprecated/www/types/nav.ts | import { Icons } from "@/components/icons"
export interface NavItem {
title: string
href?: string
disabled?: boolean
external?: boolean
icon?: keyof typeof Icons
label?: string
}
export interface NavItemWithChildren extends NavItem {
items: NavItemWithChildren[]
}
export interface MainNavItem extends N... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/types/unist.ts | deprecated/www/types/unist.ts | import { Node } from "unist-builder"
export interface UnistNode extends Node {
type: string
name?: string
tagName?: string
value?: string
properties?: {
__rawString__?: string
__className__?: string
__event__?: string
[key: string]: unknown
} & NpmCommands
attributes?: {
name: string
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/rehype-npm-command.ts | deprecated/www/lib/rehype-npm-command.ts | import { UnistNode, UnistTree } from "types/unist"
import { visit } from "unist-util-visit"
export function rehypeNpmCommand() {
return (tree: UnistTree) => {
visit(tree, (node: UnistNode) => {
if (node.type !== "element" || node?.tagName !== "pre") {
return
}
// npm install.
if ... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/toc.ts | deprecated/www/lib/toc.ts | // @ts-nocheck
// TODO: I'll fix this later.
import { toc } from "mdast-util-toc"
import { remark } from "remark"
import { visit } from "unist-util-visit"
const textTypes = ["text", "emphasis", "strong", "inlineCode"]
function flattenNode(node) {
const p = []
visit(node, (node) => {
if (!textTypes.includes(n... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/highlight-code.ts | deprecated/www/lib/highlight-code.ts | import { codeToHtml } from "shiki"
export async function highlightCode(code: string) {
const html = await codeToHtml(code, {
lang: "jsx",
theme: "github-dark-default",
transformers: [
{
code(node) {
node.properties["data-line-numbers"] = ""
},
},
],
})
retur... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/utils.ts | deprecated/www/lib/utils.ts | import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
export function formatDate(input: string | number): string {
const date = new Date(input)
return date.toLocaleDateString("en-US", {
month: "long"... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/themes.ts | deprecated/www/lib/themes.ts | import { themeColorsToCssVariables } from "@/lib/charts"
const _THEMES = [
{
name: "Sapphire",
id: "default-sapphire",
colors: {
background: "0 0% 100%",
foreground: "222.2 84% 4.9%",
card: "0 0% 100%",
cardForeground: "222.2 84% 4.9%",
popover: "0 0% 100%",
popoverFor... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/colors.ts | deprecated/www/lib/colors.ts | import { z } from "zod"
import { colors } from "@/registry/registry-colors"
const colorSchema = z.object({
name: z.string(),
id: z.string(),
scale: z.number(),
className: z.string(),
hex: z.string(),
rgb: z.string(),
hsl: z.string(),
foreground: z.string(),
oklch: z.string(),
})
const colorPaletteS... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/registry.ts | deprecated/www/lib/registry.ts | import { promises as fs } from "fs"
import { tmpdir } from "os"
import path from "path"
import { Index } from "@/__registry__"
import { registryItemFileSchema, registryItemSchema } from "shadcn/schema"
import { Project, ScriptKind, SourceFile, SyntaxKind } from "ts-morph"
import { z } from "zod"
import { Style } from ... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/rehype-component.ts | deprecated/www/lib/rehype-component.ts | import fs from "fs"
import path from "path"
import { UnistNode, UnistTree } from "types/unist"
import { u } from "unist-builder"
import { visit } from "unist-util-visit"
import { Index } from "../__registry__"
import { styles } from "../registry/registry-styles"
export function rehypeComponent() {
return async (tre... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/blocks.ts | deprecated/www/lib/blocks.ts | "use server"
import { registryItemSchema } from "shadcn/schema"
import { z } from "zod"
import { Style } from "@/registry/registry-styles"
export async function getAllBlockIds(
types: z.infer<typeof registryItemSchema>["type"][] = [
"registry:block",
"registry:internal",
],
categories: string[] = [],
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/charts.ts | deprecated/www/lib/charts.ts | export function themeColorsToCssVariables(
colors: Record<string, string>
): Record<string, string> {
const cssVars = colors
? Object.fromEntries(
Object.entries(colors).map(([name, value]) => {
if (value === undefined) return []
const cssName = themeColorNameToCssVariable(name)
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/events.ts | deprecated/www/lib/events.ts | import va from "@vercel/analytics"
import { z } from "zod"
const eventSchema = z.object({
name: z.enum([
"copy_npm_command",
"copy_usage_import_code",
"copy_usage_code",
"copy_primitive_code",
"copy_theme_code",
"copy_block_code",
"copy_chunk_code",
"enable_lift_mode",
"copy_chart... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/fonts.ts | deprecated/www/lib/fonts.ts | import { GeistMono } from "geist/font/mono"
import { GeistSans } from "geist/font/sans"
export const fontSans = GeistSans
export const fontMono = GeistMono
| typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/registry.test.ts | deprecated/www/lib/registry.test.ts | import { describe, expect, it } from "vitest"
import { createFileTreeForRegistryItemFiles } from "@/lib/registry"
describe("createFileTreeForRegistryItemFiles", () => {
it("should create a nested file tree structure", async () => {
const files = [
{ path: "page.tsx" },
{ path: "components/foo.tsx" }... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/validations/og.ts | deprecated/www/lib/validations/og.ts | import { z } from "zod"
export const ogImageSchema = z.object({
heading: z.string(),
type: z.string(),
mode: z.enum(["light", "dark"]).default("dark"),
})
| typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/lib/validations/log.ts | deprecated/www/lib/validations/log.ts | import { z } from "zod"
export const logSchema = z.object({
event: z.enum(["copy_primitive"]),
data: z.record(z.string()),
})
| typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/config/site.ts | deprecated/www/config/site.ts | export const siteConfig = {
name: "shadcn/ui",
url: "https://ui.shadcn.com",
ogImage: "https://ui.shadcn.com/og.jpg",
description:
"A set of beautifully-designed, accessible components and a code distribution platform. Works with your favorite frameworks. Open Source. Open Code.",
links: {
twitter: "h... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/config/docs.ts | deprecated/www/config/docs.ts | import { MainNavItem, SidebarNavItem } from "types/nav"
export interface DocsConfig {
mainNav: MainNavItem[]
sidebarNav: SidebarNavItem[]
chartsNav: SidebarNavItem[]
}
export const docsConfig: DocsConfig = {
mainNav: [
{
title: "Home",
href: "/",
},
{
title: "Documentation",
... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/registry/registry-styles.ts | deprecated/www/registry/registry-styles.ts | export const styles = [
{
name: "new-york",
label: "New York",
},
{
name: "default",
label: "Default",
},
] as const
export type Style = (typeof styles)[number]
| typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/registry/registry-colors.ts | deprecated/www/registry/registry-colors.ts | export const colors = {
inherit: "inherit",
current: "currentColor",
transparent: "transparent",
black: {
hex: "#000000",
rgb: "rgb(0,0,0)",
hsl: "hsl(0,0%,0%)",
oklch: "oklch(0.00,0.00,0)",
},
white: {
hex: "#ffffff",
rgb: "rgb(255,255,255)",
hsl: "hsl(0,0%,100%)",
oklch: "o... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | true |
shadcn-ui/ui | https://github.com/shadcn-ui/ui/blob/ccafdaf7c6f6747a24f54e84436b42ec42f01779/deprecated/www/registry/registry-themes.ts | deprecated/www/registry/registry-themes.ts | import { type Registry } from "shadcn/schema"
export const themes: Registry["items"] = [
{
name: "theme-daylight",
type: "registry:theme",
cssVars: {
light: {
background: "36 39% 88%",
foreground: "36 45% 15%",
primary: "36 45% 70%",
"primary-foreground": "36 45% 11%... | typescript | MIT | ccafdaf7c6f6747a24f54e84436b42ec42f01779 | 2026-01-04T15:25:31.746168Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.