Button

Buttons allow users to take actions, and make choices, with a single tap.

Variants

Props

PropTypeDefault
isDisabled?
boolean
-
onPress?
((e: PressEvent) => void)
-
onPressStart?
((e: PressEvent) => void)
-
onPressEnd?
((e: PressEvent) => void)
-
onPressChange?
((isPressed: boolean) => void)
-
onPressUp?
((e: PressEvent) => void)
-
onFocusChange?
((isFocused: boolean) => void)
-
preventFocusOnPress?
boolean
-
excludeFromTabOrder?
boolean
-
isPending?
boolean
-
onHoverStart?
((e: HoverEvent) => void)
-
onHoverEnd?
((e: HoverEvent) => void)
-
onHoverChange?
((isHovering: boolean) => void)
-
size?
ConditionalStyle<Values<Record<"2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl", { height: CSSVarFunction; vars: { [x: string]: string; }; }>, { defaultClass: string; conditions: { readonly xs: string; readonly sm: string; readonly md: string; readonly lg: string; readonly xl: string; readonly default: string; }; }>>
-
stretch?
boolean
-
layout?
LayoutSprinkles
-
variant?
"transparent" | "solid" | "medium" | "soft" | "surface"
-
hitSlop?
"none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"
-
Edit on GitHub

Last updated on

On this page