LogoCraftReactNative
Components

Button

A button component that supports different sizes and variants. It can be used for primary actions, secondary actions, or negative/destructive actions.

Dependencies

1 packages
react-native-unistyles
Required imports
craftrn-ui/components/Text
Component preview

Usage

Screen.tsx
import { Button } from "@/craftrn-ui/components/Button";
 
export const Screen = () => (
  <Button onPress={() => {}} size="small" variant="secondary">
    Press me
  </Button>
);

Props

PropTypeDefault
onPress?
() => void
-
disabled?
boolean
false
renderContent
(props: { iconSize: number; iconColor: string; }) => ReactElement<unknown, string | JSXElementConstructor<any>>
-
size?
Size
'medium'
variant?
"default" | "accent" | "reversed"
'default'
intent?
Intent
'primary'

On this page