reactnatively

Button

A fully-featured button with solid, outline, ghost, glass, tinted, and destructive variants. Supports icons, loading states, full-width layout, and semantic color tokens out of the box.

Import

typescript
import { Button } from 'reactnatively';

Interactive preview

ActionsRow.tsx
1import { View, StyleSheet } from 'react-native';2import { Button } from 'reactnatively';34export function ActionsRow() {5  return (6    <View style={styles.row}>7      <Button variant="solid" color="primary" onPress={handleStart}>8        Solid9      </Button>10      <Button variant="outline" color="primary" onPress={handleOutline}>11        Outline12      </Button>13      <Button variant="ghost" color="primary" onPress={handleGhost}>14        Ghost15      </Button>16      <Button variant="glass" onPress={handleGlass}>17        Glass18      </Button>19      <Button variant="tinted" color="primary" onPress={handleTinted}>20        Tinted21      </Button>22      <Button variant="destructive" onPress={handleDelete}>23        Destructive24      </Button>25    </View>26  );27}2829const styles = StyleSheet.create({30  row: { flexDirection: 'row', flexWrap: 'wrap', gap: 12, padding: 20 },31});

Props

PropTypeDefaultDescription
variant'solid' | 'outline' | 'ghost' | 'glass' | 'tinted' | 'destructive'"solid"Visual style of the button.
size'xs' | 'sm' | 'md' | 'lg' | 'xl'"md"Controls padding and font size.
color'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'danger' | 'neutral'"primary"Semantic color token applied to the button.
labelstringundefinedConvenience prop for string children — equivalent to passing a string child.
childrenReactNodeundefinedContent rendered inside the button.
leftIconReactNodeundefinedIcon placed to the left of the label.
rightIconReactNodeundefinedIcon placed to the right of the label.
loadingbooleanfalseShows a spinner and disables interaction.
disabledbooleanfalseDisables the button and reduces opacity.
fullWidthbooleanfalseStretches the button to fill its container.
flexnumberundefinedSets the flex value on the outer container.
glassGlassButtonConfigundefinedGlass-specific config. Only used when variant="glass".
styleStyleProp<ViewStyle>undefinedStyle applied to the outer container.
textStyleStyleProp<TextStyle>undefinedStyle applied to the label text.
pressedStyleStyleProp<ViewStyle>undefinedStyle applied while the button is pressed.
accessibilityLabelstringundefinedScreen-reader label for the button.
accessibilityHintstringundefinedScreen-reader hint describing the action.