Buttons

Button

A cross-platform pressable with size and variant APIs for primary actions, secondary actions, and icon-only controls.

Installation

Install the registry item directly, then add any package dependencies if you are setting the component up manually.

1

Install the component

Run the registry command below to add button to your project.

watermelon add button
2

Install manual dependencies

If you are wiring the component manually, install the package dependencies shown below.

npm install @rn-primitives/slot class-variance-authority lucide-react-native react-native-svg
3

Import the component

Import Button from your local UI registry output.

Import

import { Button } from "@/components/ui/button";

Import

Import

import { Button } from "@/components/ui/button";
import { Text } from "@/components/ui/text";

Usage

The Button component wraps a React Native Pressable and shares text styling through the registry Text primitive.

Basic Usage

Use the default button for primary actions.

Variants

Choose from default, secondary, outline, ghost, destructive, and link.

Sizes

Match the control to the surface with sm, default, lg, or icon.

With Text

Because the registry shares class names with the nested Text element, icon and label compositions stay visually consistent.

API Reference

Button extends all supported props from React Native Pressable and adds design-system variants.

proptypedefaultdescription
variant"default" | "destructive" | "outline" | "secondary" | "ghost" | "link""default"Controls the visual style of the button.
size"default" | "sm" | "lg" | "icon""default"Controls button height, padding, and icon sizing.
disabledbooleanfalseDisables interactions and lowers opacity.
classNamestring-Extends the NativeWind classes applied to the control.