Back to Components
Components
Code Block
Code display with optional highlighted HTML and a copy button.
No preview available
Dependencies
- clsx
- tailwind-merge
- lucide-react
Files
- components/ui/code-block.tsx
Installation
Using shadcn CLI
npx shadcn add code-block --url https://ui.hampton.ioManual installation
Copy the component file to your project and install dependencies:
npm install clsx tailwind-merge lucide-react