Button wraps React Native Pressable with shared action styles.
Usage
Props
All
PressableProps except children are accepted. onPress does not run while loading or disabled.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Trigger actions with shared sizes, states, and visual variants
Button wraps React Native Pressable with shared action styles.
import { Button, View } from '@amisi-mobile-starter/ui';
export const Actions = () => (
<View className="gap-3">
<Button onPress={() => {}}>Save changes</Button>
<Button variant="outline" leftIcon={null} onPress={() => {}}>
Preview
</Button>
<Button variant="destructive" isDisabled onPress={() => {}}>
Delete account
</Button>
</View>
);
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | String label or custom button content. |
variant | 'primary' | 'secondary' | 'outline' | 'ghost' | 'info' | 'success' | 'warning' | 'destructive' | 'link' | 'primary' | Visual style. |
size | 'sm' | 'md' | 'lg' | 'md' | Control height and horizontal padding. |
isLoading | boolean | false | Replaces content with a spinner and blocks presses. |
isDisabled | boolean | false | Lowers opacity and blocks presses. |
leftIcon | ReactNode | undefined | Left-positioned icon for string children. |
className | string | undefined | Additional utility classes. |
style | StyleProp<ViewStyle> | undefined | Additional pressable style. |
PressableProps except children are accepted. onPress does not run while loading or disabled.Was this page helpful?