Button
Documentation and examples for the Button component.
Preview
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "primary" | "outline" | "secondary" | "danger" | "ghost" | "primary" | The visual style of the button. |
| size | "sm" | "md" | "lg" | "md" | The visual size of the button. |
| onClick | () => void | - | Function called when clicked. |
| ref | string | - | The reference for the button. |
Usage
Follow these steps to add and use Button.
1
Create next app (skip if you already have setup a next app)
terminal
npx create-next-app@latest --yes2
Install
terminal
npx modui-uikit@latest add button3
Implement
typescript
import { Button } from '@/components/ui/button'
export default function Example() {
return (
<Button variant="outline" size="sm">
Click Me
</Button>
)
}