Code Line
Compact single-line code snippet with syntax highlighting and an inline copy button.
shikilucide-react
Loading...
Installation
$ shadcn add @jalco/code-lineUsage
import { CodeLine } from "@/components/code-line"<CodeLine code={`import { Button } from "@/components/ui/button"`} />Examples
Languages
TypeScript
const schema = z.object({ email: z.string().email() })Shell
npx shadcn@latest add buttonAPI Reference
CodeLine
PropType
Notes
- Icon library. Uses Lucide icons by default. Since this is copy-paste code, you can swap the imports if your project uses a different icon library.