Skip to content

Add react native reusables - #105

Merged
Jberma23 merged 1 commit into
mainfrom
add-react-native-reusables
Aug 6, 2026
Merged

Add react native reusables#105
Jberma23 merged 1 commit into
mainfrom
add-react-native-reusables

Conversation

@Jberma23

@Jberma23 Jberma23 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

https://reactnativereusables.com - shadcn/ui for React Native, on top of
NativeWind, which compiles Tailwind classes into React Native styles. The
components are checked into src/components/ui/ rather than installed, so they
are ours to edit, and `cli add` writes more of them there.

Fifteen to start with: alert, avatar, badge, button, card, checkbox, icon,
input, label, progress, separator, skeleton, switch, text and textarea. The rest
of the catalogue is one `add` away, which is the point of the library, so there
was no reason to pull all thirty in up front.

Setup notes:

- babel.config.js is new. babel-preset-expo's defaults were enough until now.
  The React Compiler is unaffected: it comes from the Metro caller, and
  `expo export` still reports it enabled.
- metro.config.js sets inlineRem to 16. NativeWind defaults to 14 and the
  components are sized against 16.
- src/global.css keeps the web font variables it already had and gains the
  design tokens. src/lib/theme.ts mirrors them for native props that want a
  colour string rather than a class, and the root layout takes its navigation
  theme from there so nav chrome and `bg-background` agree.
- The CSS import moved from src/constants/theme.ts to the root layout, which is
  where both Expo and NativeWind want it. The exported web CSS still carries
  --font-display.
- Two jest additions, or nothing under src/components/ui/ can be rendered in a
  test: @rn-primitives ships JSX and lucide-react-native ships ESM, so both need
  babel run over them, and react-native-reanimated needs the worklets mock its
  own Jest guide recommends.

Existing screens are untouched beyond the layout - ThemedText, ThemedView and
src/constants/theme.ts still drive them. Restyling is a separate job.

Verified with the CLI's own `doctor`, plus lint, typecheck, 24 passing tests and
iOS, Android and web bundles.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Jberma23
Jberma23 force-pushed the add-react-native-reusables branch from b4f7b81 to b70f592 Compare August 6, 2026 14:41
@Jberma23
Jberma23 merged commit c955ecb into main Aug 6, 2026
6 checks passed
Jberma23 added a commit that referenced this pull request Aug 6, 2026
main took the React Native Reusables branch as a squash (#105), so its content
arrived under a new commit while this branch still carried the original. Git saw
both sides creating lib/theme.ts and checkbox.tsx and both editing README.md,
global.css and constants/theme.ts, and could not tell they were the same change.

Resolved by keeping this branch's copies. main's version of all five files is
byte-identical to the commit this branch already contains, so ours is that plus
the teal theme work and nothing was dropped: the merged tree matches the branch's
tree before the merge exactly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant