1.0.16 • Published 3 years ago

rn-tailwind v1.0.16

Weekly downloads
5
License
ISC
Repository
-
Last release
3 years ago

rn-tailwind

Use Tailwind CSS in React Native and React Native Web 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