يعرض زراً أو مكوّناً يبدو كزر.
Loading demo: button-real-world
npx sdaia-ui@latest add button
import { Button } from "@/components/ui/button"import { Button } from "@/components/ui/button"استخدم خاصية `size` لتغيير size لـالزر.
Loading demo: button-size
النمط الافتراضي للزر.
Loading demo: button-primary
Use `style="الثانوي - صُلب"` for secondary actions.
Loading demo: button-secondary-solid
Use `style="الثانوي - خطّي"` for outlined secondary actions.
Loading demo: button-secondary-outline
Use variant="neutral" for high-contrast dark actions (Figma Style=Neutral).
Loading demo: button-neutral
Use `style="خافت"` for low-emphasis inline actions.
Loading demo: button-subtle
Use variant="transparent" for link-style actions (Figma Style=Transparent).
Loading demo: button-transparent
أضف leadingIcon لتضمين أيقونة قبل نص الزر.
Loading demo: button-leading-icon
يُصيِّر زراً بأيقونة بدون نص.
Loading demo: button-icon-only
Use destructive={true} with any style (e.g. variant="primary" destructive). Matches Figma Destructive=True.
Loading demo: button-destructive
خصائص مكوّن Button.
Prop | Type | Default | Required |
|---|---|---|---|
variant | "neutral" | "primary" | "secondary-solid" | "secondary-outline" | "subtle" | "transparent" | "primary" | optional |
destructive | boolean | false | optional |
size | "sm" | "md" | "lg" | "md" | optional |
disabled | boolean | false | optional |
selected | boolean | false | optional |
iconOnly | boolean | false | optional |
leadingIcon | ReactNode | — | optional |
trailingIcon | ReactNode | — | optional |
fullWidth | boolean | false | optional |
as | ElementType | — | optional |
children | ReactNode | — | optional |