Skip to content

0013 shared theme

github-actions[bot] edited this page Nov 18, 2026 · 4 revisions

Web and app share a Tailwind theme, not components

Status: accepted · Implementation: planned · Date: 2026-11-18 · Superseded by: 0027

From LibreLifts ADR 0022. Uniwind's paid tier is not used. As built, 2026-11-18: packages/ui has the theme and the class-name helper, with the colours LibreLifts uses. The component kits come with the first screens, so this stays planned. The app got its first components on 2026-11-18, written by hand (0027), not from React Native Reusables. The website uses the theme since 2026-11-18, with plain elements and Tailwind classes; shadcn and React Aria are not added yet, for the same reason as in 0027. Both sides now read colours from the one file, so this stays planned only for the component kits.

Context

The website and the app should look like one product. The website is built from HTML elements and the app from React Native views, and apps/web does not use react-native-web, so a component written for one cannot run in the other.

On the web, React Aria gives components their accessibility and behaviour. There is nothing maintained that does the same for React Native. What does exist on both sides is Tailwind CSS 4, and the shadcn way of working, where components are copied into the project and owned by it.

Decision

  • packages/ui holds the shared look: one Tailwind 4 theme file with the colours, and the helper that joins class names. That file is the only place a colour is defined.
  • Components are not shared. Each side has its own, with the same names and the same variants, so that a button is asked for the same way in both.
  • Fonts are declared on each side.
  • On the web, components come from shadcn on its React Aria base.
  • In the app, components come from React Native Reusables, styled with Uniwind, which brings Tailwind 4 to React Native.
  • Only Uniwind's free tier is used.
  • Component kits are added when the first real screens need them, not before.

Consequences

  • A change to a colour is made once and shows up in both.
  • Every component is written twice. Keeping the two sets alike is a matter of discipline; nothing checks it.
  • Some classes that work on the web do nothing in the app, such as hover: and grid. A class list meant for both is limited to what both understand.
  • The theme file may hold only fixed values, because Uniwind and plain Tailwind both have to read it.
  • Accessibility in the app rests on React Native's own support and has to be tested with VoiceOver and TalkBack.
  • packages/ui has dependencies from outside the workspace for joining class names. It has none from inside it.

LibreBars

Clone this wiki locally