Components
Button
Displays a button or a component that looks like a button.
Installation
npx shadcn@latest add https://herocn.dev/r/button.jsonUsage
import { Button } from "@/components/ui/button"
<Button variant="outline">Button</Button>
Examples
Size
Use the size prop to change the size of the button.
With Icon
Remember to add the data-icon="inline-start" or data-icon="inline-end" attribute to the icon for the correct spacing.
Component button-with-icon not found in registry.
API Reference
Button
The Button component is a wrapper around the @base-ui/react Button primitive that adds a variety of styles and functionality.