Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rn-tailwind

wallywall426ISC1.0.16

Use the awesome tailwindcss library with react native and react-native-web

react, tailwind, tailwindcss, react-native, react-nativ-web

readme

rn-tailwind

Use Tailwind CSS in [React Native] and [React Native Web] (https://reactnative.dev) projects

Install

$ npm install rn-tailwind

Usage

Import TailwindUIProvider from the rn-tailwind module, which is rendered at the top of our component tree.

import React from 'react'
import App from './components/App'
import { TailwindUIProvider } from "rn-tailwind";

const Index = () => (
  <TailwindUIProvider>
    <App />
  </TailwindUIProvider>,
)

Than import rn-tailwind module and use any of the supported utilities from Tailwind CSS in your React Native views.

import { View, Text } from "rn-tailwind";

const App = () => (
  <View className="h-full xl:h-1/2">
    <View className="pt-12 xl:pt-4 items-center">
      <View className="bg-blue-200 px-3 py-1 rounded-full">
        <Text className="text-blue-800 font-semibold">Gang Gang </Text>
      </View>
    </View>
  </View>
);

Supported Utilities

Media Queries

Effects

Responsive

Layout

Flexbox

Spacing

Sizing

Typography

Backgrounds

Borders