Platform

Web

Production

Web is one of several rendering targets. In the TpGroup RN-universal model, web UI is produced by React Native Web rendering the same component tree the mobile apps use. The existing React + Vite showcase acts as the web reference implementation while the migration to RN primitives is underway.

Current state

This showcase app is built with React + Vite + shadcn/Radix + Tailwind v4. It is the most mature surface of the design system and documents tokens, 50+ components, schema-aware (GEO) components, 25+ page templates and patterns.

Target state

Components are authored once in React Native primitives (View, Text, Pressable). React Native Web renders them to DOM without a separate web codebase. Styling flows through NativeWind — the same Tailwind classes you use today compile to RN StyleSheet objects on native and to plain CSS on web.

// Authored once — runs on web, iOS, Android, macOS, Windows
import { View, Text, Pressable } from 'react-native';
import { styled } from 'nativewind';

const SButton = styled(Pressable);
const SLabel  = styled(Text);

export function Button({ label, onPress }: { label: string; onPress: () => void }) {
  return (
    <SButton
      onPress={onPress}
      className="bg-accent rounded-md px-4 py-3 active:opacity-80"
      accessibilityRole="button"
    >
      <SLabel className="text-white text-base font-semibold">{label}</SLabel>
    </SButton>
  );
}

Web-specific concerns

ConcernApproach
SEO & GEO (AI engines)Keep the schema-aware components (JSON-LD emission) — RN Web supports raw DOM injection via <script type="application/ld+json">.
Hover / pointer statesUse Pressable state callbacks; RN Web forwards hover correctly on desktop browsers.
Keyboard navigationaccessibilityRole="button" + tabIndex; treat as WCAG 2.2 AA baseline.
Responsive layoutNativeWind breakpoints (sm/md/lg/xl) compile to RN Dimensions on native and media queries on web.
Bundle sizeMetro web bundling with tree-shaking; target ≤180KB gzip for first-paint on marketing surfaces.