React Native button component. Awesome Button is a 3D at 60fps, progress enabled, social ready, extendable, production ready component that renders an awesome a
React Native button component. Awesome Button is a 3D at 60fps, progress enabled, social ready, extendable, production ready component that renders an awesome a
@rcaferati/react-native-awesome-button brings the Awesome Button interaction,
progress, sizing, and theme system to React Native with native Pressable,
accessibility, and animation behavior.
The library exports:
AwesomeButton as the default exportThemedButtongetThemeAwesomeButtonProps, ThemedButtonProps, ButtonWidth, ThemeName, ButtonVariant, and ButtonSizeTry the live package demo on expo.dev.
Explore the shared Awesome Button visual system in the Figma design file. The Figma file is a visual design reference; this package's documentation defines its behavior, accessibility, and public API contract.
npm install @rcaferati/react-native-awesome-buttonCurrent peer support:
react >= 18.2.0react-native >= 0.76.0import AwesomeButton from '@rcaferati/react-native-awesome-button';
export function SaveButton() {
return Save;
}AwesomeButton supports both plain string labels and arbitrary React Native content.
animateSize is enabled by default.
textTransition plus auto width:textTransition, wider labels keep the fitting source visible until the target fits; the target remains clipped to one line until a matching native layout commit confirms physical-pixel fit, while narrower labels swap before width shrinksanimateSize={false} settles target geometry before text begins; Reduced Motion settles both immediately3.1.0import { ThemedButton } from '@rcaferati/react-native-awesome-button';
export function SizeExample({
isLong,
size,
}: {
isLong: boolean;
size: 'small' | 'medium' | 'large';
}) {
const label = isLong ? 'Open analytics dashboard' : 'Open';
return (
<>
{label}
{label}
{size}
);
}When progress is enabled, onPress receives a next callback. Call it when your work is done to complete the progress animation and release the button.
import AwesomeButton from '@rcaferati/react-native-awesome-button';
export function SubmitButton() {
return (
{
setTimeout(() => {
next?.();
}, 800);
}}
>
Submit
);
}import { ThemedButton } from '@rcaferati/react-native-awesome-button';
export function ThemeExample() {
return (
<>
Rick Primary
Rick Secondary
);
}If you need the full registered theme object, use getTheme.
import { ThemedButton, getTheme } from '@rcaferati/react-native-awesome-button';
export function ThemeConfigExample() {
const theme = getTheme(0);
return (
{theme.title}
);
}getTheme() safely falls back to the default basic theme if the provided index or name is invalid.
Use before and after for inline content that should animate with the label, and extra for content rendered behind the button body.
import { StyleSheet, Text } from 'react-native';
import { AntDesign } from '@expo/vector-icons';
import { LinearGradient } from 'expo-linear-gradient';
import AwesomeButton from '@rcaferati/react-native-awesome-button';
export function ButtonContentExample() {
return (
}
after={}
extra={
}
>
Continue
);
}transparent is supported on ThemedButton. It removes the visible shell layers while preserving the content, hit target, and active/progress feedback.
import { ThemedButton } from '@rcaferati/react-native-awesome-button';
export function TransparentExample() {
return (
Transparent
);
}basicbojackcartmanmysterionc137ricksummerbruceprimarysecondaryanchordangerdisabledflatx (canonical request-only bridge)twittermessengerfacebookgithublinkedinwhatsappredditpinterestyoutubex is the canonical social request. The legacy closed ButtonVariant and
SocialButtonVariant unions still contain twitter so exhaustive v3.1
consumers remain source-compatible; ThemedButtonProps.type accepts the
request-only AwesomeButtonVariant bridge, which adds x. A custom theme's
optional x style wins for an x request and otherwise falls back to its
required legacy twitter style. A twitter request continues to use the
legacy key.
Unknown variants fall back safely at runtime instead of crashing.
iconsmallmediumlargeThe tables below cover the primary consumer-facing props. The checked-in
API Extractor report and exported
AwesomeButtonProps / ThemedButtonProps types are the complete public
TypeScript reference.
| Attribute | Type | Default | Description |
|---|---|---|---|
activityColor |
string |
#FFFFFF |
Activity indicator color shown during progress mode. |
activeOpacity |
number |
1 |
Opacity applied while the button is pressed. |
animatedPlaceholder |
boolean |
true |
Enables the shimmer loop when the button has no children. |
animateSize |
boolean |
true |
Animates fixed-size geometry changes and auto-width string-label changes. |
backgroundActive |
string |
rgba(0, 0, 0, 0.15) |
Active overlay color rendered over the face while pressed. |
backgroundColor |
string |
#c0c0c0 |
Main front-face background color. |
backgroundDarker |
string |
#9f9f9f |
Bottom-face background color used for the raised 3D effect. |
backgroundPlaceholder |
string |
rgba(0, 0, 0, 0.15) |
Placeholder bar background color when the button is empty. |
backgroundProgress |
string |
rgba(0, 0, 0, 0.15) |
Progress bar background color used during progress mode. |
backgroundShadow |
string |
rgba(0, 0, 0, 0.15) |
Shadow layer background color. |
before |
ReactNode |
null |
Content rendered before the main label inside the button face. |
after |
ReactNode |
null |
Content rendered after the main label inside the button face. |
extra |
ReactNode |
null |
Content rendered behind the active/content layers, useful for gradients and custom backgrounds. |
children |
ReactNode |
null |
Button label or custom content. Plain string labels also support textTransition. |
borderColor |
string |
undefined |
Front-face border color. |
borderRadius |
number |
4 |
Shared border radius applied to the button face and lower layers. |
No open issues yet, or sync has not completed.