title: Button

Button

Standard button component. Uses NativeWindUI <Button> primitive or a plain <Pressable> wrapper, depending on the template.

Usage

import { Pressable, Text } from "react-native";

<Pressable className="bg-primary rounded-md py-4 px-6">
  <Text className="text-primary-foreground font-bold uppercase tracking-wider">
    Add to cart
  </Text>
</Pressable>

Variants

VariantClasses
Primarybg-primary text-primary-foreground
Secondaryborder border-primary bg-transparent
Accentbg-accent text-accent-foreground
Destructivebg-destructive text-destructive-foreground

Disabled state

<Pressable className="bg-primary opacity-50" disabled>
  ...
</Pressable>