All Projects → kristerkari → react-native-css-modules-with-media-queries-example

kristerkari / react-native-css-modules-with-media-queries-example

Licence: other
An example app to show how CSS Media Queries work in React Native.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
objective c
16641 projects - #2 most used programming language
Starlark
911 projects
java
68154 projects - #9 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to react-native-css-modules-with-media-queries-example

react-native-css-modules-with-typescript-example
A simple example app that shows how you can use CSS modules + Typescript with React Native and React (for browser)
Stars: ✭ 17 (-5.56%)
Mutual labels:  example, css-modules, demo-app
Circleci Demo Python Django
Example Django application running on CircleCI
Stars: ✭ 100 (+455.56%)
Mutual labels:  example, demo-app
movies
Real world isomorphic application for movies search, based on Webpack 5 / Express / React 17 + Redux-Saga / Bootstrap 4.6 + CSS Modules / i18next / SSR
Stars: ✭ 20 (+11.11%)
Mutual labels:  example, css-modules
SplashScreenExample
How to implement a Splash Screen in ReactNative
Stars: ✭ 14 (-22.22%)
Mutual labels:  example, example-app
db2-samples
Db2 application code, configuration samples, and other examples
Stars: ✭ 56 (+211.11%)
Mutual labels:  example
ksonnet-cheat-sheet
No description or website provided.
Stars: ✭ 18 (+0%)
Mutual labels:  example
play-scala-chatroom-example
Play chatroom with Scala API
Stars: ✭ 43 (+138.89%)
Mutual labels:  example
todo-graphql-example
Example Todo app on top of json-graphql-server
Stars: ✭ 20 (+11.11%)
Mutual labels:  example
api-examples
Plesk API-RPC usage examples
Stars: ✭ 79 (+338.89%)
Mutual labels:  example
haxe
Qt binding for Haxe | Showcase example for https://github.com/therecipe/qt
Stars: ✭ 21 (+16.67%)
Mutual labels:  example
rest-api-endpoints
🌾 WordPress REST API endpoints
Stars: ✭ 31 (+72.22%)
Mutual labels:  example
widgets playground
Showcase example for https://github.com/therecipe/qt
Stars: ✭ 50 (+177.78%)
Mutual labels:  example
learning-python
notes and codes while learning python
Stars: ✭ 71 (+294.44%)
Mutual labels:  example
example-orbitdb-todomvc
TodoMVC with OrbitDB
Stars: ✭ 17 (-5.56%)
Mutual labels:  example
play-java-ebean-example
Example Play application showing Java with Ebean
Stars: ✭ 54 (+200%)
Mutual labels:  example
ARKit-SceneKit-Paint-Tiltbrush-Demo
Demo paint app with ARKit and SceneKit
Stars: ✭ 33 (+83.33%)
Mutual labels:  demo-app
SeatLayout
A seat selection library for Android with an example for selecting seats for flights, sports venue, theatres, etc
Stars: ✭ 30 (+66.67%)
Mutual labels:  example
hugo-bare-min-theme
A bare minimum theme for Hugo (https://gohugo.io) to help develop and debug Hugo sites -- https://hugo-bare-min.netlify.com/,
Stars: ✭ 71 (+294.44%)
Mutual labels:  example
typescript-css-modules-demo
A working demo of CSS Modules, using TypeScript, css-modulesify and typed-css-modules
Stars: ✭ 25 (+38.89%)
Mutual labels:  css-modules
Discord-Bot-TypeScript-Template
Discord bot - A discord.js bot template written with TypeScript.
Stars: ✭ 86 (+377.78%)
Mutual labels:  example

React Native CSS modules with CSS Media Queries

Platform - Android, iOS and Web PRs Welcome

An example app to show how CSS Media Queries work in React Native.

Quick links: FeaturesScreenshotsTry itDocumentation


This example app re-implements "Responsive Full Width Tabs" demo from Tympanus Codrops website in React Native.

The example app should look and work exactly the same way in both browser and React Native.

To see code examples, have a look at styles.css and App.js inside src folder.

Example App features

React Native and Web

  • 💻 Uses the same CSS Media Queries for responsive scaling in React Native and web browsers.
  • 🎉 Allows className and style properties to be used on React Native elements such as <Text> or <View>.
  • 🔥 CSS Hot loading (live reloading).
  • 🔍 Custom stylelint config for React Native CSS modules

React Native specific

Web specific

Supported Browsers

  • Mobile: Android Stock browser (4.4-5.x), Android Chrome, iOS Safari 8+
  • Desktop: Firefox, Chrome, Safari

Try it

Step 1: Install depencies to run React Native

Make sure that you have react-native-cli installed (npm install -g react-native-cli) and XCode (for iOS development) / Android Studio (for Android development) installed and working.

Step 2: Clone the repo and move to project

git clone [email protected]:kristerkari/react-native-css-modules-with-media-queries-example.git
cd react-native-css-modules-with-media-queries-example

Step 3: Install example app's dependencies

npm install

Step 4: Run React Native packager

You can open a new terminal tab to run React Native's packager.

npm start

Step 5: Run app on Android, iOS or Web

First make sure that your Android emulator or iOS simulator is working, then:

npm run ios

or

npm run android

or

npm run web

Web app can be accessed by opening http://localhost:8080 in a browser.


...or if you use Yarn:

yarn ios
yarn android
yarn web

Screenshots

iPhone 8

Left: iOS Safari browser
Right: React Native

iPad 5G

Left: iOS Safari browser
Right: React Native

Android Nexus 5X

Left: Android Chrome browser
Right: React Native

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].