A customizable button component for React Native applications with haptic feedback support
A flexible and reusable button component that supports icons, loading states, and haptic feedback. Built for React Native applications with full TypeScript support and theme integration.
The Button component requires the following dependencies:
Prop | Type | Required | Description |
---|---|---|---|
onPress | () => void | Yes | Function to call when button is pressed |
children | React.ReactNode | Yes | Content to display inside the button |
style | ViewStyle | ViewStyle[] | No | Custom styles for the button |
textStyle | TextStyle | No | Custom styles for the text |
bgColor | string | No | Background color of the button |
disabled | boolean | No | Disables the button when true |
loading | boolean | No | Shows loading indicator when true |
icon | React.ReactNode | No | Icon component to display |
iconPosition | 'left' | 'right' | No | Position of the icon (default: ‘left’) |
borderColor | string | No | Color of the button border |
borderWidth | number | No | Width of the button border |
height | number | No | Custom height for the button |
Don’t forget to use constants/appConstants.ts
to defining your theme.
The button comes with default styles that can be customized:
BORDER_RADIUS.sm
BUTTON_HEIGHT.md
)MARGIN.sm
The button automatically integrates with your app’s theme system using the useTheme
hook:
A customizable button component for React Native applications with haptic feedback support
A flexible and reusable button component that supports icons, loading states, and haptic feedback. Built for React Native applications with full TypeScript support and theme integration.
The Button component requires the following dependencies:
Prop | Type | Required | Description |
---|---|---|---|
onPress | () => void | Yes | Function to call when button is pressed |
children | React.ReactNode | Yes | Content to display inside the button |
style | ViewStyle | ViewStyle[] | No | Custom styles for the button |
textStyle | TextStyle | No | Custom styles for the text |
bgColor | string | No | Background color of the button |
disabled | boolean | No | Disables the button when true |
loading | boolean | No | Shows loading indicator when true |
icon | React.ReactNode | No | Icon component to display |
iconPosition | 'left' | 'right' | No | Position of the icon (default: ‘left’) |
borderColor | string | No | Color of the button border |
borderWidth | number | No | Width of the button border |
height | number | No | Custom height for the button |
Don’t forget to use constants/appConstants.ts
to defining your theme.
The button comes with default styles that can be customized:
BORDER_RADIUS.sm
BUTTON_HEIGHT.md
)MARGIN.sm
The button automatically integrates with your app’s theme system using the useTheme
hook: