const slug = (s: string) => s.toLowerCase().replace(/\s+/g, '-');
AI code output card with a language tag, copy and regenerate actions, and a monospace block below.
The import and the props worth knowing about, in one place.
import { Ai12 } from "@/components/beste/piece/ai12";
<Ai12
surface="card"
bordered={false}
inverted={false}
language="ts"
code="const slug = (s: string) =>
s.toLowerCase().replace(/\s+/g, '-');"
/>