Button
A pressable button with variant and size presets for React Native.
v0.3.2NativeWindStyleSheetiOSAndroidExpo Go
Preview
Installation
npx nativra-cli add buttonWrites Button.tsx to components/ui, rewrites imports to your aliases and records hashes in nativra.lock.json, along with 1 registry dependency. Existing files are never overwritten without asking.
Want to try it first? Open it in the playground: a real React Native project in your browser, with this item installed by the CLI.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "primary" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "default" | Visual styling preset |
| size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | Size dimensions, padding and text scale |
| disabled | boolean | false | Disables user interaction and dims opacity |
| loading | boolean | false | Replaces or prepends spinner indicator |
| children | string | required | Button label text |
| onPress | () => void | undefined | Press event callback |
Source
Exactly what the CLI writes, before your import aliases are applied.
Dependencies
Used by
- Account Settings FlowTemplateEnterprise SaaS account, organization seats, security sessions, and billing management flow.
- Analytics DashboardTemplateExecutive SaaS mobile dashboard template with KPI metrics, time-range filter pills, channel breakdown bars, and recent audit activity feed.
- Auth FlowTemplateA complete mobile authentication template with Sign In, Sign Up, Forgot Password, and OTP verification steps.
- Booking FlowTemplateAppointment booking in three steps: date and free time slots, contact details with phone, a summary to confirm, then a success screen.
- Chat & Messaging FlowTemplateIn-app support and customer messaging template with conversation threads, speech bubbles, and keyboard-avoiding input bar.
- CodeScannerComponentQR and barcode scanner on expo-camera with a framing guide, torch toggle, duplicate filtering and permission states.
- DialogComponentAn accessible modal dialog with backdrop, title, description, and action buttons.
- eCommerce FlowTemplateProduction mobile retail and eCommerce storefront template with product catalog, search filters, detail sheet, cart, and order summary.
- Empty StateBlockClean empty state illustration card with title, description, and call to action.
- Filter SheetBlockEnterprise slide-up filter sheet with multi-select category chips, price range slider, status toggles, and CTA controls.
- Fintech WalletTemplateHigh-impact mobile finance and crypto wallet screen with total balance card, quick action pills, asset allocation list, and recent transactions.
- Login FormBlockA full authentication block with email, password, and sign-in action.
- Notification ItemBlockInteractive mobile notification card with user avatar, timestamp, unread indicator dot, and action buttons.
- Onboarding FlowTemplateA multi-step walkthrough walkthrough template with slides, pagination indicators, next/skip controls, and completion actions.
- Order SummaryBlockComplete mobile e-commerce checkout invoice summary with line items, voucher discount, and checkout button.
- Pricing CardBlockReady-to-use mobile subscription tier card with features list and checkout CTA.
- Product CardBlockProduct tile with image, badge, wishlist heart, name, rating, price with compare-at price, and add-to-cart.
- Profile FlowTemplateProfile screen with avatar, bio, stats and grouped settings, plus an edit mode with validation, photo change and async save.
- Register FormBlockSign-up form with name, email, password and confirm, inline validation, terms consent and autofill hints.
- Settings FlowTemplateA comprehensive mobile settings screen template with account profile header, preference toggles, security options, and logout dialog.
- Social FeedTemplateInfinite-scroll feed with post cards, optimistic likes, comments and native share, pull to refresh, and error and end states.
- User ProfileBlockReady-to-use mobile profile card with avatar, verified badge, stats, and actions.