Applies to every preview on the site.
Installation
One command copies the source into your app — you own the code and can change anything.
After you add the file, import it like any local component:
import { Button3D } from "@/components/ui/button-3d";Or add it with the CLI (installs any missing peers):
Usage
useKit(). Wrap your app in <KitProvider accent="#6366f1" radius={14}> to re-skin every component at once.Like this? There's a lot more in Pro Pro
12 full screens built from the same kit — install them the same way.
Props
| Prop | Type | Default |
|---|---|---|
| children Label, a single glyph (circle buttons) or custom content. | ReactNode | — |
| onPress Fires on tap. | () => void | — |
| appearance Keycap material; auto is light on dark screens and dark on light ones. Glass is for buttons on photos. | "auto" | "light" | "dark" | "glass" | "auto" |
| color A custom face colour instead of a material, e.g. your brand colour. | string | — |
| size Height and text size (36 / 46 / 56). | "sm" | "md" | "lg" | "md" |
| shape Keycap, pill or round icon button. | "rounded" | "pill" | "circle" | "rounded" |
| depth Edge height in points. | number | 4 / 5 / 6 by size |
| icon Shown before the label. | ReactNode | — |
| block Stretch to the parent's width. | boolean | false |
| loading Show a spinner and ignore taps. | boolean | false |
| disabled Dim the button and ignore taps. | boolean | false |
| haptics Light haptic tap on press (iOS / Android). | boolean | true |
| accessibilityLabel Label for screen readers (needed for icon-only buttons). | string | — |
| style Style for the root (width, margins). | StyleProp<ViewStyle> | — |
| className Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. | string | — |
Customization
You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.
Design theme
Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).
Variants
Use the variant chips on the preview to switch examples; each maps to a demo you can copy from the Code tab.
Style props
React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).
- color
- stringA custom face colour instead of a material, e.g. your brand colour.
- size
- "sm" | "md" | "lg" · default "md"Height and text size (36 / 46 / 56).
- style
- StyleProp<ViewStyle>Style for the root (width, margins).
- className
- stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.
Behaviour & accessibility
- Touch
- The face sinks into its edge on press-in and springs back on release. Small sizes pad their hit area to 44pt.
- Haptics
- A light impact on press-in on iOS and on press on Android, so scrolling past it doesn't buzz. Turn off with haptics={false}.
- Screen readers
- A button with disabled and busy state. Pass accessibilityLabel for circle keys that show only a glyph.
Source
FAQ
How do I make a 3D button in React Native?
npx @expokit/cli@latest add button-3d in your Expo or React Native project and it copies a ready-made 3D button into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.Does 3D Button work in Expo Go?
react-native-svg, expo-haptics) are all included in Expo Go.How do I add 3D Button to my Expo app?
npx @expokit/cli@latest add button-3d in your project. The CLI copies the component's source into your app and installs react-native-svg, expo-haptics, so the code is yours to change.