Skip to content
All posts

Unify Your UI/UX Across Platforms with OTF's Component System

DaveOTF Kit
8 min read
Unify Your UI/UX Across Platforms with OTF's Component System

The button shipped on iOS at 9:47pm. By 9:51pm, three engineers had filed issues. Web had it grey. Android had it floating with the wrong radius. iOS — the one that looked right at first — had a press state that stuck after release.

Three teams, three button components, three regressions.

This is what platform drift actually costs. Not the abstract "inconsistent UX" line from a design system pitch deck — actual man-hours: the same button redrawn three times, themed three times, accessibility-checked three times, and still wrong in three different ways on the same Tuesday night.

The naive fix is "one codebase to rule them all" — write once, run anywhere. Most attempts at that die on contact with platform reality. iOS wants one gesture model. Web wants another. Native wants a third. Each platform has its own accessibility tree, its own focus model, its own idiomatic motion. A component that pretends those don't exist looks fine in a demo and breaks the first time a screen reader user encounters it.

So this isn't a "unified codebase" pitch. It's a tighter claim: shared component names where packages overlap and common design tokens, alongside the platform-specific props and behavior that make each implementation usable. When the abstraction respects the platform, you stop redrawing. When it doesn't, you get the Tuesday night.

The drift problem, named precisely

"Cross-platform" usually splits into two:

  • One runtime, two skins. A web app shipped as a wrapped WebView. Same DOM, same CSS, same bugs in two app stores.
  • Two runtimes, two skins. A native iOS app and a native Android app, plus a React web frontend. This is the common case, and the cost here is the original sin: every component is rebuilt three times.

The first case is cheap on day one and punishing on day ninety — WebView keyboards, WebView accessibility, WebView pull-to-refresh that never feels right. The second is the one most teams actually live in, and the one that quietly bleeds the most hours.

Three primitives are usually duplicated:

ComponentWhat's rebuiltCost
Atoms (Button, Input, Card)Visual + interaction + a11yMultiplied across every screen
Forms (validation, errors)Submission flows per platformTests aren't portable
Navigation (stack, tab)Idioms differ per platformThe hardest one to fake

The days lost aren't glamorous. They're the Tuesday-night pixel-fix days, repeated across every release.

What cross-platform consistency can mean

A shared design system does not require identical component APIs. OTF's web and React Native packages use shared names for components where the sets overlap and shared design tokens; each package keeps platform-specific props and behavior. That distinction matters when a team ports a screen: the visual vocabulary can stay familiar while the implementation follows the runtime.

Evaluate the result at three separate levels:

  • Naming: Can developers recognize corresponding components across the packages? Shared names help with discovery, but do not imply drop-in compatibility.
  • Design decisions: Do the platforms draw from shared tokens for color, spacing, and type? Tokens give teams a common starting point; verify the rendered output on each target rather than assuming pixel identity.
  • Interaction and accessibility: Does each implementation use the platform's expected events, semantics, focus behavior, and assistive-technology support? Test those behaviors independently on web and native.

The OTF component catalog and the web and React Native showcases are the places to check the current components and examples. Before porting a screen, compare the package documentation for the specific components it uses. Treat differences in variant names, event props, and platform behavior as part of the port—not as a defect to hide.

Three platform versions of a button pass a shared consistency check

Same component names. Web and mobile. One SDK.

The free, open-source SDK gives you web and React Native components with shared names and design tokens, from one SDK. github.com/otf-kit/sdk

Get the free SDK

Why "write once, run anywhere" usually means broken everywhere

The pattern that fails is the one that hides the platform. A View that "just works" on web and mobile has to make choices about touch vs mouse, flexbox vs Yoga, focus-visible vs focus-on-press. The moment the abstraction makes those choices for you, your designer files a ticket: "the web button has the wrong hover state." Your QA engineer files another: "Android focus order is reversed." Your accessibility lead files a third.

Respect each platform at its component boundary, then reuse design decisions intentionally. A button remains a DOM button on web and a native control on mobile. Shared names and tokens can help a team coordinate the screen, but components, props, and interactions still need runtime-specific implementation and review.

A screen built from platform-specific web and native components, with shared design tokens guiding a cross-platform review

// web — use the web package and its documented props
import { Button, Card, Stack } from '@otfdashkit/ui'

export function PricingRow({ plan }: { plan: Plan }) {
  return (
    <Card>
      <Stack gap="md">
        <h3>{plan.name}</h3>
        <Button variant="outline" onClick={() => subscribe(plan)}>
          Choose {plan.name}
        </Button>
      </Stack>
    </Card>
  )
}
// native — a corresponding component, using React Native props and rendering
import { Button, Card, Stack } from '@otfdashkit/ui-native'

export function PricingRow({ plan }: { plan: Plan }) {
  return (
    <Card>
      <Stack gap="md">
        <Text style={h3}>{plan.name}</Text>
        <Button variant="outlined" onPress={() => subscribe(plan)}>
          Choose {plan.name}
        </Button>
      </Stack>
    </Card>
  )
}

The corresponding screens share the same product decision, but the implementation uses the documented props and events for each runtime. Review the web and native versions separately, then compare the visual choices that are meant to align. Convention helps; it does not erase platform differences.

Use design tokens to reduce visual drift

Separate web and native implementations can still share design decisions. A shared token set gives both teams a common reference for color, spacing, and typography. It does not make the rendered pixels identical: fonts, layout engines, controls, and platform conventions can produce different results.

Use tokens as inputs to a review, then inspect the actual screens on each platform. When a design value changes, identify which packages consume it and confirm the change in their respective previews. This keeps the design decision coordinated without promising that a web style or component prop can be copied unchanged into React Native.

For a port, record which visual properties should remain aligned and which interactions should follow platform conventions. That makes review actionable: compare the agreed design values, then separately verify layout, states, and touch or pointer behavior.

Test accessibility on each platform

A shared component name is not evidence that accessibility behavior is identical. Web and native expose different semantics and interaction models, so check the implementation users will actually run.

For web, test keyboard navigation, visible focus, accessible names, and disabled states with browser accessibility tools and a screen reader. For iOS and Android, test the corresponding native accessibility labels, roles, focus order, and state announcements with VoiceOver and TalkBack. Include the platforms and devices your product supports in the release checklist.

A useful review pairs each shared design decision with a platform-specific test: the control is discoverable, its name describes its action, its state is announced, and keyboard or assistive input can operate it. Record failures against the relevant package and runtime instead of treating a passing web check as proof for mobile.

Give coding agents package-specific guidance

An AI coding agent can repeat a team's mistakes when it cannot find the existing components or their usage examples. Put the package names and platform-specific guidance where the agent reads the repository, and link to the real package documentation.

For example:

For web UI, inspect @otfdashkit/ui documentation and use its web
component props and events. For React Native UI, inspect
@otfdashkit/ui-native and use its native props and events. Shared
component names do not mean the APIs are interchangeable. Reuse the
design tokens, then verify the result in the target runtime.

That instruction helps the agent choose the correct implementation without implying that web and native signatures are interchangeable. A reviewer can then check the package-specific import, event handlers, visual result, and accessibility behavior on the intended platform.

Make the review repeatable

A practical cross-platform review starts with the buyer-visible problem: duplicated work creates visual drift and inconsistent interaction states. Shared component names and design tokens can give teams a common vocabulary for the parts that overlap, while separate web and native APIs preserve platform-specific behavior.

For each screen, list the components it uses, check the matching package documentation, and test the target platforms. Compare token-driven visual decisions, then check interaction and accessibility separately. If a component differs, document the difference and update the correct implementation rather than forcing one runtime's props onto another.

This approach does not promise zero drift or identical output. It gives teams a clearer way to share design decisions, find the right platform component, and catch regressions before release.

Sources

Cross Platformdesign systemReact Native
OTF SDK + Kits

Buy once, own the code. Ship with the agent you already use.

  • Free, open-source SDK — same component, web and mobile
  • Paid kits include AI configs + 20+ task prompts per kit — your agent reads the whole project
  • $99/kit or $149 for everything. No subscription, no sandbox limit.
Free starter

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.

Free with your email

Get the free AI configs pack

The AI files every kit ships with. Drop them in and your AI tool knows your project.

  • CLAUDE.mdProject context
  • .cursorrulesRules for Cursor
  • prompts/Task prompts

No spam. Unsubscribe any time.