text
stringlengths
3
8.33k
repo
stringclasses
52 values
path
stringlengths
6
141
language
stringclasses
35 values
sha
stringlengths
64
64
chunk_index
int32
0
273
n_tokens
int32
1
896
dist node_modules .next build .contentlayer apps/www/pages/api/registry.json **/fixtures
synth-ui
.prettierignore
Prettier Ignore
da9c57e74413f8500be4baaf1b72eed458cad8bd4322dd2d9194c495c8ccd1ea
0
22
import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server"; const isProtectedRoute = createRouteMatcher(["/chat(.*)"]); export default clerkMiddleware((auth, req) => { if (isProtectedRoute(req)) auth().protect(); }); export const config = { matcher: [ // Skip Next.js internals and all static ...
synth-ui
middleware.ts
TypeScript
143410675ccd178cae5cefef4e175417ab739a377692829f37a7a4f392253fca
0
195
/** @type {import('next').NextConfig} */ const nextConfig = { images: { remotePatterns: [{ hostname: "img.clerk.com" }], }, }; export default nextConfig;
synth-ui
next.config.mjs
JavaScript
281888c4cbe687d8a2e80ec7d7efa84bc753c3e4fb3ab1868cb2118fca115856
0
48
{ "name": "synth_ui", "version": "0.7.0", "private": false, "scripts": { "dev": "next dev --turbo", "build": "next build", "start": "next start", "lint": "next lint", "prepare": "husky", "pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json}\"" }, "dependencies": { "@a...
synth-ui
package.json
JSON
a2fd1b61297a39e84d037bc89e18db51e059c25c5089fddd3096fe07712a8351
0
896
-autosize": "^8.5.3", "react-wrap-balancer": "^1.1.1", "recharts": "^2.12.7", "remark-gfm": "^3.0.1", "remark-math": "^5.1.1", "sonner": "^1.5.0", "tailwind-merge": "^2.5.2", "tailwindcss-animate": "^1.0.7", "vaul": "^1.0.0", "zod": "^3.23.8", "zustand": "^5.0.0" }, "devDepen...
synth-ui
package.json
JSON
3cc5f302b3b697e9a4701e7a8fb8f92621ee02e37529cdc489751010d78e9efc
1
276
<div align="center"> <img alt="Synth UI - Open Source Generative UI with natural language" src="public/assets/videos/synth_ui_clip1.gif" width="100%"> <h3>Synth UI</h3> <p> Open Source Generative UI with natural language </p> <p align="center"><a href="https://www.synthui.design/">✨ Homepage</a> | <a href="https://...
synth-ui
README.md
Markdown
1c29c7843a4d9148fd1cc57598f6a92df83340c3a0e0f227f7efac908b71fd09
0
896
-20241022 - [x] Mistral - [x] mistral-large-latest - [x] mistral-small-latest - [x] pixtral-12b-2409 - [x] Gemini - [x] gemini-1.5-flash - [x] gemini-1.5-pro - [x] Support for major UI-Libraries - [x] shadcn/ui - [x] Flowbite - [x] NextUI - [ ] Magic UI - [ ] Aceternity UI - [x] Agent ...
synth-ui
README.md
Markdown
b0772e9bbf679a99289bc605d43d483706901741a38bb363ec4d0e03ae843181
1
169
import type { Config } from "tailwindcss"; const { fontFamily } = require("tailwindcss/defaultTheme"); const colors = require("tailwindcss/colors"); const { default: flattenColorPalette, } = require("tailwindcss/lib/util/flattenColorPalette"); /** @type {import('tailwindcss').Config} */ module.exports = { darkMode...
synth-ui
tailwind.config.ts
TypeScript
75b8e92891aa4298b2a1cd6e636027cb7008679ea67bf6bbfaa6ea2cc13a3628
0
896
: { height: "var(--radix-accordion-content-height)", }, }, "accordion-up": { from: { height: "var(--radix-accordion-content-height)", }, to: { height: "0", }, }, scroll: { to: { tr...
synth-ui
tailwind.config.ts
TypeScript
3f797128a7b2f11219b60bb585d13989dee396d134c990c97ccfc16d7bad4760
1
431
name: 🐛 Bug Report description: Report a bug or issue in Synth UI title: "[BUG] <title>" labels: ["bug", "triage"] body: - type: markdown attributes: value: | # Bug Report for Synth UI Thank you for taking the time to report this issue! Please provide detailed information to help us resolve...
synth-ui
.github/ISSUE_TEMPLATE/bug_report.yml
YAML
b2c23c7cc65e667cc7246ef3ac379568dd4041fb85b634870ac8dd8f53cfb738
0
499
name: ✨ Feature Request description: Propose a new feature for Synth UI labels: ["enhancement"] body: - type: markdown attributes: value: | # Feature Request for Synth UI Thank you for taking the time to propose a new feature! Please provide detailed information to help us understand and eva...
synth-ui
.github/ISSUE_TEMPLATE/feature_request.yml
YAML
491887807e8a1d4e3afc0f5cb7875b045c55b32e4fd626a5f37f2aa5cf1ba1bb
0
291
import { GeistSans } from "geist/font/sans"; import "@/styles/globals.css"; import { cn } from "@/lib/utils"; import { Metadata, Viewport } from "next"; import { Providers } from "@/components/providers"; import { Toaster } from "@/components/ui/sonner"; import { Analytics } from "@vercel/analytics/react"; import { Spe...
synth-ui
app/layout.tsx
TypeScript
a9ae07bd109f70a0c4be2b60f8364b83447599b21e54c31a2048bba2693eccb8
0
764
"use client"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { Button, buttonVariants } from "@/components/ui/button"; import { Alert01Icon } from "hugeicons-react"; import { ChevronLeftIcon } from "@radix-ui/react-icons"; export default function NotFound() { const router = useRo...
synth-ui
app/not-found.tsx
TypeScript
518e96c537db47562af553b067952b4a103f03529307de23a29668acd9a27538
0
419
import { cn } from "@/lib/utils"; import { HorizontalGradient } from "@/components/marketing/horizontal-gradient"; import Link from "next/link"; import { buttonVariants } from "@/components/ui/button"; import { ArrowLeftIcon } from "@radix-ui/react-icons"; import { FileScriptIcon } from "hugeicons-react"; export defau...
synth-ui
app/(auth)/layout.tsx
TypeScript
8b0bed64c27a91e50825da2901461bfeaf115b3885af6c7f7b0ccbffc671280a
0
512
"use client"; import { SignIn, useUser } from "@clerk/nextjs"; import { experimental__simple, dark } from "@clerk/themes"; import { useTheme } from "next-themes"; import { redirect } from "next/navigation"; export const runtime = "edge"; export const preferredRegion = "home"; export default function SignInPage() { ...
synth-ui
app/(auth)/sign-in/[[...sign-in]]/page.tsx
TypeScript
fac4319b5996e15cac986dfcd72b5c0c8b14665a809151de13920b481f4e7609
0
170
import ComponentPreviewPanel from "@/components/component-preview-panel"; import { ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"; export default function ChatWrapperLayout({ children, }: { children: React.ReactNode; }) { return ( <div className="flex h-full max-h-screen overflow-hidd...
synth-ui
app/(chat)/layout.tsx
TypeScript
612d8589ae4e05e33fe93e4e047fdd9c1b3153669ae5a858d3e35b67042bb63c
0
116
import Sidebar from "@/components/sidebar"; export default function ChatLayout({ children, }: { children: React.ReactNode; }) { return ( <div className="flex min-h-screen overflow-hidden"> <Sidebar /> <div className="min-h-full w-full overflow-hidden">{children}</div> </div> ); }
synth-ui
app/(chat)/chat/layout.tsx
TypeScript
7644561f5f741b277246bbd817c0031900a0db5d3f666822453b2437e6a842df
0
85
import { Chat } from "@/components/chat"; import { getMissingKeys } from "@/lib/actions/chat"; import { AI } from "@/lib/ai/core"; import { generateId } from "ai"; export const runtime = "edge"; export const preferredRegion = "home"; export const metadata = { title: "New Chat - Synth UI", }; export default async f...
synth-ui
app/(chat)/chat/page.tsx
TypeScript
e1f8654fd7b9e80a9c0c1457d705134f0a7142549f711003642b166a378add42
0
134
import { Chat } from "@/components/chat"; import { getChat, getMissingKeys } from "@/lib/actions/chat"; import { AI, getUIStateFromAIState } from "@/lib/ai/core"; import { currentUser } from "@clerk/nextjs/server"; import { Metadata } from "next"; import { notFound, redirect } from "next/navigation"; export const runt...
synth-ui
app/(chat)/chat/[id]/page.tsx
TypeScript
b5211e8d2b6a89da7bf8095e09bb7f167d81de1c98070ee95ea30c93e828f69b
0
410
import { Suspense } from "react"; import ChatHistorySearchForm from "@/components/chat-history-search-form"; import { getChats } from "@/lib/actions/chat"; import { currentUser } from "@clerk/nextjs/server"; import { redirect } from "next/navigation"; import { ChatHistorySkeleton } from "@/components/chat-history-skele...
synth-ui
app/(chat)/chat/history/page.tsx
TypeScript
6001f1026ff6885d0d0115695bda56ed675532d69132e5f08bf8b4b14a2c2d99
0
467
import { type Metadata } from "next"; import { notFound } from "next/navigation"; import { formatDate } from "@/lib/utils"; import { getSharedChat } from "@/lib/actions/chat"; import { ChatList } from "@/components/chat-list"; import { AI, UIState, getUIStateFromAIState } from "@/lib/ai/core"; import { ScrollArea } fro...
synth-ui
app/(chat)/share/[id]/page.tsx
TypeScript
d6248f19a693c017375d6bbd7bdb01eb2575154b9e7af092427942ac9f67e5b6
0
537
import "@/styles/globals.css"; import { NavBar } from "@/components/marketing/navbar"; import { Footer } from "@/components/marketing/footer"; import { Suspense } from "react"; export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { return ( <main> <Suspense fallba...
synth-ui
app/(marketing)/layout.tsx
TypeScript
1f1c50f1fd78775b80b9921f13fd183fd8941488799b3610e9e7ad23d1ea7b47
0
140
import { Hero } from "@/components/marketing/hero"; import { Background } from "@/components/marketing/background"; import { Features } from "@/components/marketing/features"; import { Companies } from "@/components/marketing/companies"; import { GridFeatures } from "@/components/marketing/grid-features"; import { CTA ...
synth-ui
app/(marketing)/page.tsx
TypeScript
93d827ca77e81948c7c86f4efb0a20a31be28b584760e7c59f3fa44f791c9fd7
0
242
import { Skeleton } from "@/components/ui/skeleton"; export default function ChatHeaderSkeleton() { return ( <header className="flex justify-between px-5 py-2"> <div className="flex items-center gap-3"> <Skeleton className="h-4 w-4 md:hidden" /> <div className="flex items-center gap-1.5"> ...
synth-ui
components/chat-header-skeleton.tsx
TypeScript
c9bd612f1d18d691b8fc7691af9e26ab6021212392c538adca8ea5965f4008e4
0
175
"use client"; import { Menu01Icon, SentIcon, SquareLock02Icon, SquareUnlock02Icon, } from "hugeicons-react"; import { Button } from "@/components/ui/button"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { useSidebar } from "@/components/ui/sidebar"; import { ...
synth-ui
components/chat-header.tsx
TypeScript
31b12bd19783fc0d5818fee27163d8c6ec2ee7f3f0dcaa5f951abbc8b53498aa
0
611
import { Card } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { Skeleton } from "@/components/ui/skeleton"; export default function ChatHistoryCardSkeleton() { return ( <Card className="flex flex-col gap-2 p-4"> <Skeleton className="flex h-6 w-3/4 items-center g...
synth-ui
components/chat-history-card-skeleton.tsx
TypeScript
f909a8f004b3569e94b20c21aad44d8deb6a705eff29bde42cfa9152ad569677
0
190
import { Card } from "@/components/ui/card"; import { ChatPublicBadge } from "@/components/chat-public-badge"; import { Separator } from "@/components/ui/separator"; import { ChatPopover } from "@/components/chat-popover"; import Link from "next/link"; import moment from "moment"; import { Chat } from "@/lib/types"; e...
synth-ui
components/chat-history-card.tsx
TypeScript
0929bf1c946a7a45cd74258c4d0309c0c1f5e4251483d0ff4b6f5fddc73fe43e
0
329
"use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import ChatHistoryCard from "@/components/chat-history-card"; import { buttonVariants } from "@/components/ui/button"; import { ScrollArea } from "@/components/ui/scroll-area"; import { cn } from "@/lib/util...
synth-ui
components/chat-history-search-form.tsx
TypeScript
6c5ac375a717819b0838deea2a8120b77c2524905a073ba996b67379cf3cdc74
0
896
> </div> {isLoading ? ( <ChatHistorySkeleton /> ) : filteredChats.length > 0 ? ( <ScrollArea> <div className="mx-auto grid h-full w-4/5 grid-cols-1 gap-4 p-4 sm:grid-cols-2 md:grid-cols-3"> {filteredChats.map((chat) => ( <ChatHistoryC...
synth-ui
components/chat-history-search-form.tsx
TypeScript
00910f22a83917aa2ae2bb6eb7c741f6a12ae090d20b6da3a741e6e60cf3b648
1
331
import ChatHistoryCardSkeleton from "@/components/chat-history-card-skeleton"; import { ScrollArea } from "@/components/ui/scroll-area"; export function ChatHistorySkeleton() { return ( <ScrollArea> <div className="mx-auto grid h-full w-4/5 grid-cols-1 gap-4 p-4 sm:grid-cols-2 md:grid-cols-3"> {Arr...
synth-ui
components/chat-history-skeleton.tsx
TypeScript
7c2d0f1ec324db8363fd3c6428911e4bc530a4c1bfff71d215ab2ae061f9862a
0
134
"use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { Form, FormControl, FormField } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { Popover, PopoverContent, PopoverTrigger, } from "@/...
synth-ui
components/chat-history-widget.tsx
TypeScript
afc1ebed805c7359d0fd0543adae1c54aec9124bd68668d05d9e29efe4e7258e
0
896
" role="search"> <FormField control={form.control} name="query" render={({ field }) => ( <div> <FormControl> <div className="relative"> <Input placeholder="Search for...
synth-ui
components/chat-history-widget.tsx
TypeScript
20c1653bc428a5b8822060b5bce1611c7009c1f6645039ce47f8949156a46da4
1
645
import { Skeleton } from "@/components/ui/skeleton"; import ChatHeaderSkeleton from "@/components/chat-header-skeleton"; import ComponentCardSkeleton from "@/components/component-card-skeleton"; import { Separator } from "@/components/ui/separator"; export function ChatListSkeleton() { return ( <div className="f...
synth-ui
components/chat-list-skeleton.tsx
TypeScript
222420ab7bfada462ab1d28930a2e34da7443a9385f65cef698e335b3f6b8c5b
0
411
import { Separator } from "@/components/ui/separator"; import { UIState } from "@/lib/ai/core"; export interface ChatList { messages: UIState; isShared: boolean; } export function ChatList({ messages }: ChatList) { if (!messages.length) { return null; } return ( <div className="relative mx-auto mb-...
synth-ui
components/chat-list.tsx
TypeScript
0ccbbf69c12b9c5d258ad7cbcb445432524697df32b6725ee70c501b8a8eff83
0
207
"use client"; import remarkGfm from "remark-gfm"; import remarkMath from "remark-math"; import { spinner } from "@/components/spinner"; import { cn } from "@/lib/utils"; import { CodeBlock } from "@/components/ui/codeblock"; import { MemoizedReactMarkdown } from "@/components/markdown"; import { StreamableValue } fro...
synth-ui
components/chat-message.tsx
TypeScript
4fe964b39d2751c8567721682e5d9bc44aeb62572311a3244d70019cde1883dc
0
896
.replace(/\n$/, "")} raw={raw} {...props} /> ); }, }} > {content} </MemoizedReactMarkdown> </div> ); } export function UserMessage({ children }: { children: React.ReactNode }) { return ( <div className="group re...
synth-ui
components/chat-message.tsx
TypeScript
c42498cad333940bc34282068e98d233859db6a8dbb095d6f1462bdfd0e9e0c0
1
728
import { TooltipButton } from "@/components/tooltip-button"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { Delete02Icon, Edit02Icon, MoreHorizontalIcon, SentIcon, } from "hugeicons-react"; import ChatRenameDialog from "@/components/chat-rename-dialog"; import...
synth-ui
components/chat-popover.tsx
TypeScript
c7261cede6779a3d9946d28e7a39a293b99265cba56295ffcfed4ec5fec3a249
0
499
"use client"; import { SquareLock02Icon, SquareUnlock02Icon } from "hugeicons-react"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; interface ChatPublicBadgeProps extends React.HTMLAttributes<HTMLDivElement> { isPublic: boolean; } export...
synth-ui
components/chat-public-badge.tsx
TypeScript
f1522fe17b91b7ea29453c01fd127ba528f3d860844fed8a75cafeeb18ec711a
0
174
"use client"; import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; import { Loading03Icon, PencilEdit01Icon, Tick02Icon } from "hugeicons-react"; import { renameChat } fr...
synth-ui
components/chat-rename-dialog.tsx
TypeScript
f66cc401961f8454ebdb546dc4f96594e6f844e0398e2ac5617e93c7c4670054
0
615
"use client"; import { useEffect, useState } from "react"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { Switch } from "@/components/ui/switch"; import { Globe02Icon, ...
synth-ui
components/chat-share-dialog.tsx
TypeScript
95eb0676a390df7560fe50c99452446f13787d685e7a11cbf49611190fc94ffc
0
896
=== undefined} variant={"outline"} className="flex gap-1.5" onClick={handleCopyLink} > {isLoading ? ( <Loading03Icon className="h-5 w-5 animate-spin" /> ) : isCopied ? ( <Tick02Icon className="h-5 w-5" /> ) : (...
synth-ui
components/chat-share-dialog.tsx
TypeScript
40d9388df72fc6a74f63a2c11c17f2198a60c3e8eb2b986f606c68e9c4902bbf
1
113
"use client"; import { useEffect, useState, useCallback, useMemo } from "react"; import { useAIState, useUIState } from "ai/rsc"; import { ChatList } from "@/components/chat-list"; import { ScrollArea } from "@/components/ui/scroll-area"; import dynamic from "next/dynamic"; import ChatHeader from "@/components/chat-he...
synth-ui
components/chat.tsx
TypeScript
15ef4e4f79c569b4fb5b31a6b083f899be58e232937dd3568860baaa993608b9
0
896
xl" /> </div> ) : ( <EmptyScreenWithBackground /> ); }, [isMounted, messages, messagesContainerRef, messagesEndRef]); return <div className="relative flex h-full flex-col">{renderContent}</div>; } const EmptyScreenWithBackground = () => ( <div className="relative flex h-full items-center jus...
synth-ui
components/chat.tsx
TypeScript
d11ea03c897659fad35b6bff035fb23bfd2dca01dd2bfccb43c8962e1ef36de9
1
128
import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; import { cn } from "@/lib/utils"; import React from "react"; interface ComponentCardSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {} export default function ComponentCardSkeleton({ className, }: Comp...
synth-ui
components/component-card-skeleton.tsx
TypeScript
7835b5bcabe3ab2e1835885bcc2c3a09bd3dd41b3f78bdec2951590ed1c1daa0
0
259
"use client"; import { ReactIcon } from "hugeicons-react"; import { Button } from "@/components/ui/button"; import { useComponentPreview } from "@/lib/hooks/use-component-preview"; import { useStreamableText } from "@/lib/hooks/use-streamable-text"; import { useCallback, useEffect, useState } from "react"; import { St...
synth-ui
components/component-card.tsx
TypeScript
84ef44d0b02ce6c1484917bad37703c798977dd33ff568cca3a756bc16732252
0
637
"use client"; import { ArrowRightDoubleIcon, GitForkIcon } from "hugeicons-react"; import { TooltipButton } from "@/components/tooltip-button"; import { useComponentPreview } from "@/lib/hooks/use-component-preview"; import NotImplementedDialog from "@/components/not-implemented-dialog"; import { ChatShareDialog } fro...
synth-ui
components/component-editor-preview-header.tsx
TypeScript
2f8b820b84573ae73b15d91df106c4185dc0eadb967453e8f0b3ec2129453761
0
342
"use client"; import { useEffect, useRef, useState } from "react"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Alert02Icon, BrowserIcon, CodeFolderIcon, DocumentValidationIcon, } from "hugeicons-react"; import { ScrollArea } from "@/components/ui/scroll-area"; impo...
synth-ui
components/component-editor-preview.tsx
TypeScript
038380cf29b33489995ce43eb5f583715736050169e4b954aef43838aae95ac8
0
739
"use client"; import { Drawer, DrawerContent } from "@/components/ui/drawer"; import ComponentEditorPreviewHeader from "@/components/component-editor-preview-header"; import ComponentEditorPreview from "@/components/component-editor-preview"; import { ResizableHandle, ResizablePanel } from "@/components/ui/resizable";...
synth-ui
components/component-preview-panel.tsx
TypeScript
007deb2977350999938953b084c390cc3dda891d1f68bdb910524b81a9ea723f
0
472
"use client"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { useAppState ...
synth-ui
components/delete-chat-dialog.tsx
TypeScript
6b5cc480e71311f5e4e5800319534dbeba67c6a5646088498356b5fcc6439287
0
660
"use client"; import { Badge } from "@/components/ui/badge"; import { LLMSelection } from "@/lib/types"; import { Copy01Icon, Share05Icon, Share08Icon, Tick02Icon, } from "hugeicons-react"; import { llms } from "@/components/llm-selector"; import { useCopyToClipboard } from "@/lib/hooks/use-copy-to-clipboard";...
synth-ui
components/disclaimer-badge.tsx
TypeScript
142d3dc69ae509c7f7a630f5669892c232cd6638f32590125926a9765d5b6a49
0
476
import { cn } from "@/lib/utils"; export default function EmptyScreenBackground() { return ( <div className="absolute z-0 h-full w-full"> <BackgroundGrids /> </div> ); } const BackgroundGrids = () => { return ( <div className="pointer-events-none absolute inset-0 z-0 grid h-full w-full -rotate...
synth-ui
components/empty-screen-background.tsx
TypeScript
88cee00f4a51388b74c959b3528883763cd2d0848abb15ad49bca22d932239e0
0
707
import React from "react"; export const EmptyScreenBadge: React.FC< { children: React.ReactNode } & React.ComponentPropsWithoutRef<"button"> > = ({ children, ...props }) => { return ( <button {...props} className="group relative mx-auto inline-block w-fit cursor-pointer rounded-full bg-teal-200/60 ...
synth-ui
components/empty-screen-badge.tsx
TypeScript
06aaa5f0cb0f384c02dff5c1100de1a74af42f29ef934348b129b94d37732eca
0
477
import PromptForm from "@/components/prompt-form"; import ExamplePrompts from "@/components/example-prompts"; import Balancer from "react-wrap-balancer"; import { EmptyScreenBadge } from "@/components/empty-screen-badge"; import { toast } from "sonner"; import { InfoCircledIcon } from "@radix-ui/react-icons"; import { ...
synth-ui
components/empty-screen.tsx
TypeScript
becda2f6f7b319c4fbd380ed5474fcaf15e02ff023798c9b88d53c5f9ca256fc
0
404
import { Alert02Icon } from "hugeicons-react"; import { BotCard, BotMessage } from "@/components/chat-message"; interface ErrorCardProps { message: string; } export default function ErrorCard({ message }: ErrorCardProps) { return ( <BotCard> <div className="-mx-2 flex h-fit w-full justify-start gap-3 ro...
synth-ui
components/error-card.tsx
TypeScript
cbbb70f718672643b29f383dcc03ef3cfb0571d870492ac7dbb84ffa603e8de6
0
248
"use client"; import { ExamplePrompt } from "@/lib/types"; import { Button } from "@/components/ui/button"; import { ArrowUpRight01Icon } from "hugeicons-react"; import { useActions, useUIState } from "ai/rsc"; import { AI } from "@/lib/ai/core"; import { generateId } from "ai"; import { UserMessage } from "@/componen...
synth-ui
components/example-prompts.tsx
TypeScript
5fb82ec7b82dc28ec37cee6c1a44237b99ba349ec91194e7930036a163e02696
0
718
"use client"; import { LLMSelection } from "@/lib/types"; import { Button } from "@/components/ui/button"; import Logo from "@/components/logo"; import { ArrowDown01Icon, Forward02Icon, SparklesIcon } from "hugeicons-react"; import { Select, SelectContent, SelectItem, SelectTrigger, } from "@/components/ui/sel...
synth-ui
components/llm-selector.tsx
TypeScript
bc1e27f6493154322e86115c27320aa0eb99a4e35a826bbc62d5a52338d26b6f
0
896
"h-4 w-4 text-muted-foreground" /> </motion.div> </Button> </SelectTrigger> <SelectContent className="mx-6 rounded-xl text-xl" side="right"> {llms.map((llm) => ( <SelectItem className="rounded-lg px-2 py-0.5" value={llm.value} key={llm....
synth-ui
components/llm-selector.tsx
TypeScript
e33a907cddfc31075abe03d8dd099a121d275d1d59a783d38d6a32c2993ea604
1
223
import { cn } from "@/lib/utils"; import { SiriIcon } from "hugeicons-react"; interface LogoProps extends React.HTMLAttributes<HTMLDivElement> {} export default function Logo({ className }: LogoProps) { return <SiriIcon className={cn("h-4 w-4", className)} />; }
synth-ui
components/logo.tsx
TypeScript
ae4b72cb5f8c534cf48767b510f9529decddd71728ae981182ce4cf2264ac297
0
71
import { FC, memo } from "react"; import ReactMarkdown, { Options } from "react-markdown"; export const MemoizedReactMarkdown: FC<Options> = memo( ReactMarkdown, (prevProps, nextProps) => prevProps.children === nextProps.children && prevProps.className === nextProps.className, );
synth-ui
components/markdown.tsx
TypeScript
65f20533c8926f1d746b7540ff704e2c9de3a93ad9434d995360777e8c8662bc
0
67
"use client"; import * as React from "react"; import { useTheme } from "next-themes"; import { Moon02Icon, Sun02Icon } from "hugeicons-react"; import { Button } from "@/components/ui/button"; export function ModeToggle({ children }: { children?: React.ReactNode }) { const { theme, setTheme } = useTheme(); const ...
synth-ui
components/mode-toggle.tsx
TypeScript
268d40049d094f1202d17175647b46f29488398deb8231744ab8c99f3af7bdae
0
291
import Link from "next/link"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { cn } from "@/lib/utils"; import { buttonVariants } from "@/components/ui/button"; import { GithubIcon } from "hugeicons-react"; interface NotI...
synth-ui
components/not-implemented-dialog.tsx
TypeScript
a546aec4d9de4dc8df215d1181eafe2e0c24b21aa5944083d9b90c328e1ce4ad
0
242
"use client"; import { useEnterSubmit } from "@/lib/hooks/use-enter-submit"; import Textarea from "react-textarea-autosize"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { Button } from "@/components/ui/button"; import { ArrowUp02Icon, Attachment01Icon } from "hugeic...
synth-ui
components/prompt-form.tsx
TypeScript
d5b8d9fea000201877738291ff6dc2084e6955c0179d6ea3d3104e1c18fc58a2
0
896
py-2.5 shadow-sm md:rounded-xl md:border", isPreviewOpen ? "max-h-[100px] transition-all duration-200" : "max-h-[300px] transition-all duration-200", className, )} > <Textarea ref={inputRef} tabIndex={0} onKeyDown={onKeyDown} placeholde...
synth-ui
components/prompt-form.tsx
TypeScript
04d7bd06ae5f1410ead8fab3535cb1f923112ef866a892c27fe50b813f81319b
1
436
"use client"; import { ArrowRight02Icon, Comment01Icon } from "hugeicons-react"; import { Separator } from "@/components/ui/separator"; import { useActions, useUIState } from "ai/rsc"; import { AI } from "@/lib/ai/core"; import { generateId } from "ai"; import { UserMessage } from "@/components/chat-message"; import {...
synth-ui
components/prompt-suggestions.tsx
TypeScript
496ec20fa04329c3568aee38d3a5336e322dee13b4837fc76cabb4ce464c9254
0
705
"use client"; import * as React from "react"; import { ThemeProvider as NextThemesProvider, useTheme } from "next-themes"; import { ThemeProviderProps } from "next-themes/dist/types"; import { TooltipProvider } from "@/components/ui/tooltip"; import { SidebarProvider } from "@/components/ui/sidebar"; import { ClerkPro...
synth-ui
components/providers.tsx
TypeScript
5eded86ab2abd6faf5e8107e310b763d95005d357e6a4a29511febcb69b98d2e
0
227
"use client"; import { Sidebar as AceternitySidebar, SidebarBody, } from "@/components/ui/sidebar"; import { PlusSignIcon, GithubIcon, Clock04Icon } from "hugeicons-react"; import { Button, buttonVariants } from "@/components/ui/button"; import Link from "next/link"; import { cn } from "@/lib/utils"; import { To...
synth-ui
components/sidebar.tsx
TypeScript
db663aa92f25346d2f5cf38c75d4d41e849ea982479cf7240d5ed228a8fe94db
0
701
import { VariantProps } from "class-variance-authority"; import { Button, buttonVariants } from "@/components/ui/button"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; interface TooltipButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<type...
synth-ui
components/tooltip-button.tsx
TypeScript
f912e7d3bf6e4177c54b2811f0b607343507b1f37f0ab31aa93b3c153d5a1184
0
221
"use client"; import { Button } from "@/components/ui/button"; import { ArrowDown01Icon, InformationCircleIcon } from "hugeicons-react"; import { Select, SelectContent, SelectItem, SelectTrigger, } from "@/components/ui/select"; import { toast } from "sonner"; import { useState } from "react"; import { motion ...
synth-ui
components/ui-library-selector.tsx
TypeScript
72fc956f5aaa62e53722dc31f0e88c15f7bc5bdc6bf100120906eed584ee3fab
0
896
"shadcn" ? "invert" : "" } /> <div className="flex flex-col"> <span className="text-sm font-medium">{lib.name}</span> <span className="text-xs text-muted-foreground"> {lib.description} </span> </d...
synth-ui
components/ui-library-selector.tsx
TypeScript
a72f0fee89c07d39021afce65ae8f15b87d84d3db95ace4a63d9e4b2bb0d9e91
1
96
"use client"; import { useUser } from "@clerk/nextjs"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { cn } from "@/lib/utils"; import { Skeleton } from "@/components/ui/skeleton"; import { useEffect, useState } from "react"; import { useAppState } from "@/lib/hooks/use-app-state...
synth-ui
components/user-avatar.tsx
TypeScript
1a4fb2deb748f50de30399aa0468f05cd35fdfeee6c427bfa7a81833abf964d2
0
376
"use client"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { Button, buttonVariants } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; import { Logout02Icon, UserIcon } from "hugeicons-react"; import { SignOutButton, useUser } fro...
synth-ui
components/user-panel-dialog.tsx
TypeScript
3b478b25bc925a5b16b18ac89218dbc4d6310ad0a263578144e2a786d53db8c3
0
838
"use client"; import { cn } from "@/lib/utils"; import { motion } from "framer-motion"; import React, { useId } from "react"; export const Background = () => { return ( <div className="pointer-events-none absolute inset-0 z-0 h-full w-full"> <div className="pointer-events-none absolute inset-0 h-full w-fu...
synth-ui
components/marketing/background.tsx
TypeScript
d89e68e33ae8a6ba409fef68af92f781e7c64f28883d0ed2df74e938e5304e54
0
896
-neutral-100 dark:text-neutral-800", className)} > <path d="M0.5 0.5H479" stroke="currentColor" /> <motion.path d="M0.5 0.5H479" stroke={`url(#gradient-${id})`} strokeWidth={1} /> <defs> <motion.linearGradient id={`gradient-${id}`} initial...
synth-ui
components/marketing/background.tsx
TypeScript
b7a561b876d2fbdd89e9537afb1bd2e660013940354e9a5162bcc65199913af4
1
299
import React from "react"; export const Badge: React.FC< { children: React.ReactNode } & React.ComponentPropsWithoutRef<"button"> > = ({ children, ...props }) => { return ( <button {...props} className="group relative mx-auto inline-block w-fit cursor-pointer rounded-full bg-neutral-50 p-px text-[1...
synth-ui
components/marketing/badge.tsx
TypeScript
29fbc793f2590b6473b7534a63a4d7432dd92aa48a8f14ba962b19339fc0c2f9
0
421
"use client"; import clsx from "clsx"; import Image from "next/image"; import React, { useState } from "react"; interface IBlurImage { height?: any; width?: any; src?: string | any; objectFit?: any; className?: string | any; alt?: string | undefined; layout?: any; [x: string]: any; } export const Blu...
synth-ui
components/marketing/blur-image.tsx
TypeScript
9b3a2cc41cfe86e98a7b348399af9161695d824c902bedc597bb686b19b5d2df
0
242
import { cn } from "@/lib/utils"; import React from "react"; export const Button: React.FC<{ children?: React.ReactNode; className?: string; variant?: "simple" | "outline" | "primary"; as?: React.ElementType; [x: string]: any; }> = ({ children, className, variant = "primary", as: Tag = "button", .....
synth-ui
components/marketing/button.tsx
TypeScript
f2d252535ef571a785d871f4d358ae029b7e872a241f17866939119a1128df06
0
482
.gridLineHorizontal { --background: #ffffff; --color: rgba(0, 0, 0, 0.2); --height: 1px; --width: 5px; --fade-stop: 90%; /* Bleed in or out from the container */ --offset: -100px; position: absolute; width: calc(100% + var(--offset)); height: var(--height); left: calc(var(--offset) / 2 * -1); ...
synth-ui
components/marketing/common.module.css
CSS
9f70a707e674e6a679dfb4ea0f7820b41b27bfc5f6f717ce27c4e7edfd98aeeb
0
896
-gradient(black, black); -webkit-mask: linear-gradient( to top, var(--background) var(--fade-stop), transparent ), linear-gradient(to bottom, var(--background) var(--fade-stop), transparent), linear-gradient(black, black); mask-composite: exclude; -webkit-mask-composite: exclude; z...
synth-ui
components/marketing/common.module.css
CSS
b32a30a6fc8dc896c6e290ca07d630a6cc4ec35cbdb8125b1372890f52684ebc
1
390
"use client"; import { useEffect, useState } from "react"; import Image from "next/image"; import { AnimatePresence, motion } from "framer-motion"; interface Logo { title: string; src: string; } export const Companies = () => { let [logos, setLogos] = useState<Logo[][]>([ [ { title: "Raiffeise...
synth-ui
components/marketing/companies.tsx
TypeScript
79317934b3645d06cd9e516b2375521b56458e0776b28f66a67e6a320f207ec3
0
896
center gap-10 rounded-xl p-10 dark:border dark:bg-neutral-100 md:gap-20"> <AnimatePresence mode="popLayout" onExitComplete={() => { setIsAnimating(false); }} > {activeLogoSet.map((logo, idx) => ( <motion.div initial={{ ...
synth-ui
components/marketing/companies.tsx
TypeScript
f2448bde2949c5a9643b4a04de89912deaa6409c325bba2e65458f94b7d7a8bc
1
258
"use client"; import React from "react"; import Balancer from "react-wrap-balancer"; import { Button } from "@/components/marketing/button"; import { Link } from "next-view-transitions"; export const CTA = () => { return ( <section className="relative z-30 w-full overflow-hidden py-60"> <div className="poi...
synth-ui
components/marketing/cta.tsx
TypeScript
b61c6c03476cfe085305dfbfb846dd31c5ed6ec5516e91c26c1b325331437401
0
654
import React from "react"; import { cn } from "@/lib/utils"; import { GridLineHorizontal, GridLineVertical, } from "@/components/marketing/grid-lines"; import { SkeletonOne } from "@/components/marketing/skeletons/first"; import { SkeletonTwo } from "@/components/marketing/skeletons/second"; import { SkeletonFour }...
synth-ui
components/marketing/features.tsx
TypeScript
1310b36c9d7645a159deb4c9c4a8caa16590b776f2ea9b8025485d7b77bef01e
0
896
); }; const FeatureTitle = ({ children }: { children?: React.ReactNode }) => { return <h3 className="text-left text-2xl font-bold">{children}</h3>; }; const FeatureDescription = ({ children }: { children?: React.ReactNode }) => { return <p className="mx-0 my-2 max-w-sm text-left md:text-sm">{children}</p>; };
synth-ui
components/marketing/features.tsx
TypeScript
8ab91bbeb7cfa4bdc19a7fd7021c3e759cb851d437d7136ffd69563324b79dd8
1
109
import Link from "next/link"; import React from "react"; import Logo from "@/components/logo"; export const Footer = () => { const legal = [ { name: "Privacy Policy", href: "#", }, { name: "Terms of Service", href: "#", }, { name: "Source Code", href: process.e...
synth-ui
components/marketing/footer.tsx
TypeScript
a8db6004b9b414a3139fcdfb30e90120560090ff6dd0d5195f5035c7587d23a6
0
481
"use client"; import createGlobe from "cobe"; import { useEffect, useRef } from "react"; // https://github.com/shuding/cobe export const Globe = ({ className }: { className?: string }) => { const canvasRef = useRef<HTMLCanvasElement>(null); useEffect(() => { let phi = 0; if (!canvasRef.current) return; ...
synth-ui
components/marketing/globe.tsx
TypeScript
d696ead7af4f0f773e2503bfd9d67664310f1f19ebba4e10cd374f8f91db38c6
0
331
import { cn } from "@/lib/utils"; import { SourceCodeIcon, Dollar01Icon, TradeUpIcon, CloudIcon, Compass01Icon, HelpCircleIcon, SquareLock01Icon, FavouriteIcon, } from "hugeicons-react"; export const GridFeatures = () => { const features = [ { title: "Built for developers", descripti...
synth-ui
components/marketing/grid-features.tsx
TypeScript
d16456871a0f67cda93f803d3279d29e20b0b31a95f38a3fbaff9e50c7645fd9
0
861
import { cn } from "@/lib/utils"; import styles from "./common.module.css"; export const GridLineHorizontal = ({ ...props }) => { return ( <> <div className={cn(styles.gridLineHorizontalDark, "hidden dark:block")} {...props} /> <div className={cn(styles.gridLineHorizonta...
synth-ui
components/marketing/grid-lines.tsx
TypeScript
12f41a3987ea1611c9bf49a1ee2211e6cb9af7922d98b520d76d47b928ba8a01
0
186
"use client"; import Balancer from "react-wrap-balancer"; import { Button } from "@/components/marketing/button"; import { Badge } from "@/components/marketing/badge"; import { motion } from "framer-motion"; import Image from "next/image"; import { Link } from "next-view-transitions"; import { ArrowRight02Icon, Github...
synth-ui
components/marketing/hero.tsx
TypeScript
0f416afe1704cb136090fae44544af038e065ac5517bff6a2bb29d045908d4b0
0
896
span>Proudly Open Source</span> </div> </Badge> </Link> </motion.div> <motion.h1 {...fadeInAnimation} className="relative z-10 mx-auto mt-6 max-w-6xl text-center text-4xl font-semibold sm:text-6xl lg:text-8xl" > <Balancer>Generate & Ship UI with mi...
synth-ui
components/marketing/hero.tsx
TypeScript
290decac46a1f269b7be1f9a2fa560f990781c187ef5b296e7e0181a37f5c2f5
1
470
"use client"; import { cn } from "@/lib/utils"; import { useId } from "react"; export const HorizontalGradient = ({ className, ...props }: { className: string; [x: string]: any; }) => { const id = useId(); return ( <svg width="1595" height="2" viewBox="0 0 1595 2" fill="none" ...
synth-ui
components/marketing/horizontal-gradient.tsx
TypeScript
0dc9c578a0da4ffa9b2c0ef34703e298f637775d0b5a0e2b44bfaa6e1c7c5064
0
304
"use client"; import { useCallback, useState } from "react"; import { useMotionValueEvent, useScroll, motion, AnimatePresence, } from "framer-motion"; import { SignedIn, SignedOut } from "@clerk/nextjs"; import Link from "next/link"; import Logo from "@/components/logo"; import { Button } from "@/components/ma...
synth-ui
components/marketing/navbar/desktop-navbar.tsx
TypeScript
2d05923c7c4bdb7bb6b22e2e0f81a3390842c3fbae493bc06147a1a54269426a
0
792
"use client"; import dynamic from "next/dynamic"; import { motion } from "framer-motion"; import { Blockchain01Icon, MagicWand01Icon, TableIcon } from "hugeicons-react"; import { NavItem } from "@/components/marketing/navbar/desktop-navbar"; const DesktopNavbar = dynamic( () => import("@/components/marketing/nav...
synth-ui
components/marketing/navbar/index.tsx
TypeScript
a8a9d0a379921d07471620165c50a8427c07f70f393a5ec07eb8f0998a73bf8e
0
617
"use client"; import { cn } from "@/lib/utils"; import { Link } from "next-view-transitions"; import { useState } from "react"; import { Button } from "@/components/marketing/button"; import Logo from "@/components/logo"; import { useMotionValueEvent, useScroll, motion } from "framer-motion"; import { Menu01Icon, Cance...
synth-ui
components/marketing/navbar/mobile-navbar.tsx
TypeScript
24418c49c14ca368a033a6179e6c6bf919cc2b3ec967b8f1836028ae1608d4f0
0
896
> {navItem.icon} </div> {navItem.title} </span> </Link> )} </> ))} </div> <div className="flex w-full flex-row items-start gap-2.5 px-8 py-4"> ...
synth-ui
components/marketing/navbar/mobile-navbar.tsx
TypeScript
9bd9e2a1ea6c069dd8847faa1a9bc74f38b9820b46edd1abe80143d81318a083
1
188
import { cn } from "@/lib/utils"; import { Link } from "next-view-transitions"; import { ReactNode } from "react"; import { buttonVariants } from "@/components/ui/button"; type Props = { href: string; children: ReactNode; active?: boolean; className?: string; target?: "_blank"; }; export function NavBarItem...
synth-ui
components/marketing/navbar/navbar-item.tsx
TypeScript
56cc94c72b4f514725b2b6c2e52b101b660bb950320295fffe70c5eb14c2a295
0
226
"use client"; import React from "react"; import { motion } from "framer-motion"; import Image from "next/image"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import Logo from "@/components/logo"; import { ChartContainer, ChartTooltip, ChartTooltipCon...
synth-ui
components/marketing/skeletons/first.tsx
TypeScript
9cce67a4bb8ab03dbf1c30cec3c49c2feb3eec991bc46bbd1d06f80d42aefd2a
0
896
" dataKey="value" offset={8} fontSize={12} fill="white" /> </Bar> <YAxis dataKey="value" type="categ...
synth-ui
components/marketing/skeletons/first.tsx
TypeScript
6bbb795e562978605cdd1b64f7db47fca4bc576d4949f1a530e02f58b1c75e69
1
896
)" stopOpacity={0.8} /> <stop offset="95%" stopColor="var(--color-time)" stopOpacity={0.1} /> </linearGradient> </defs> <A...
synth-ui
components/marketing/skeletons/first.tsx
TypeScript
a9c9320a07acdec6b343357c19ca303835e0b214de79fb4ce4b653ca67a8b9f1
2
682
import React from "react"; import { cn } from "@/lib/utils"; import { InfiniteMovingCards } from "@/components/ui/infinite-moving-cards"; import { Globe } from "@/components/marketing/globe"; import Image from "next/image"; export const SkeletonFour = () => { return ( <div className="relative mt-10 flex h-full fl...
synth-ui
components/marketing/skeletons/fourth.tsx
TypeScript
7c025edefd516990656d411e27af5dbce12980183a1848dee3d38cf693844724
0
896
span className={cn( "flex min-w-24 items-center justify-center space-x-1 rounded-md bg-white px-2 py-1 text-sm shadow-[0px_2px_3px_-1px_rgba(0,0,0,0.1),0px_1px_0px_0px_rgba(25,28,33,0.02),0px_0px_0px_1px_rgba(25,28,33,0.08)] dark:bg-neutral-900", )} > <Image src="/asset...
synth-ui
components/marketing/skeletons/fourth.tsx
TypeScript
4069eaba77fdc21254c6ca8f91a3716834851c42fb475aa581b692afa053f21d
1
436