Back to Tamagui

Tamagui UI

code/tamagui.dev/data/docs/components/intro/2.0.0.mdx

1.144.41.0 KB
Original Source
<IntroParagraph> Tamagui UI is a complete suite of copy-paste composable components that render nicely on both React Native and React web, in both styled and unstyled forms. </IntroParagraph>

You can install each component separately, or all of them at once with:

bash
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.

tsx
import { createTamagui, TamaguiProvider, View } from 'tamagui'
import { defaultConfig } from '@tamagui/config/v5' // for quick config install this

const config = createTamagui(defaultConfig)

export default () => (
  <TamaguiProvider config={config}>
    <View />
  </TamaguiProvider>
)

For a full configuration guide with createTamagui, check the core configuration docs.