Button
Button
Examples
Intents & Variants
Button comes with
- 3 intents which are
primary,secondary, anddanger. - 3 variants which are
filled,outlined, andtext.
Filled variant
Outlined variant
Text variant
Button with icon
Button icons can either be an icon name or a custom component.
Disabled button
Utility button
Props
Button
Prop | Required | Default | Type | |
|---|---|---|---|---|
onPress | required | () => void | ||
text | required | ReactChild | ||
accessibilityHint | string | |||
accessibilityLabel | string | |||
disabled | false | boolean | ||
icon | ReactNode | |||
intent | primary | "primary" | "danger" | "secondary" | ||
loading | false | boolean | ||
rightIcon | ReactNode | |||
style | StyleProp<ViewStyle> | |||
testID | string | |||
variant | filled | "text" | "filled" | "outlined" |
Button.Icon
Prop | Required | Default | Type | |
|---|---|---|---|---|
icon | required | "number" | "activate" | "add-emoji" | "add-person" | "adjustment" | "alignment" | "antenna" | "archive" | "assignment-warning" | "bank" | "bell" | "billing" | "bolt" | "bookmark-added" | ... 417 more ... | "wellness-outlined" | ||
disabled | boolean | |||
hitSlop | number | Insets | |||
intent | "warning" | "success" | "info" | "text" | "primary" | "danger" | "secondary" | "disabled-text" | "text-inverted" | |||
onPress | () => void | |||
size | "small" | "medium" | "large" | "xlarge" | "xsmall" | |||
style | StyleProp<ViewStyle> | |||
testID | string |
Button.Utility
Prop | Required | Default | Type | |
|---|---|---|---|---|
icon | required | "number" | "activate" | "add-emoji" | "add-person" | "adjustment" | "alignment" | "antenna" | "archive" | "assignment-warning" | "bank" | "bell" | "billing" | "bolt" | "bookmark-added" | ... 417 more ... | "wellness-outlined" | ||
onPress | required | () => void | ||
text | required | ReactChild | ||
intent | text | "text" | "primary" |