An uppercase, letter-spaced pill with a small marker at its end. On hover the marker slips out on the right while the label slides over and a twin marker arrives from the left, in one smooth motion.
The import and the props worth knowing about, in one place.
import { Button22 } from "@/components/beste/component/button22";
import { ArrowRight } from "lucide-react";
import Link from "next/link";
// Compose the link with the render prop: your Link becomes the rendered
// element and the button content stays as its children.
<Button22 label="Start your journey" render={<Link href="/contact" />} nativeButton={false} />
<Button22
label="See how it works"
icon={ArrowRight} // replaces the dot marker
tone="outline" // "primary" (default) | "light" | "dark" | "outline"
onClick={() => console.log("clicked")}
/>Read from the component's own type, so this cannot drift from what it accepts.
| Prop | Type | Default | Description |
|---|---|---|---|
label* | string | — | Button label (rendered uppercase) |
asChild | boolean | — | Compose the rendered element shadcn-style (radix asChild): your element (e.g. a router Link) becomes the root and the button content is injected as its children. Pass the element without children of its own. |
children | React.ReactElement | — | The element to render when `asChild` is set (e.g. your framework's Link) |
href | string | — | Fallback link: renders a plain `<a>`. Prefer `asChild` with your framework's Link component for client-side navigation. |
icon | LucideIcon | — | Marker drawn at the end of the pill; a small dot when omitted |
tone | "primary" | "light" | "dark" | "outline" | — | Accent pill (default), light pill for photographic surfaces, dark pill for light pages, or a hairline outline in the current text colour |
onClick | React.MouseEventHandler<HTMLButtonElement> | — | Click handler (used when there is no href and no asChild) |
className | string | — | Additional classes merged onto the button |