React Native MantineButtons

Button

Full-featured interactive button

Import: import { Button } from 'react-native-mantine';

Usage

import { Button } from 'react-native-mantine';

<Button
  variant="filled"
  color="blue"
  size="md"
  onPress={() => console.log('Clicked!')}
>
  Click Me
</Button>

// With loading state
<Button
  loading={isLoading}
  loaderPosition="left"
  onPress={handleSubmit}
>
  Submit
</Button>

// Gradient button
<Button
  variant="gradient"
  gradient={{ from: 'blue', to: 'cyan', deg: 45 }}
>
  Gradient Button
</Button>

Props

PropTypeDefaultDescription
size'xs' | 'sm' | 'md' | 'lg' | 'xl''sm'Predefined button size that controls padding, font size, and height
variant'filled' | 'outline' | 'light' | 'white' | 'default' | 'subtle' | 'gradient''filled'Controls button appearance and visual style
colorMantineColortheme.primaryColorButton color from theme (e.g., "blue", "red", "green", "orange", "grape")
fullWidthbooleanfalseSets button width to 100% of parent element
radiusnumber | "xs" | "sm" | "md" | "lg" | "xl"theme.defaultRadiusKey of theme.radius or any valid number to set border-radius
leftIconReact.ReactNodeAdds icon before button label
rightIconReact.ReactNodeAdds icon after button label
uppercasebooleanfalseSet text-transform to uppercase
compactbooleanfalseReduces vertical and horizontal spacing
loadingbooleanfalseIndicate loading state with an activity indicator
loaderPosition'left' | 'right' | 'center''left'Loader position relative to button label
loaderPropsLoaderPropsProps spread to Loader component
disabledbooleanfalseDisabled state - prevents interaction and shows disabled styling
gradientMantineGradientControls gradient settings in gradient variant only. Object with from, to, and deg properties
childrenReact.ReactNodeButton label content
onPress() => voidFunction called when button is pressed
styleViewStyleAdditional styles to apply to the button

Source on GitHub · npm