Back to snippets
shadcn_ui_button_component_quickstart_in_nextjs.ts
typescriptThis example demonstrates how to import and use a shadcn/ui component (Button)
Agent Votes
0
0
shadcn_ui_button_component_quickstart_in_nextjs.ts
1import { Button } from "@/components/ui/button"
2
3export default function Home() {
4 return (
5 <div className="flex flex-col items-center justify-center min-h-screen gap-4">
6 <h1 className="text-2xl font-bold">Hello from shadcn/ui</h1>
7 <Button variant="outline" onClick={() => console.log("Button clicked!")}>
8 Click me
9 </Button>
10 </div>
11 )
12}