asChild — when true, renders a Radix Slot so the button's
styles are forwarded to the single child element
(e.g. wrapping <Link> so an anchor looks like a button).
Type Declaration
OptionalasChild?: boolean
Render as a Radix Slot, merging the button's className/attributes
into the immediate child. Useful when the child must be a different
element (e.g. <Link> for client-side navigation, <a> for external).
Props accepted by the Button component.
Extends the native
<button>props with two additions:variant— see buttonVariants for the full listsize— see buttonVariants for the full listasChild— whentrue, renders a RadixSlotso the button's styles are forwarded to the single child element (e.g. wrapping<Link>so an anchor looks like a button).