Button
A button component with multiple variants, sizes, and loading state.
التثبيت
tsx
npx fasla-ui add buttonمعاينة
الصيغ
المقاسات
Loading
الاستخدام
tsx
import { Button } from "@/components/ui/button"
export function Example() {
return (
<Button variant="default" size="default">
Click me
</Button>
)
}الخصائص
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | default | destructive | outline | secondary | ghost | link | default | The visual style of the button |
| size | default | sm | lg | icon | default | The size of the button |
| loading | boolean | false | Shows a loading spinner |
| asChild | boolean | false | Render as child component |