Elements
Native form elements for collecting card data securely on iOS and Android.
Elements are PCI-scoped native input components. Card data is captured
inside the element and never enters your app's JavaScript or native heap —
only a Basis Theory token reference does. The same engine powers
@easylabs/react and @easylabs/browser; on React Native it renders as
truly native inputs (not a WebView).
Available elements
| Component | Captures |
|---|---|
CardNumberElement | PAN with brand auto-detection |
CardExpirationDateElement | MM / YY |
CardVerificationCodeElement | CVC, length-aware per brand |
TextElement | Generic sensitive text input |
Setup
EasyProvider already wraps BasisTheoryProvider from
@basis-theory/react-native-elements, so elements work anywhere inside
your provider tree.
Refs and tokenization
Hold a BTRef per element and pass them to the tokenization call when the
form submits. Card data never leaves the element.
Styling
Elements accept React Native style props directly — no CSS class
indirection. Match your app's design system the same way you'd style a
<TextInput>.
Validation
Related
- EasyProvider — required ancestor
- Wallet Checkout — Apple Pay / Google Pay flows
- TypeScript —
BTRef,InputBTRef, and element prop types