Tamagui UI
Tamagui UI is a bunch of Open Source components that render nicely on both React Native and React web, adapt to each other, and come in both styled and unstyled forms.
Many components now Adapt to render as different components depending on platform or capability. A few components have native
adaptations where they can render to platform-native output.
Install them separately, or all at once with:
yarn add tamagui
Setup
The package tamagui
is a superset of @tamagui/core
, so if you've already installed core you can change all the references to tamagui
.
You'll need to add a provider to the root of your app (unlike core, where that is optional), as it will set up the root portal for components like dialogs and popovers.
import { createTamagui,TamaguiProvider, View } from 'tamagui'import { defaultConfig } from '@tamagui/config/v4' // for quick config install thisconst config = createTamagui(defaultConfig)export default () => (<TamaguiProvider config={config}><View /></TamaguiProvider>)
For a full guide configuration with createTamagui
, check the core configuration docs.