Add react native reusables - #105
Merged
Merged
Conversation
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
force-pushed
the
add-react-native-reusables
branch
from
August 6, 2026 14:41
b4f7b81 to
b70f592
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.