Generated Code

AI code output card with a language tag, copy and regenerate actions, and a monospace block below.

ts
const slug = (s: string) =>
  s.toLowerCase().replace(/\s+/g, '-');

Requires shadcn/ui initialized. Run npx shadcn@latest init if you haven't.

Import & use
import { Ai12 } from "@/components/beste/piece/ai12";

<Ai12
  language="ts"
  code="const slug = (s: string) =>
  s.toLowerCase().replace(/\s+/g, '-');"
/>