Share UI components across web and mobile
Sharing a design system across web and mobile does not require forcing every interface into one component implementation. A web dashboard and a native app run in different environments, expose different interaction patterns, and often need different libraries. The useful question is narrower: which decisions should stay consistent, and where should each platform keep its own implementation?
OTF’s current approach uses shared design tokens with separate web and native UI packages. That gives teams a common visual foundation while leaving rendering and interaction choices to the app running in the browser or on a device. It is a trade-off, not a promise that one component works everywhere.
Start with the part that really is shared
Colors, spacing, type choices, radii, and theme values are good candidates for a common source. OTF’s tokens documentation describes @otfdashkit/tokens as the package that exposes values for both web and native consumers. The web output is CSS; the native output is JavaScript that can be used in a Tamagui configuration.
That shared layer can keep a brand color or semantic surface value aligned. It does not make the DOM and React Native share a renderer. It also does not guarantee that every product screen will look identical after a token changes: layout constraints, system text sizing, available fonts, and platform conventions still shape the final result.
The distinction is useful when a design change crosses products. Instead of separately copying a hex value into a web stylesheet and a mobile theme, teams can update the shared token and verify both outputs. The verification matters. A build can succeed while a component still uses a local hard-coded value or interprets a semantic token differently.
Keep the UI implementations honest
The live OTF kit documentation shows separate packages for web and native UI. The SaaS Dashboard documentation describes a web stack with React, Radix UI, and Tailwind. The Fitness Kit documentation describes an Expo and React Native app, with native-oriented primitives and the @otfdashkit/ui-native package for shared blocks.
Those are different application contexts. A browser button participates in DOM focus behavior and browser accessibility semantics. A native control participates in touch, platform accessibility APIs, and device layout. Even when both controls are called “Button,” their internal implementation and useful props may differ.
Share the concept and the design decisions where that helps. Keep platform-specific APIs where pretending they are the same would create a confusing abstraction. A web overlay may rely on browser focus management; a mobile sheet may need drag gestures and snap behavior. Give them a shared visual language, but let their interaction models remain clear.
One codebase. iOS, Android, and web.
The Fitness Kit is a mobile starter with its own API, with sign-in and a database. Live demo at fitness-preview.otf-kit.dev.
Use tokens as a bridge, not a component compiler
The tokens overview documents the web and native consumption paths. In a web app, load the package’s web CSS before the component styles that depend on it:
@import '@otfdashkit/tokens/web.css';In a native app, the documented setup imports tokens and themes from @otfdashkit/tokens/native and supplies them through the app’s Tamagui configuration. Keep that configuration in the native app’s setup rather than expecting a browser stylesheet to configure it.
The two outputs are useful because each runtime gets data in a form it can consume. They are still separate outputs, so validate the rendered result on both sides after changing a shared value. Check light and dark appearance, text contrast, spacing around longer labels, and any platform-specific theme switching that your app implements.

Decide what belongs in a shared component API
Before sharing an API, write down the behavior a user expects from it. A label, visual variant, and disabled state may mean the same thing on both platforms. Hover, keyboard navigation, long-press, safe-area handling, and swipe gestures do not necessarily map one-to-one.
Use a shared component when the same contract remains understandable in both contexts. Keep different names or separate components when the interaction is materially different. This makes the code easier to discover: a developer can tell whether a control is intended for a web page, a native screen, or both.
Avoid a large cross-platform abstraction that hides the actual runtime. If every useful prop needs a platform flag, or if one implementation has to emulate the other platform’s behavior, the shared layer may be adding more concepts than it removes. A small shared visual contract can be more maintainable than a universal component with many exceptions.
Organize packages around the app that consumes them
The OTF documentation illustrates this separation through its web and native kits. The SaaS Dashboard consumes the web UI package; the Fitness Kit is an Expo app and uses native-oriented pieces. This does not mean every team needs those exact tools. It shows one way to keep the dependency graph aligned with the runtime.
For your own codebase, make the dependency boundary explicit. A web package should not quietly pull native-only modules into a browser bundle. A mobile package should not depend on DOM-only behavior. Shared token data can sit below both packages, while each package owns its own rendering and platform-specific accessibility details.
When a primitive is truly shared, document which props are common and which are platform extensions. When it is not shared, document the relationship instead of manufacturing API parity. The goal is a predictable design system, not identical source files.
A practical review before shipping a change
When a design change affects both web and native apps, review the seam in small steps:
- Identify whether the change is a token, a shared visual contract, or platform-specific behavior.
- Update the shared token source only when the value should be consistent across consumers.
- Check that the web CSS and native configuration both receive the intended value.
- Exercise the affected screen in a browser and on a native device or simulator.
- Review focus, touch targets, system text scaling, theme contrast, and long content separately for each platform.
- Keep the component API aligned only where the user-visible contract is aligned.
This review catches a common failure mode: a team sees the same component name and assumes the implementations are interchangeable. Naming can make a system easier to navigate, but it does not replace platform-specific verification.
What this architecture gives up
Separate implementations mean a new shared visual concept may need work on both sides. Some changes can be made once in tokens; others need an update and review in each UI package. That is real maintenance cost. There is no measured percentage of components that should be shared, and the right split depends on the app’s interactions and product scope.
The benefit is clarity. Web code can use web conventions, native code can use native conventions, and both can read from a documented token layer. Teams can keep the visual system coordinated without claiming that a single React component automatically behaves correctly in every runtime.
Sources
- OTF Tokens overview — checked 15 October 2026.
- OTF SaaS Dashboard documentation — checked 15 October 2026.
- OTF Fitness Kit documentation — checked 15 October 2026.
For the current setup steps, start with the OTF Tokens overview, then choose the documentation for your web or native app. If you want a starter for the app you are building, see the OTF kits. The kits at arcade-preview.otf-kit.dev and fitness-preview.otf-kit.dev are the canonical implementations.
Stop wiring. Start shipping.
- Sign-in and a database wired in, with its own API
- iOS + Android + web from one codebase
- AI configs pre-tuned + 20+ task prompts per kit included
Ship your first screen tonight — free starter in your inbox
The quickstart, the SDK repo and the live kit demos, on this screen and in your inbox.
No spam. Unsubscribe any time.