Skip to main content

Button

Inputs & Controls

Button

Material 3 button set with text, outlined, contained, tonal, and elevated variants.

Usage

Trigger primary workflows, confirm actions, or launch dialogs across surfaces.

Highlights

  • State layer + ripple feedback
  • Integrated loading indicator and icon slots

When to use it

  • You need accessible CTA with consistent spacing.
  • Buttons must adapt to tokens via variant system.

Examples

Text Button

Preview (Web)
import { Button } from 'react-native-molecules/components/Button';

export default function Example() {
  const handlePress = () => {
      console.log('Pressed text button');
  };

  return (
      <Button variant="text" onPress={handlePress}>
          Default Button
      </Button>
  );
}

Contained Button

Preview (Web)
import { Button } from 'react-native-molecules/components/Button';

export default function Example() {
  return (
      <Button variant="contained" onPress={() => console.log('Pressed contained')}>
          Contained Button
      </Button>
  );
}

Outlined Button

Preview (Web)
import { Button } from 'react-native-molecules/components/Button';

export default function Example() {
  return (
      <Button variant="outlined" onPress={() => console.log('Pressed outlined')}>
          Outlined Button
      </Button>
  );
}

Contained Tonal Button

Preview (Web)
import { Button } from 'react-native-molecules/components/Button';

export default function Example() {
  return (
      <Button variant="contained-tonal" onPress={() => console.log('Pressed tonal')}>
          Contained Tonal Button
      </Button>
  );
}

Elevated Button

Preview (Web)
import { Button } from 'react-native-molecules/components/Button';

export default function Example() {
  return (
      <Button variant="elevated" onPress={() => console.log('Pressed elevated')}>
          Elevated Button
      </Button>
  );
}
PropTypeDefaultDescription
childrenRequiredReactNode
testIDstring | undefined
accessibilityLabelstring | undefined
accessibilityHintstring | undefined
elevationMD3Elevation | undefined
variantButtonVariant | undefined
buttonColorstring | undefined
loadingboolean | undefined
iconType"material-community" | "feather" | undefined
iconNamestring | undefined
iconSizenumber | undefined
disabledboolean | undefined
onPress(() => void) | undefined
onPressIn(() => void) | undefined
onPressOut(() => void) | undefined
onLongPress(() => void) | undefined
contentStyleStyleProp<ViewStyle>
styleStyleProp<TextStyle>
labelStyleTextStyle | undefined
iconContainerStyleStyleProp<ViewStyle>
iconStyleStyleProp<TextStyle>
sizeButtonSize | undefined
stateLayerPropsViewProps | undefined
textRelatedStyleStyleProp<TextStyle>
Defined in react-native-molecules/components/Button