Skip to content

Components for @otfdashkit/ui-native

The @otfdashkit/ui-native component surface — primitives, interface, layouts, patterns.

@otfdashkit/ui-native is the iOS and Android side of the OTF design system, for Expo apps. The SDK has 240+ components (150+ web, 85+ native), 109 documented one by one in the gallery. Blocks and patterns are listed in their own catalogs. The package also exports a header-collapse hook. One native pattern with heavy peer dependencies is installed from the CLI registry.

Two of them running live in a phone frame:

Buckets

BucketWhat's thereWhen to reach for it
PrimitivesThemed atoms — Avatar, Button, Card, Input, TextBuilding from scratch
InterfaceBuilding blocks — Badge, Dialog, Tabs, Toast, Tooltip, …Standard mobile UI
LayoutsLayout shells — ScreenLayout, Section, Grid, KeyboardStickyFooter, …Composing screens
PatternsHigh-level patterns — BottomSheet, OnboardingCarousel, PaywallScreen, ChipsTabBar, …Drop-in finished UX

Plus tamaguiDefaultConfig + createTamagui re-exports so you can wrap your own provider.

Importing

Every export sits at the package root:

import {
  // primitives
  Text, Card, Button, Input, Avatar,
  // interface
  Dialog, OtfTabs, Headings, Tooltip,
  // layouts
  ScreenLayout, Section, Grid,
  // patterns
  BottomSheet, ChipsTabBar, OnboardingCarousel,
  // provider
  OTFProvider, createTamagui, tamaguiDefaultConfig,
} from '@otfdashkit/ui-native'

Setup

Wrap your root layout with <OTFProvider> exactly once:

app/_layout.tsx
import {
  OTFProvider,
  OtfToastProvider,
  createTamagui,
  tamaguiDefaultConfig,
} from '@otfdashkit/ui-native'

const config = createTamagui(tamaguiDefaultConfig)

export default function RootLayout({ children }) {
  return (
    <OTFProvider config={config}>
      <OtfToastProvider>{children}</OtfToastProvider>
    </OTFProvider>
  )
}

Theming

The provider reads from @otfdashkit/tokens. To change theme at runtime, update Tamagui's theme name or pass theme="dark" | "light" on a <Theme> boundary. The kit does this via ThemeColorProvider + useThemeColor() — see the fitness-kit's contexts/ThemeContext.tsx for a copy-paste-ready setup.

Names shared with @otfdashkit/ui

Where the abstraction is honest, component names match across web and native. Props do not: each package has its own variants and sizes (web Button takes variant of default, secondary, outline, ghost, destructive, link, gradient, texture or shimmer; native Button takes primary, default, outlined, transparent, floating, destructive or shimmer). Read each component's page for its props.

  • Card, Avatar, Input, Button — same name, own props
  • Tooltip, Tabs, Dialog, Toast — same name, same parts (prefixed Otf* on native to avoid clashing with Tamagui's own re-exports)

Where it isn't honest, names diverge:

  • Web Sheet → Native BottomSheet. Different gestures, different physics, different prop set.
  • Web Drawer → Native ActionSheet or BottomSheet. Pick by use case.
  • Web Toaster → Native OtfToastProvider + imperative toast().

Hooks

useCollapsibleHeader() — the only hook in this package. Pairs with <AppHeader> for the "shrink-on-scroll" header pattern from iOS / Material You.

import { AppHeader, useCollapsibleHeader } from '@otfdashkit/ui-native'

const { onScroll, headerHeight } = useCollapsibleHeader({ peakHeight: 96, base: 56 })

<AppHeader onScroll={onScroll} height={headerHeight} title="Summary" />

What's NOT in the box

  • Navigation library. Use Expo Router, React Navigation, or whatever matches your app. The patterns (ChipsTabBar, TabBar, AppHeader) are designed to plug into either.
  • Form library. Input, Selectable, WheelPicker are controlled primitives; bring your own state.
  • Native modules. Anything that needs a native build (camera, biometrics, push) is on you.

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.