text stringlengths 21 253k | id stringlengths 25 123 | metadata dict | __index_level_0__ int64 0 181 |
|---|---|---|---|
import { Sidebar } from "@/app/(app)/_components/sidebar";
import { Button } from "@/components/ui/button";
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
import { MenuIcon } from "lucide-react";
type MobileSideNavProps = {
sidebarNavIncludeIds?: string[];
sidebarNavRemoveIds?: stri... | alifarooq9/rapidlaunch/starterkits/saas/src/app/(app)/_components/mobile-sidenav.tsx | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/app/(app)/_components/mobile-sidenav.tsx",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 567
} | 11 |
import { AppPageLoading } from "@/app/(app)/_components/page-loading";
import { adminDashConfig } from "@/app/(app)/admin/dashboard/_constants/page-config";
import { Skeleton } from "@/components/ui/skeleton";
export default function AdminFeedbackPageLoading() {
return (
<AppPageLoading
title={... | alifarooq9/rapidlaunch/starterkits/saas/src/app/(app)/admin/dashboard/loading.tsx | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/app/(app)/admin/dashboard/loading.tsx",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 190
} | 12 |
import { AppPageShell } from "@/app/(app)/_components/page-shell";
import { z } from "zod";
import type { SearchParams } from "@/types/data-table";
import { organizationsPageConfig } from "@/app/(app)/admin/organizations/_constants/page-config";
import { getPaginatedOrgsQuery } from "@/server/actions/organization/queri... | alifarooq9/rapidlaunch/starterkits/saas/src/app/(app)/admin/organizations/page.tsx | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/app/(app)/admin/organizations/page.tsx",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 472
} | 13 |
import { type Feature, features } from "@/config/features";
import { cn } from "@/lib/utils";
import Image from "next/image";
import Balancer from "react-wrap-balancer";
export default function Features() {
return (
<section className="flex flex-col items-center justify-center gap-20 py-20">
<d... | alifarooq9/rapidlaunch/starterkits/saas/src/app/(web)/_components/features.tsx | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/app/(web)/_components/features.tsx",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 1908
} | 14 |
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { CheckIcon, XIcon } from "lucide-react";
import {
type PrincingPlan,
pricingPlans,
pricingFeatures,
} from "@/config/pricing";
import ... | alifarooq9/rapidlaunch/starterkits/saas/src/app/(web)/pricing/_components/pricing-table.tsx | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/app/(web)/pricing/_components/pricing-table.tsx",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 3107
} | 15 |
import { docs } from "@/app/source";
import type { Metadata } from "next";
import { DocsPage, DocsBody } from "fumadocs-ui/page";
import { notFound } from "next/navigation";
import { useMDXComponents } from "mdx-components";
import { RollButton } from "fumadocs-ui/components/roll-button";
export const dynamic = "force... | alifarooq9/rapidlaunch/starterkits/saas/src/app/docs/[[...slug]]/page.tsx | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/app/docs/[[...slug]]/page.tsx",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 553
} | 16 |
"use client";
import React from "react";
import {
ResponsiveContainer,
LineChart as LineReCharts,
Line,
CartesianGrid,
YAxis,
XAxis,
Tooltip,
type CartesianGridProps,
type YAxisProps,
type XAxisProps,
} from "recharts";
type LineChartProps = {
data: unknown[];
lineDataK... | alifarooq9/rapidlaunch/starterkits/saas/src/components/charts.tsx | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/components/charts.tsx",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 3355
} | 17 |
import { Inter, Bricolage_Grotesque } from "next/font/google";
export const fontSans = Inter({
subsets: ["latin"],
variable: "--font-sans",
});
export const fontHeading = Bricolage_Grotesque({
subsets: ["latin"],
variable: "--font-heading",
});
| alifarooq9/rapidlaunch/starterkits/saas/src/lib/fonts.ts | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/lib/fonts.ts",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 98
} | 18 |
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import { env } from "@/env.js";
import * as schema from "./schema";
const globalForDb = globalThis as unknown as {
conn: postgres.Sql | undefined;
};
const conn = globalForDb.conn ?? postgres(env.DATABASE_URL);
if (env.NODE_ENV !... | alifarooq9/rapidlaunch/starterkits/saas/src/server/db/index.ts | {
"file_path": "alifarooq9/rapidlaunch/starterkits/saas/src/server/db/index.ts",
"repo_id": "alifarooq9/rapidlaunch",
"token_count": 140
} | 19 |
'use client';
import type { Database } from '@/types/types_db';
import { createPagesBrowserClient } from '@supabase/auth-helpers-nextjs';
import type { SupabaseClient } from '@supabase/auth-helpers-nextjs';
import { useRouter } from 'next/navigation';
import { createContext, useContext, useEffect, useState } from 'rea... | horizon-ui/shadcn-nextjs-boilerplate/app/supabase-provider.tsx | {
"file_path": "horizon-ui/shadcn-nextjs-boilerplate/app/supabase-provider.tsx",
"repo_id": "horizon-ui/shadcn-nextjs-boilerplate",
"token_count": 383
} | 20 |
import { Button } from '../ui/button';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import React from 'react';
import { AiOutlineUser } from 'react-icons/ai';
import { AiOutlineShop } from 'react-icons/ai';
import... | horizon-ui/shadcn-nextjs-boilerplate/components/card/CardMenu.tsx | {
"file_path": "horizon-ui/shadcn-nextjs-boilerplate/components/card/CardMenu.tsx",
"repo_id": "horizon-ui/shadcn-nextjs-boilerplate",
"token_count": 1637
} | 21 |
/*eslint-disable*/
'use client';
interface Props {
status?: 'danger' | 'waiting' | 'confirmed';
message: string;
time: string;
className?: string;
}
export default function Notification(props: Props) {
return (
<div
className={`relative mx-auto flex w-full max-w-full md:pt-[unset] ${props.classNam... | horizon-ui/shadcn-nextjs-boilerplate/components/notification/index.tsx | {
"file_path": "horizon-ui/shadcn-nextjs-boilerplate/components/notification/index.tsx",
"repo_id": "horizon-ui/shadcn-nextjs-boilerplate",
"token_count": 464
} | 22 |
'use client'
import { createClient } from '@/utils/supabase/client';
import { type Provider } from '@supabase/supabase-js';
import { getURL } from '@/utils/helpers';
import { redirectToPath } from './server';
import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';
export async funct... | horizon-ui/shadcn-nextjs-boilerplate/utils/auth-helpers/client.ts | {
"file_path": "horizon-ui/shadcn-nextjs-boilerplate/utils/auth-helpers/client.ts",
"repo_id": "horizon-ui/shadcn-nextjs-boilerplate",
"token_count": 442
} | 23 |
import { SupabaseClient } from '@supabase/supabase-js';
import { cache } from 'react';
export const getUser = cache(async (supabase: SupabaseClient) => {
const {
data: { user }
} = await supabase.auth.getUser();
return user;
});
export const getUserDetails = cache(async (supabase: SupabaseClient) => {
con... | horizon-ui/shadcn-nextjs-boilerplate/utils/supabase/queries.ts | {
"file_path": "horizon-ui/shadcn-nextjs-boilerplate/utils/supabase/queries.ts",
"repo_id": "horizon-ui/shadcn-nextjs-boilerplate",
"token_count": 149
} | 24 |
import { fileURLToPath } from 'node:url';
import withBundleAnalyzer from '@next/bundle-analyzer';
import { withSentryConfig } from '@sentry/nextjs';
import createJiti from 'jiti';
import withNextIntl from 'next-intl/plugin';
const jiti = createJiti(fileURLToPath(import.meta.url));
jiti('./src/libs/Env');
const with... | ixartz/SaaS-Boilerplate/next.config.mjs | {
"file_path": "ixartz/SaaS-Boilerplate/next.config.mjs",
"repo_id": "ixartz/SaaS-Boilerplate",
"token_count": 757
} | 25 |
import { useTranslations } from 'next-intl';
import { getTranslations } from 'next-intl/server';
import { DashboardHeader } from '@/features/dashboard/DashboardHeader';
export async function generateMetadata(props: { params: { locale: string } }) {
const t = await getTranslations({
locale: props.params.locale,
... | ixartz/SaaS-Boilerplate/src/app/[locale]/(auth)/dashboard/layout.tsx | {
"file_path": "ixartz/SaaS-Boilerplate/src/app/[locale]/(auth)/dashboard/layout.tsx",
"repo_id": "ixartz/SaaS-Boilerplate",
"token_count": 733
} | 26 |
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { vi } from 'vitest';
import { ToggleMenuButton } from './ToggleMenuButton';
describe('ToggleMenuButton', () => {
describe('onClick props', () => {
it('should call the callback when the user clic... | ixartz/SaaS-Boilerplate/src/components/ToggleMenuButton.test.tsx | {
"file_path": "ixartz/SaaS-Boilerplate/src/components/ToggleMenuButton.test.tsx",
"repo_id": "ixartz/SaaS-Boilerplate",
"token_count": 195
} | 27 |
import { useTranslations } from 'next-intl';
import React from 'react';
import type { BillingInterval, PlanId } from '@/types/Subscription';
export const PricingCard = (props: {
planId: PlanId;
price: number;
interval: BillingInterval;
button: React.ReactNode;
children: React.ReactNode;
}) => {
const t = ... | ixartz/SaaS-Boilerplate/src/features/billing/PricingCard.tsx | {
"file_path": "ixartz/SaaS-Boilerplate/src/features/billing/PricingCard.tsx",
"repo_id": "ixartz/SaaS-Boilerplate",
"token_count": 468
} | 28 |
import { act, renderHook } from '@testing-library/react';
import { useMenu } from './UseMenu';
describe('UseMenu', () => {
describe('Render hook', () => {
it('shouldn\'t show the menu by default', async () => {
const { result } = renderHook(() => useMenu());
expect(result.current.showMenu).toBeFals... | ixartz/SaaS-Boilerplate/src/hooks/UseMenu.test.ts | {
"file_path": "ixartz/SaaS-Boilerplate/src/hooks/UseMenu.test.ts",
"repo_id": "ixartz/SaaS-Boilerplate",
"token_count": 452
} | 29 |
import { useTranslations } from 'next-intl';
import { Background } from '@/components/Background';
import { FeatureCard } from '@/features/landing/FeatureCard';
import { Section } from '@/features/landing/Section';
export const Features = () => {
const t = useTranslations('Features');
return (
<Background>
... | ixartz/SaaS-Boilerplate/src/templates/Features.tsx | {
"file_path": "ixartz/SaaS-Boilerplate/src/templates/Features.tsx",
"repo_id": "ixartz/SaaS-Boilerplate",
"token_count": 2722
} | 30 |
import { expect, test } from '@playwright/test';
// Checkly is a tool used to monitor deployed environments, such as production or preview environments.
// It runs end-to-end tests with the `.check.e2e.ts` extension after each deployment to ensure that the environment is up and running.
// With Checkly, you can monito... | ixartz/SaaS-Boilerplate/tests/e2e/Sanity.check.e2e.ts | {
"file_path": "ixartz/SaaS-Boilerplate/tests/e2e/Sanity.check.e2e.ts",
"repo_id": "ixartz/SaaS-Boilerplate",
"token_count": 386
} | 31 |
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
import { Resvg, initWasm } from '@resvg/resvg-wasm';
import wasm from './loadWasm';
var initializedResvg = initWasm(wasm);
export default eventHandler(async (event) => {
const { params = {} } = event.context;
await initializedResvg;
cons... | lucide-icons/lucide/docs/.vitepress/api/gh-icon/dpi/[...data].get.ts | {
"file_path": "lucide-icons/lucide/docs/.vitepress/api/gh-icon/dpi/[...data].get.ts",
"repo_id": "lucide-icons/lucide",
"token_count": 810
} | 32 |
import React from 'react';
import { PathProps, Path } from './types';
import { getPaths, assert } from './utils';
export const darkModeCss = `
@media screen and (prefers-color-scheme: light) {
.svg-preview-grid-rect { fill: none }
}
@media screen and (prefers-color-scheme: dark) {
.svg-preview-grid-rect ... | lucide-icons/lucide/docs/.vitepress/lib/SvgPreview/index.tsx | {
"file_path": "lucide-icons/lucide/docs/.vitepress/lib/SvgPreview/index.tsx",
"repo_id": "lucide-icons/lucide",
"token_count": 6182
} | 33 |
import { onMounted, onUpdated, onUnmounted } from 'vue';
import { throttleAndDebounce } from 'vitepress/dist/client/theme-default/support/utils';
/*
* This file is compied and adjusted from vitepress/dist/client/theme-default/composables/useActiveAnchor.ts
*/
export function useActiveAnchor(container, marker) {
c... | lucide-icons/lucide/docs/.vitepress/theme/composables/useActiveAnchor.ts | {
"file_path": "lucide-icons/lucide/docs/.vitepress/theme/composables/useActiveAnchor.ts",
"repo_id": "lucide-icons/lucide",
"token_count": 1058
} | 34 |
const chunkArray = <ArrayType>(stream: ArrayType, size: number) => {
return stream.reduce<ArrayType[][]>(
(chunks, item, idx, arr) =>
idx % size == 0 ? [...chunks, arr.slice(idx, idx + size)] : chunks,
[],
);
};
export default chunkArray;
| lucide-icons/lucide/docs/.vitepress/theme/utils/chunkArray.ts | {
"file_path": "lucide-icons/lucide/docs/.vitepress/theme/utils/chunkArray.ts",
"repo_id": "lucide-icons/lucide",
"token_count": 101
} | 35 |
.lucide {
/* Change this! */
color: #ffadff;
width: 56px;
height: 56px;
stroke-width: 1px;
}
.app {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
gap: 6px;
}
| lucide-icons/lucide/docs/guide/advanced/examples/global-styling-css-example/icon.css | {
"file_path": "lucide-icons/lucide/docs/guide/advanced/examples/global-styling-css-example/icon.css",
"repo_id": "lucide-icons/lucide",
"token_count": 98
} | 36 |
import { Star } from "lucide-react";
import "./icon.css";
function App() {
return (
<div className="text-wrapper">
<Star class="my-icon" />
<div>Yes</div>
</div>
);
}
export default App;
| lucide-icons/lucide/docs/guide/basics/examples/size-icon-font-example/App.js | {
"file_path": "lucide-icons/lucide/docs/guide/basics/examples/size-icon-font-example/App.js",
"repo_id": "lucide-icons/lucide",
"token_count": 90
} | 37 |
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
id="lucide-logo"
>
<path d="M14 12C14 9.79086 12.2091 8 10 8C7.79086 8 6 9.79086 6 12C6 16.4183 9.58172 20 14 20C18.4... | lucide-icons/lucide/docs/public/logo.dark.svg | {
"file_path": "lucide-icons/lucide/docs/public/logo.dark.svg",
"repo_id": "lucide-icons/lucide",
"token_count": 277
} | 38 |
type HtmlAttributes = { [key: string]: string | number };
export type LucideIconNode = readonly [string, HtmlAttributes];
export type LucideIconData = readonly LucideIconNode[];
export type LucideIcons = { [key: string]: LucideIconData };
/** @deprecated Use LucideIconData instead. Will be removed in v1.0. */
export t... | lucide-icons/lucide/packages/lucide-angular/src/icons/types/index.ts | {
"file_path": "lucide-icons/lucide/packages/lucide-angular/src/icons/types/index.ts",
"repo_id": "lucide-icons/lucide",
"token_count": 170
} | 39 |
/* eslint-disable import/no-extraneous-dependencies */
import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs';
export default ({ componentName, iconName, children, getSvg, deprecated, deprecationReason }) => {
const svgContents = getSvg();
const svgBase64 = base64SVG(svgContents);
return `
import creat... | lucide-icons/lucide/packages/lucide-preact/scripts/exportTemplate.mjs | {
"file_path": "lucide-icons/lucide/packages/lucide-preact/scripts/exportTemplate.mjs",
"repo_id": "lucide-icons/lucide",
"token_count": 309
} | 40 |
import { defineConfig } from 'vitest/config'
import preact from '@preact/preset-vite'
export default defineConfig({
plugins: [preact()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './tests/setupVitest.js',
},
resolve: {
mainFields: ['module'],
},
});
| lucide-icons/lucide/packages/lucide-preact/vitest.config.mts | {
"file_path": "lucide-icons/lucide/packages/lucide-preact/vitest.config.mts",
"repo_id": "lucide-icons/lucide",
"token_count": 113
} | 41 |
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { cleanup, render } from '@testing-library/react';
import { Edit2, Grid, Pen } from '../src/lucide-react-native';
vi.mock('react-native-svg');
type Attributes = Record<string, { value: unknown }>;
describe('Using lucide icon components', () => {
... | lucide-icons/lucide/packages/lucide-react-native/tests/lucide-react-native.spec.tsx | {
"file_path": "lucide-icons/lucide/packages/lucide-react-native/tests/lucide-react-native.spec.tsx",
"repo_id": "lucide-icons/lucide",
"token_count": 1552
} | 42 |
import { For, splitProps } from 'solid-js';
import { Dynamic } from 'solid-js/web';
import defaultAttributes from './defaultAttributes';
import { IconNode, LucideProps } from './types';
import { mergeClasses, toKebabCase } from '@lucide/shared';
interface IconProps {
name?: string;
iconNode: IconNode;
}
const Ico... | lucide-icons/lucide/packages/lucide-solid/src/Icon.tsx | {
"file_path": "lucide-icons/lucide/packages/lucide-solid/src/Icon.tsx",
"repo_id": "lucide-icons/lucide",
"token_count": 686
} | 43 |
<script lang="ts">
import defaultAttributes from './defaultAttributes'
import type { IconNode } from './types';
export let name: string | undefined = undefined
export let color = 'currentColor'
export let size: number | string = 24
export let strokeWidth: number | string = 2
export let absoluteStrokeWidt... | lucide-icons/lucide/packages/lucide-svelte/src/Icon.svelte | {
"file_path": "lucide-icons/lucide/packages/lucide-svelte/src/Icon.svelte",
"repo_id": "lucide-icons/lucide",
"token_count": 398
} | 44 |
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './tests/setupVitest.js',
},
});
| lucide-icons/lucide/packages/lucide-vue-next/vitest.config.mts | {
"file_path": "lucide-icons/lucide/packages/lucide-vue-next/vitest.config.mts",
"repo_id": "lucide-icons/lucide",
"token_count": 93
} | 45 |
import { describe, it, expect } from 'vitest';
import { getAttrs, getClassNames, combineClassNames } from '../src/replaceElement';
describe('getAtts', () => {
it('should returns attrbrutes of an element', () => {
const element = {
attributes: [
{
name: 'class',
value: 'item1 ite... | lucide-icons/lucide/packages/lucide/tests/replaceElement.spec.js | {
"file_path": "lucide-icons/lucide/packages/lucide/tests/replaceElement.spec.js",
"repo_id": "lucide-icons/lucide",
"token_count": 675
} | 46 |
import getArgumentOptions from 'minimist';
import githubApi from './githubApi.mjs';
const fetchCompareTags = (oldTag) =>
githubApi(`https://api.github.com/repos/lucide-icons/lucide/compare/${oldTag}...main`);
const iconRegex = /icons\/(.*)\.svg/g;
const iconTemplate = ({ name, pullNumber, author }) =>
`- \`${name... | lucide-icons/lucide/scripts/generateChangelog.mjs | {
"file_path": "lucide-icons/lucide/scripts/generateChangelog.mjs",
"repo_id": "lucide-icons/lucide",
"token_count": 1173
} | 47 |
import { readJson } from 'fs-extra/esm';
import svgtofont from 'svgtofont';
import getArgumentOptions from 'minimist';
import path from 'path';
const fontName = 'lucide';
const classNamePrefix = 'icon';
const startUnicode = 57400;
const inputDir = path.join(process.cwd(), '../../', 'outlined');
const cliArguments = g... | lucide-icons/lucide/tools/build-font/main.mjs | {
"file_path": "lucide-icons/lucide/tools/build-font/main.mjs",
"repo_id": "lucide-icons/lucide",
"token_count": 1575
} | 48 |
/* eslint-disable import/prefer-default-export */
import fs from 'fs';
import path from 'path';
/**
* reads the icon directory
*
* @param {string} directory
* @param {string} fileExtension
* @returns {array} An array of file paths containing svgs
*/
export const readSvgDirectory = (directory, fileExtension = '.s... | lucide-icons/lucide/tools/build-helpers/src/readSvgDirectory.mjs | {
"file_path": "lucide-icons/lucide/tools/build-helpers/src/readSvgDirectory.mjs",
"repo_id": "lucide-icons/lucide",
"token_count": 124
} | 49 |
ui/
*.d.ts
*.config.* | moinulmoin/chadnext/.eslintignore | {
"file_path": "moinulmoin/chadnext/.eslintignore",
"repo_id": "moinulmoin/chadnext",
"token_count": 11
} | 50 |
{
"semi": true,
"trailingComma": "es5",
"singleQuote": false,
"printWidth": 80,
"tabWidth": 2,
"plugins": ["prettier-plugin-tailwindcss"]
}
| moinulmoin/chadnext/.prettierrc | {
"file_path": "moinulmoin/chadnext/.prettierrc",
"repo_id": "moinulmoin/chadnext",
"token_count": 64
} | 51 |
import GoBack from "~/components/go-back";
export default function SingleProjectLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<GoBack />
{children}
</>
);
}
| moinulmoin/chadnext/src/app/[locale]/dashboard/projects/[projectId]/layout.tsx | {
"file_path": "moinulmoin/chadnext/src/app/[locale]/dashboard/projects/[projectId]/layout.tsx",
"repo_id": "moinulmoin/chadnext",
"token_count": 84
} | 52 |
import { generateState } from "arctic";
import { cookies } from "next/headers";
import { github } from "~/lib/github";
export const GET = async () => {
const state = generateState();
const url = await github.createAuthorizationURL(state, {
scopes: ["user:email", "read:user"],
});
cookies().set("github_oau... | moinulmoin/chadnext/src/app/api/auth/login/github/route.ts | {
"file_path": "moinulmoin/chadnext/src/app/api/auth/login/github/route.ts",
"repo_id": "moinulmoin/chadnext",
"token_count": 178
} | 53 |
import { StarIcon } from "lucide-react";
import Link from "next/link";
import { BrandIcons } from "~/components/shared/brand-icons";
import Icons from "~/components/shared/icons";
import { buttonVariants } from "~/components/ui/button";
import { nFormatter } from "~/lib/utils";
import { getScopedI18n } from "~/locales/... | moinulmoin/chadnext/src/components/sections/hero.tsx | {
"file_path": "moinulmoin/chadnext/src/components/sections/hero.tsx",
"repo_id": "moinulmoin/chadnext",
"token_count": 1731
} | 54 |
import { generateReactHelpers } from "@uploadthing/react/hooks";
import type { OurFileRouter } from "~/app/api/uploadthing/core";
export const { useUploadThing, uploadFiles } =
generateReactHelpers<OurFileRouter>();
| moinulmoin/chadnext/src/lib/uploadthing.ts | {
"file_path": "moinulmoin/chadnext/src/lib/uploadthing.ts",
"repo_id": "moinulmoin/chadnext",
"token_count": 70
} | 55 |
import * as React from "react";
function LinkedInIcon(props: React.SVGProps<SVGSVGElement> | undefined) {
return (
<svg
width="20px"
height="20px"
xmlns="http://www.w3.org/2000/svg"
className="ionicon fill-foreground"
viewBox="0 0 512 512"
{...props}
>
<path d="M444.... | nobruf/shadcn-landing-page/components/icons/linkedin-icon.tsx | {
"file_path": "nobruf/shadcn-landing-page/components/icons/linkedin-icon.tsx",
"repo_id": "nobruf/shadcn-landing-page",
"token_count": 487
} | 56 |
import { useTheme } from "next-themes";
import { Button } from "../ui/button";
import { Moon, Sun } from "lucide-react";
export const ToggleTheme = () => {
const { theme, setTheme } = useTheme();
return (
<Button
onClick={() => setTheme(theme === "light" ? "dark" : "light")}
size="sm"
variant... | nobruf/shadcn-landing-page/components/layout/toogle-theme.tsx | {
"file_path": "nobruf/shadcn-landing-page/components/layout/toogle-theme.tsx",
"repo_id": "nobruf/shadcn-landing-page",
"token_count": 317
} | 57 |
"use client";
import * as React from "react";
import * as SheetPrimitive from "@radix-ui/react-dialog";
import { cva, type VariantProps } from "class-variance-authority";
import { X } from "lucide-react";
import { cn } from "@/lib/utils";
const Sheet = SheetPrimitive.Root;
const SheetTrigger = SheetPrimitive.Trigge... | nobruf/shadcn-landing-page/components/ui/sheet.tsx | {
"file_path": "nobruf/shadcn-landing-page/components/ui/sheet.tsx",
"repo_id": "nobruf/shadcn-landing-page",
"token_count": 1630
} | 58 |
import Link from "next/link"
import { docsConfig } from "@/config/docs"
import { siteConfig } from "@/config/site"
import { Icons } from "@/components/icons"
import { MainNav } from "@/components/main-nav"
import { DocsSearch } from "@/components/search"
import { DocsSidebarNav } from "@/components/sidebar-nav"
import... | shadcn-ui/taxonomy/app/(docs)/layout.tsx | {
"file_path": "shadcn-ui/taxonomy/app/(docs)/layout.tsx",
"repo_id": "shadcn-ui/taxonomy",
"token_count": 714
} | 59 |
import { getServerSession } from "next-auth/next"
import { z } from "zod"
import { proPlan } from "@/config/subscriptions"
import { authOptions } from "@/lib/auth"
import { stripe } from "@/lib/stripe"
import { getUserSubscriptionPlan } from "@/lib/subscription"
import { absoluteUrl } from "@/lib/utils"
const billing... | shadcn-ui/taxonomy/app/api/users/stripe/route.ts | {
"file_path": "shadcn-ui/taxonomy/app/api/users/stripe/route.ts",
"repo_id": "shadcn-ui/taxonomy",
"token_count": 676
} | 60 |
interface DashboardHeaderProps {
heading: string
text?: string
children?: React.ReactNode
}
export function DashboardHeader({
heading,
text,
children,
}: DashboardHeaderProps) {
return (
<div className="flex items-center justify-between px-2">
<div className="grid gap-1">
<h1 className=... | shadcn-ui/taxonomy/components/header.tsx | {
"file_path": "shadcn-ui/taxonomy/components/header.tsx",
"repo_id": "shadcn-ui/taxonomy",
"token_count": 201
} | 61 |
import * as React from "react"
import { siteConfig } from "@/config/site"
import { cn } from "@/lib/utils"
import { Icons } from "@/components/icons"
import { ModeToggle } from "@/components/mode-toggle"
export function SiteFooter({ className }: React.HTMLAttributes<HTMLElement>) {
return (
<footer className={c... | shadcn-ui/taxonomy/components/site-footer.tsx | {
"file_path": "shadcn-ui/taxonomy/components/site-footer.tsx",
"repo_id": "shadcn-ui/taxonomy",
"token_count": 994
} | 62 |
"use client"
import * as React from "react"
import * as SliderPrimitive from "@radix-ui/react-slider"
import { cn } from "@/lib/utils"
const Slider = React.forwardRef<
React.ElementRef<typeof SliderPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
>(({ className, ...props }, ref) => (
... | shadcn-ui/taxonomy/components/ui/slider.tsx | {
"file_path": "shadcn-ui/taxonomy/components/ui/slider.tsx",
"repo_id": "shadcn-ui/taxonomy",
"token_count": 379
} | 63 |
import { SiteConfig } from "types"
export const siteConfig: SiteConfig = {
name: "Taxonomy",
description:
"An open source application built using the new router, server components and everything new in Next.js 13.",
url: "https://tx.shadcn.com",
ogImage: "https://tx.shadcn.com/og.jpg",
links: {
twitt... | shadcn-ui/taxonomy/config/site.ts | {
"file_path": "shadcn-ui/taxonomy/config/site.ts",
"repo_id": "shadcn-ui/taxonomy",
"token_count": 142
} | 64 |
import * as z from "zod"
export const userNameSchema = z.object({
name: z.string().min(3).max(32),
})
| shadcn-ui/taxonomy/lib/validations/user.ts | {
"file_path": "shadcn-ui/taxonomy/lib/validations/user.ts",
"repo_id": "shadcn-ui/taxonomy",
"token_count": 41
} | 65 |
import { User } from "@prisma/client"
import type { Icon } from "lucide-react"
import { Icons } from "@/components/icons"
export type NavItem = {
title: string
href: string
disabled?: boolean
}
export type MainNavItem = NavItem
export type SidebarNavItem = {
title: string
disabled?: boolean
external?: b... | shadcn-ui/taxonomy/types/index.d.ts | {
"file_path": "shadcn-ui/taxonomy/types/index.d.ts",
"repo_id": "shadcn-ui/taxonomy",
"token_count": 391
} | 66 |
"use client"
import * as React from "react"
import { TrendingUp } from "lucide-react"
import { Label, Pie, PieChart } from "recharts"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import {
ChartConfig,
ChartContainer,
ChartToolti... | shadcn-ui/ui/apps/www/__registry__/new-york/block/chart-pie-stacked.tsx | {
"file_path": "shadcn-ui/ui/apps/www/__registry__/new-york/block/chart-pie-stacked.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 1498
} | 67 |
import Link from "next/link"
import {
Bell,
CircleUser,
Home,
LineChart,
Menu,
Package,
Package2,
Search,
ShoppingCart,
Users,
} from "lucide-react"
import { Badge } from "@/registry/new-york/ui/badge"
import { Button } from "@/registry/new-york/ui/button"
import {
Card,
CardContent,
CardDesc... | shadcn-ui/ui/apps/www/__registry__/new-york/block/dashboard-02.tsx | {
"file_path": "shadcn-ui/ui/apps/www/__registry__/new-york/block/dashboard-02.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 5250
} | 68 |
import { Metadata } from "next"
import Link from "next/link"
import { Announcement } from "@/components/announcement"
import {
PageActions,
PageHeader,
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import { Button } from "@/registry/new-york/ui/button"
export const metadata: Meta... | shadcn-ui/ui/apps/www/app/(app)/colors/layout.tsx | {
"file_path": "shadcn-ui/ui/apps/www/app/(app)/colors/layout.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 477
} | 69 |
"use client"
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import { z } from "zod"
import { toast } from "@/registry/new-york/hooks/use-toast"
import { Button } from "@/registry/new-york/ui/button"
import { Checkbox } from "@/registry/new-... | shadcn-ui/ui/apps/www/app/(app)/examples/forms/notifications/notifications-form.tsx | {
"file_path": "shadcn-ui/ui/apps/www/app/(app)/examples/forms/notifications/notifications-form.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 4297
} | 70 |
import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york/ui/button"
import { ScrollArea } from "@/registry/new-york/ui/scroll-area"
import { Playlist } from "../data/playlists"
interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
playlists: Playlist[]
}
export function Sidebar(... | shadcn-ui/ui/apps/www/app/(app)/examples/music/components/sidebar.tsx | {
"file_path": "shadcn-ui/ui/apps/www/app/(app)/examples/music/components/sidebar.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 4614
} | 71 |
"use client"
import { ColumnDef } from "@tanstack/react-table"
import { Badge } from "@/registry/new-york/ui/badge"
import { Checkbox } from "@/registry/new-york/ui/checkbox"
import { labels, priorities, statuses } from "../data/data"
import { Task } from "../data/schema"
import { DataTableColumnHeader } from "./dat... | shadcn-ui/ui/apps/www/app/(app)/examples/tasks/components/columns.tsx | {
"file_path": "shadcn-ui/ui/apps/www/app/(app)/examples/tasks/components/columns.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 1467
} | 72 |
import Link from "next/link"
import { ThemeWrapper } from "@/components/theme-wrapper"
import { styles } from "@/registry/registry-styles"
interface SinkLayoutProps {
children: React.ReactNode
}
export default function SinkLayout({ children }: SinkLayoutProps) {
return (
<div className="flex flex-col">
... | shadcn-ui/ui/apps/www/app/(app)/sink/layout.tsx | {
"file_path": "shadcn-ui/ui/apps/www/app/(app)/sink/layout.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 317
} | 73 |
"use client"
import * as React from "react"
import { AnimatePresence, motion } from "framer-motion"
import { useLiftMode } from "@/hooks/use-lift-mode"
import { Block } from "@/registry/schema"
export function BlockWrapper({
block,
children,
}: React.PropsWithChildren<{ block: Block }>) {
const { isLiftMode } ... | shadcn-ui/ui/apps/www/components/block-wrapper.tsx | {
"file_path": "shadcn-ui/ui/apps/www/components/block-wrapper.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 918
} | 74 |
"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... | shadcn-ui/ui/apps/www/components/drawer.tsx | {
"file_path": "shadcn-ui/ui/apps/www/components/drawer.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 373
} | 75 |
"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 {... | shadcn-ui/ui/apps/www/components/style-switcher.tsx | {
"file_path": "shadcn-ui/ui/apps/www/components/style-switcher.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 540
} | 76 |
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(),
})
const colorPaletteSchema = z.object({
... | shadcn-ui/ui/apps/www/lib/colors.ts | {
"file_path": "shadcn-ui/ui/apps/www/lib/colors.ts",
"repo_id": "shadcn-ui/ui",
"token_count": 994
} | 77 |
"use client"
import { Users } from "lucide-react"
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@/registry/default/ui/card"
export default function Component() {
return (
<Card x-chunk="dashboard-01-chunk-1">
<CardHeader className="flex flex-row items-center justify-between space-y-0... | shadcn-ui/ui/apps/www/registry/default/block/dashboard-01-chunk-1.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/block/dashboard-01-chunk-1.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 282
} | 78 |
"use client"
import { Button } from "@/registry/default/ui/button"
import {
Card,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/default/ui/card"
export default function Component() {
return (
<Card className="sm:col-span-2" x-chunk="dashboard-05-chunk-0">
<CardHeader cla... | shadcn-ui/ui/apps/www/registry/default/block/dashboard-05-chunk-0.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/block/dashboard-05-chunk-0.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 282
} | 79 |
import {
Avatar,
AvatarFallback,
AvatarImage,
} from "@/registry/default/ui/avatar"
export default function AvatarDemo() {
return (
<Avatar>
<AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
<AvatarFallback>CN</AvatarFallback>
</Avatar>
)
}
| shadcn-ui/ui/apps/www/registry/default/example/avatar-demo.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/avatar-demo.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 119
} | 80 |
import { Button } from "@/registry/default/ui/button"
export default function ButtonLink() {
return <Button variant="link">Link</Button>
}
| shadcn-ui/ui/apps/www/registry/default/example/button-link.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/button-link.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 41
} | 81 |
import { CardsActivityGoal } from "@/registry/default/example/cards/activity-goal"
import { CardsCalendar } from "@/registry/default/example/cards/calendar"
import { CardsChat } from "@/registry/default/example/cards/chat"
import { CardsCookieSettings } from "@/registry/default/example/cards/cookie-settings"
import { C... | shadcn-ui/ui/apps/www/registry/default/example/cards/index.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/cards/index.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 1225
} | 82 |
import {
ContextMenu,
ContextMenuCheckboxItem,
ContextMenuContent,
ContextMenuItem,
ContextMenuLabel,
ContextMenuRadioGroup,
ContextMenuRadioItem,
ContextMenuSeparator,
ContextMenuShortcut,
ContextMenuSub,
ContextMenuSubContent,
ContextMenuSubTrigger,
ContextMenuTrigger,
} from "@/registry/def... | shadcn-ui/ui/apps/www/registry/default/example/context-menu-demo.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/context-menu-demo.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 956
} | 83 |
import { Input } from "@/registry/default/ui/input"
import { Label } from "@/registry/default/ui/label"
export default function InputFile() {
return (
<div className="grid w-full max-w-sm items-center gap-1.5">
<Label htmlFor="picture">Picture</Label>
<Input id="picture" type="file" />
</div>
)... | shadcn-ui/ui/apps/www/registry/default/example/input-file.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/input-file.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 120
} | 84 |
"use client"
import * as React from "react"
import { Progress } from "@/registry/default/ui/progress"
export default function ProgressDemo() {
const [progress, setProgress] = React.useState(13)
React.useEffect(() => {
const timer = setTimeout(() => setProgress(66), 500)
return () => clearTimeout(timer)
... | shadcn-ui/ui/apps/www/registry/default/example/progress-demo.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/progress-demo.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 126
} | 85 |
import { Skeleton } from "@/registry/default/ui/skeleton"
export default function SkeletonDemo() {
return (
<div className="flex items-center space-x-4">
<Skeleton className="h-12 w-12 rounded-full" />
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton classN... | shadcn-ui/ui/apps/www/registry/default/example/skeleton-demo.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/skeleton-demo.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 160
} | 86 |
"use client"
import { useToast } from "@/registry/default/hooks/use-toast"
import { Button } from "@/registry/default/ui/button"
import { ToastAction } from "@/registry/default/ui/toast"
export default function ToastWithAction() {
const { toast } = useToast()
return (
<Button
variant="outline"
on... | shadcn-ui/ui/apps/www/registry/default/example/toast-with-action.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/toast-with-action.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 240
} | 87 |
export default function TypographyDemo() {
return (
<div>
<h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
The Joke Tax Chronicles
</h1>
<p className="leading-7 [&:not(:first-child)]:mt-6">
Once upon a time, in a far-off land, there was a very lazy ... | shadcn-ui/ui/apps/www/registry/default/example/typography-demo.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/default/example/typography-demo.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 2473
} | 88 |
"use client"
import { Bar, BarChart, Rectangle, XAxis } from "recharts"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/registry/new-york//ui/card"
import { ChartContainer } from "@/registry/new-york//ui/chart"
export default function Component() {
return (
<Card classNa... | shadcn-ui/ui/apps/www/registry/new-york/block/charts-01-chunk-6.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/block/charts-01-chunk-6.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 1554
} | 89 |
"use client"
import Link from "next/link"
export default function Component() {
return (
<nav
className="grid gap-4 text-sm text-muted-foreground"
x-chunk="dashboard-04-chunk-0"
>
<Link href="#" className="font-semibold text-primary">
General
</Link>
<Link href="#">Secu... | shadcn-ui/ui/apps/www/registry/new-york/block/dashboard-04-chunk-0.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/block/dashboard-04-chunk-0.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 213
} | 90 |
"use client"
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@/registry/new-york/ui/card"
import { Label } from "@/registry/new-york/ui/label"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/registry/new-york/ui/select"
export default function Component()... | shadcn-ui/ui/apps/www/registry/new-york/block/dashboard-07-chunk-2.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/block/dashboard-07-chunk-2.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 832
} | 91 |
"use client"
import * as React from "react"
import { PanelLeft } from "lucide-react"
import { useIsMobile } from "@/registry/new-york/hooks/use-mobile"
import { cn } from "@/registry/new-york/lib/utils"
import { Button } from "@/registry/new-york/ui/button"
import { Sheet, SheetContent } from "@/registry/new-york/ui/... | shadcn-ui/ui/apps/www/registry/new-york/block/sidebar-01/ui/sidebar.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/block/sidebar-01/ui/sidebar.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 2075
} | 92 |
import { SlashIcon } from "@radix-ui/react-icons"
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from "@/registry/new-york/ui/breadcrumb"
export default function BreadcrumbWithCustomSeparator() {
return (
<Breadcrumb>
<BreadcrumbList... | shadcn-ui/ui/apps/www/registry/new-york/example/breadcrumb-separator.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/breadcrumb-separator.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 426
} | 93 |
"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... | shadcn-ui/ui/apps/www/registry/new-york/example/cards/calendar.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/cards/calendar.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 274
} | 94 |
"use client"
import { zodResolver } from "@hookform/resolvers/zod"
import { CaretSortIcon, CheckIcon } from "@radix-ui/react-icons"
import { useForm } from "react-hook-form"
import { z } from "zod"
import { cn } from "@/lib/utils"
import { toast } from "@/registry/new-york/hooks/use-toast"
import { Button } from "@/r... | shadcn-ui/ui/apps/www/registry/new-york/example/combobox-form.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/combobox-form.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 2488
} | 95 |
import { Button } from "@/registry/new-york/ui/button"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuPortal,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMen... | shadcn-ui/ui/apps/www/registry/new-york/example/dropdown-menu-demo.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/dropdown-menu-demo.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 1159
} | 96 |
import {
Menubar,
MenubarCheckboxItem,
MenubarContent,
MenubarItem,
MenubarMenu,
MenubarRadioGroup,
MenubarRadioItem,
MenubarSeparator,
MenubarShortcut,
MenubarSub,
MenubarSubContent,
MenubarSubTrigger,
MenubarTrigger,
} from "@/registry/new-york/ui/menubar"
export default function MenubarDem... | shadcn-ui/ui/apps/www/registry/new-york/example/menubar-demo.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/menubar-demo.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 1880
} | 97 |
import * as React from "react"
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectTrigger,
SelectValue,
} from "@/registry/new-york/ui/select"
export default function SelectScrollable() {
return (
<Select>
<SelectTrigger className="w-[280px]">
<SelectValue pl... | shadcn-ui/ui/apps/www/registry/new-york/example/select-scrollable.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/select-scrollable.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 1268
} | 98 |
import { Label } from "@/registry/new-york/ui/label"
import { Textarea } from "@/registry/new-york/ui/textarea"
export default function TextareaWithLabel() {
return (
<div className="grid w-full gap-1.5">
<Label htmlFor="message">Your message</Label>
<Textarea placeholder="Type your message here." id... | shadcn-ui/ui/apps/www/registry/new-york/example/textarea-with-label.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/textarea-with-label.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 127
} | 99 |
import { FontItalicIcon } from "@radix-ui/react-icons"
import { Toggle } from "@/registry/new-york/ui/toggle"
export default function ToggleOutline() {
return (
<Toggle variant="outline" aria-label="Toggle italic">
<FontItalicIcon className="h-4 w-4" />
</Toggle>
)
}
| shadcn-ui/ui/apps/www/registry/new-york/example/toggle-outline.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/toggle-outline.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 113
} | 100 |
export default function TypographySmall() {
return (
<small className="text-sm font-medium leading-none">Email address</small>
)
}
| shadcn-ui/ui/apps/www/registry/new-york/example/typography-small.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/example/typography-small.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 42
} | 101 |
"use client"
import * as React from "react"
import * as RechartsPrimitive from "recharts"
import {
NameType,
Payload,
ValueType,
} from "recharts/types/component/DefaultTooltipContent"
import { cn } from "@/lib/utils"
// Format: { THEME_NAME: CSS_SELECTOR }
const THEMES = { light: "", dark: ".dark" } as const
... | shadcn-ui/ui/apps/www/registry/new-york/ui/chart.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/ui/chart.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 5198
} | 102 |
"use client"
import { useToast } from "@/registry/new-york/hooks/use-toast"
import {
Toast,
ToastClose,
ToastDescription,
ToastProvider,
ToastTitle,
ToastViewport,
} from "@/registry/new-york/ui/toast"
export function Toaster() {
const { toasts } = useToast()
return (
<ToastProvider>
{toast... | shadcn-ui/ui/apps/www/registry/new-york/ui/toaster.tsx | {
"file_path": "shadcn-ui/ui/apps/www/registry/new-york/ui/toaster.tsx",
"repo_id": "shadcn-ui/ui",
"token_count": 396
} | 103 |
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;
--primary: 240 5.9% 10%;
--primary-foregr... | shadcn-ui/ui/apps/www/styles/globals.css | {
"file_path": "shadcn-ui/ui/apps/www/styles/globals.css",
"repo_id": "shadcn-ui/ui",
"token_count": 1124
} | 104 |
import chalk from "chalk"
export const DEPRECATED_MESSAGE = chalk.yellow(
`\nNote: The shadcn-ui CLI is going to be deprecated soon. Please use ${chalk.bold(
"npx shadcn"
)} instead.\n`
)
| shadcn-ui/ui/packages/cli/src/deprecated.ts | {
"file_path": "shadcn-ui/ui/packages/cli/src/deprecated.ts",
"repo_id": "shadcn-ui/ui",
"token_count": 77
} | 105 |
import { Transformer } from "@/src/utils/transformers"
import { SyntaxKind } from "ts-morph"
export const transformRsc: Transformer = async ({ sourceFile, config }) => {
if (config.rsc) {
return sourceFile
}
// Remove "use client" from the top of the file.
const first = sourceFile.getFirstChildByKind(Synt... | shadcn-ui/ui/packages/cli/src/utils/transformers/transform-rsc.ts | {
"file_path": "shadcn-ui/ui/packages/cli/src/utils/transformers/transform-rsc.ts",
"repo_id": "shadcn-ui/ui",
"token_count": 143
} | 106 |
body {
background-color: red;
}
| shadcn-ui/ui/packages/cli/test/fixtures/next-app/app/other.css | {
"file_path": "shadcn-ui/ui/packages/cli/test/fixtures/next-app/app/other.css",
"repo_id": "shadcn-ui/ui",
"token_count": 13
} | 107 |
export const FRAMEWORKS = {
"next-app": {
name: "next-app",
label: "Next.js",
links: {
installation: "https://ui.shadcn.com/docs/installation/next",
tailwind: "https://tailwindcss.com/docs/guides/nextjs",
},
},
"next-pages": {
name: "next-pages",
label: "Next.js",
links: {
... | shadcn-ui/ui/packages/shadcn/src/utils/frameworks.ts | {
"file_path": "shadcn-ui/ui/packages/shadcn/src/utils/frameworks.ts",
"repo_id": "shadcn-ui/ui",
"token_count": 802
} | 108 |
@tailwind base;
@tailwind components;
@tailwind utilities;
| shadcn-ui/ui/packages/shadcn/test/fixtures/config-full/src/app/globals.css | {
"file_path": "shadcn-ui/ui/packages/shadcn/test/fixtures/config-full/src/app/globals.css",
"repo_id": "shadcn-ui/ui",
"token_count": 18
} | 109 |
body {
background-color: red;
}
| shadcn-ui/ui/packages/shadcn/test/fixtures/frameworks/next-app/app/other.css | {
"file_path": "shadcn-ui/ui/packages/shadcn/test/fixtures/frameworks/next-app/app/other.css",
"repo_id": "shadcn-ui/ui",
"token_count": 13
} | 110 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.