Files
nativewind/website/docs/api/tailwind-provider.md
2022-05-22 12:03:45 +10:00

1.6 KiB

sidebar_position, title, sidebar_label
sidebar_position title sidebar_label
999 TailwindProvider <TailwindProvider />

All components need to be within the context of the TailwindProvider.

import { TailwindProvider } from "tailwindcss-react-native";

function MyAppsProviders({ children }) {
  return <TailwindProvider>{children}</TailwindProvider>;
}
Prop Values Default Description
platform web, native, ios, android, windows, macos Platform.OS Used to match platform media queries
preview boolean false Enable preview features
initialColorScheme ColorSchemeName Appearance.getColorScheme() ?? 'light' Set an ColorScheme value.
style Compiled style object undefined For manual injection via the CLI
media Compiled media object undefined For manual injection via the CLI