TypeScript
<Code code={code} language="tsx" filename="button.tsx" />Syntax-highlighted blocks with copy, scroll, and file headers.
primary-action.tsx
import { Button } from "@/components/ui/button"
export function PrimaryAction() {
return <Button shape="squircle">Get started</Button>
}Terminal
pnpm dlx shadcn@latest add @leguan/codeTypeScript
<Code code={code} language="tsx" filename="button.tsx" />Terminal
<Code code="pnpm dlx shadcn@latest add button" language="bash" filename="Terminal" />With path
<Code code={source} language="tsx" filepath="src/components/ui/button.tsx" expandable />Install by URL
Terminal
pnpm dlx shadcn@latest add https://leguan-ui.pages.dev/r/code.json