Theming
src/lib/kit.tsx through useKit(). Change them once, everywhere.KitProvider
Optional. Without it, components follow the device's light / dark setting with a monochrome accent. npx @expokit/cli@latest init asks for your brand colour, font, radius and light / dark, and writes this wrapper for you as src/lib/kit-theme.tsx.
import { KitProvider } from "@/lib/kit"; <KitProvider scheme="system" // "light" | "dark" | "system" accent="#0ea5e9" // brand colour radius={16} // base corner radius (sm / md / lg / xl derive from it) colors={{ dark: { background: "#000000", card: "#0c0c0f" } }}> <Stack /></KitProvider>Kit version (KIT_VERSION)
At the top of src/lib/kit.tsx you'll see export const KIT_VERSION = 6. That number is not the ExpoKit site or CLI release — it tracks the API of the shared theme file. When a new component needs something from the kit that your file doesn't have yet, add warns instead of silently mixing old kit code with new components.
Version history: 2 — radius.scale / radius.capsule; 3 — useLayout / shadow; 4 — labels on KitProvider; 5 — components show those labels in the UI (Cancel, Done, Today, Search, AM / PM, sheet hints, and more), plus usePanResponder / useLatest; 6 — cnProps and optional className on registry components when you use NativeWind or Uniwind. If you patched kit.tsx, run npx @expokit/cli@latest diff, merge any new Labels keys by hand, or add … --force on the kit and re-apply your patches.
Tokens
| Prop | Type | Default |
|---|---|---|
| background / foreground Page colours. | string | #fff / #09090b |
| card / popover Raised surfaces: cards, inputs, sheets, toasts. | string | #fff |
| muted / mutedForeground Subtle fills and secondary text. | string | #f4f4f5 / #71717a |
| border / input Hairlines and field outlines. | string | #e4e4e7 / #d4d4d8 |
| primary / primaryForeground Default solid buttons. | string | #18181b / #fafafa |
| accent / accentForeground Brand colour: focus rings, selection, accent buttons. Monochrome by default — pass your own to KitProvider. | string | #18181b / #fff (dark: #fafafa / #09090b) |
| success / warning / danger Status colours. | string | green / amber / red |
Text is regular weight (400) throughout the kit. For bolder headings or labels, change fontWeight in the component's styles — the code is in your project, so it's yours to edit.
Already have your own tokens? Bring your design system maps them onto the kit's names once, so you don't keep two palettes in sync.
Translate the kit's text
The text the kit adds on its own is English by default: buttons and placeholders (Cancel, Done, Clear, Today, Search, date presets, empty states) and what screen readers say (close buttons, sheet grabbers, hints). Pass labels to translate all of it app-wide. Keys you leave out stay English, and functions get the dynamic part so word order can follow your language. Keep the object outside the component (or memoise it) so the theme isn't rebuilt every render.
import { KitProvider, type Labels } from "@/lib/kit"; const hindi: Partial<Labels> = { cancel: "रद्द करें", done: "हो गया", today: "आज", search: "खोजें", doneCount: (n) => `हो गया · ${n}`, am: "पूर्वाह्न", pm: "अपराह्न", close: "बंद करें", dismiss: "हटाएं", closeSheet: "शीट बंद करें", loading: "लोड हो रहा है", clearField: (field) => `${field} साफ़ करें`, goToSlide: (n) => `स्लाइड ${n} पर जाएं`,}; <KitProvider labels={hindi}> <Stack /></KitProvider>Every key is listed in Labels in src/lib/kit.tsx. A prop on the component still wins, so one screen can say something else: placeholder, cancelLabel on Dialog, ActionSheet and SearchBar, closeLabel on BottomSheet, QrCodeButton and DrawerHeader, or dismissLabel on Alert. Charts don't use the kit, so pass accessibilityHint to them directly.
Optional Tailwind (className)
Every copied component and screen exposes an optional root className and spreads {...cnProps(className)} from src/lib/kit.tsx onto its outer View or Pressable. Without NativeWind or Uniwind, that prop does nothing — colours and layout still come from useKit() and style / fieldStyle like today.
StyleSheet.NativeWind
Follow the official Expo guide first — it wires Babel, Metro and Tailwind for your SDK version: NativeWind installation. After setup, pass classes on any ExpoKit component:
import { Button } from "@/components/ui/button";import { FloatingInput } from "@/components/ui/floating-input"; <Button className="w-full mb-3" variant="accent" onPress={save}> Save</Button><FloatingInput className="mt-2" label="Email" variant="outlined"/>Prefer one-off layout on the root only. Variant colours and motion stay inside the component source — override with style props where the docs list them, or edit the file you own.
Uniwind
HeroUI Native and other Tailwind v4 stacks often use Uniwind. Install it per their Expo instructions, then use the same className prop — ExpoKit does not ship Uniwind; it only forwards className when your bundler provides it.
Use cnProps in your own UI
Match registry components: accept className? and spread cnProps on the root. Combine with style — Tailwind for layout/spacing, kit tokens for brand colour.
import { Text, View } from "react-native";import { alpha, cnProps, useKit, type KitClassName } from "@/lib/kit"; type PlanCardProps = { title: string } & KitClassName; export function PlanCard({ title, className }: PlanCardProps) { const { colors, radius, text } = useKit(); return ( <View {...cnProps(className)} style={{ backgroundColor: alpha(colors.accent, 0.12), borderRadius: radius.lg, padding: 16 }} > <Text style={[text.lg, { color: colors.foreground }]}>{title}</Text> </View> );}Use tokens in your own components
import { Text, View } from "react-native";import { alpha, useKit } from "@/lib/kit"; export function PlanCard({ title }: { title: string }) { const { colors, radius, text } = useKit(); return ( <View style={{ backgroundColor: alpha(colors.accent, 0.12), borderRadius: radius.lg, padding: 16 }} > <Text style={[text.lg, { color: colors.foreground }]}>{title}</Text> </View> );}Motion presets
motion.snappy (toggles, indicators), motion.bouncy (press feedback, pops) and motion.gentle (sheets, layout) are spring configs shared by the whole kit — spread them into Animated.spring to make your own components feel the same.
Animated.spring(scale, { toValue: 0.96, useNativeDriver: true, ...motion.bouncy }).start();