Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The utility-first workflow you love from Tailwind CSS in your React Native applications.

License

NotificationsYou must be signed in to change notification settings

nativewind/nativewind

Repository files navigation

Tailwind CSS

Nativewind

npm versionnpm downloadsGithubDiscordTwitter


About

Do you like usingTailwind CSS to style your apps? This helps you do that inReact Native. Nativewind isnot a component library, it's a styling library. If you're looking for component libraries that support Nativewind,see below.

Nativewind makes sure you're using the best style engine for any given platform (e.g. CSS StyleSheet or StyleSheet.create). Its goals are to to provide a consistent styling experience across all platforms, improving developer UX, component performance, and code maintainability.

Nativewind processes your styles during your application's build step and uses a minimal runtime to selectively apply reactive styles (eg changes to device orientation, light dark mode).

Installation

If you have an existing project,use these guides to configure Nativewind for your respective stack.

Alternatively, you can create a new pre-configured project via our Quickstart below.

Quickstart

We usern-new to quickly stand up an Expo project with Nativewind.

  • npx rn-new@latest --nativewind (Expo SDK 54 + Nativewind v4.1)
  • npx rn-new@next --nativewind (Expo SDK 54 + Nativewind v5)

Features

  • Works onall RN platforms, uses the best style system for each platform.
  • Uses the Tailwind CSS compiler
  • Styles are computed atbuild time
  • Small runtime keeps your components fast
  • Support for
    • Custom CSS properties, akaCSS Variables
    • Dark mode, arbitrary classes, andmedia queries
    • Animations andtransitions
    • Container queries
      • container-type and style-based container queries are not supported
    • Pseudo classes -hover / focus / active on compatible components
    • rem units
    • Theme functions and nested functions
    • React 18 Suspense API
    • Custom CSS
  • Styling based onparent state modifiers - automatically style children based upon parent pseudo classes
    • Support for thegroup andgroup/<name> syntax
  • Children styles - create simple layouts based upon parent class

Contribution

See this guide

FAQ

When is v5 landing?

Nativewind v5 is in preview

Is it safe to use v4?

Yes.

Is Nativewind moving to Expo?

No.

Can we disable auto-adding nativewind types using a setting or something? I already have the settings usingcompilerOptions.types, so I would like to disable the file generation.

withNativeWind(<config>, { disableTypeScriptGeneration: true })

What if I'm looking for a component library that uses Nativewind?

There are a number of different component libraries available that use Nativewind to achieve different results. You should pick the one that best suits your needs.

This multi-platform library focuses on achieving native feel for each individual platform using the familiar interface of Tailwind CSS.

This open source library offers universalshadcn/ui via React Native. Use this as a foundation to develop your own high-quality component library.

From the folks that brought you NativeBase, this library offers customizable cross-platform components designed to look & behave cleanly on every platform.

Documentation

Learn more onour website.

Vercel OSS Program


[8]ページ先頭

©2009-2025 Movatter.jp