{"id":17963360,"url":"https://github.com/kristerkari/react-native-css-modules-stylename-example","last_synced_at":"2026-05-05T09:33:04.802Z","repository":{"id":66125991,"uuid":"137396381","full_name":"kristerkari/react-native-css-modules-stylename-example","owner":"kristerkari","description":"A simple example app that shows how you can use CSS modules + styleName syntax with React Native and React (for browser) ","archived":false,"fork":false,"pushed_at":"2019-02-17T02:12:58.000Z","size":1980,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T19:24:25.724Z","etag":null,"topics":["css","css-modules","demo-app","example","example-app","react-native","stylename"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kristerkari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-14T18:47:58.000Z","updated_at":"2021-09-03T00:10:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7c5808a-67f7-4e1e-acc8-31fdcaeb1753","html_url":"https://github.com/kristerkari/react-native-css-modules-stylename-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kristerkari/react-native-css-modules-stylename-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristerkari%2Freact-native-css-modules-stylename-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristerkari%2Freact-native-css-modules-stylename-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristerkari%2Freact-native-css-modules-stylename-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristerkari%2Freact-native-css-modules-stylename-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kristerkari","download_url":"https://codeload.github.com/kristerkari/react-native-css-modules-stylename-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristerkari%2Freact-native-css-modules-stylename-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32643705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","css-modules","demo-app","example","example-app","react-native","stylename"],"created_at":"2024-10-29T11:35:17.384Z","updated_at":"2026-05-05T09:33:04.783Z","avatar_url":"https://github.com/kristerkari.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native CSS modules with styleName syntax\n\n![Platform - Android, iOS and Web](https://img.shields.io/badge/platform-Android%20%7C%20iOS%20%7C%20Web-blue.svg)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)\n\nThis is an example app that shows how you can use the `styleName` syntax in React Native.\n\n**Quick links:** **[Features](#example-app-features)** • **[Try it](#try-it)** • **[Documentation](https://github.com/kristerkari/react-native-css-modules#documentation)**\n\n---\n\n\u003cimg src=\"screenshots/demo.gif\" width=\"600\"\u003e\n\nThis app takes [Tape Recorder](https://codepen.io/scottohara/pen/qobKB) codepen by [Scott O'Hara](https://codepen.io/scottohara/) and ports it to React Native. You can try it by running it in both the browser and React Native.\n\nTo see code examples, have a look at [TapeRecorder.css](src/TapeRecorder.css) and [TapeRecorder.js](src/TapeRecorder.js#L153) inside src folder.\n\n## Example App features\n\n#### React Native and Web\n\n- :tada: Allows `styleName` and `style` properties to be used on React Native elements such as `\u003cText\u003e` or `\u003cView\u003e`.\n- :fire: CSS Hot loading (live reloading).\n- :mag: [Custom stylelint config for React Native CSS modules](https://github.com/kristerkari/stylelint-config-react-native-css-modules)\n\n#### React Native specific\n\n- :package: Uses [React Native CSS modules](https://github.com/kristerkari/react-native-css-modules) with `styleName` syntax.\n- :globe_with_meridians: [Platform specific file extensions](https://facebook.github.io/react-native/docs/platform-specific-code.html#platform-specific-extensions), e.g. `styles.ios.css`, `styles.android.css`, `styles.native.css`.\n\n#### Web specific\n\n- :package: Uses [Webpack](https://webpack.js.org/) + [CSS modules](https://github.com/css-modules/css-modules) + [babel-plugin-react-css-modules](https://github.com/gajus/babel-plugin-react-css-modules).\n- :wrench: Uses [React Native for Web](https://github.com/necolas/react-native-web) to make most React Native elements work in the browser.\n\n## Supported Browsers\n\n- Mobile: Android Stock browser (4.4-5.x), Android Chrome, iOS Safari 8+\n- Desktop: Firefox, Chrome, Safari\n\n## Try it\n\n### Step 1: Install depencies to run React Native\n\nMake sure that you have `react-native-cli` installed (`npm install -g react-native-cli`) and [XCode](https://developer.apple.com/xcode/) (for iOS development) / [Android Studio](https://developer.android.com/studio/index.html) (for Android development) installed and working.\n\n- Go to \"Building Projects with Native Code\" tab and follow the guide: https://facebook.github.io/react-native/docs/getting-started.html\n\n### Step 2: Clone the repo and move to project\n\n```sh\ngit clone git@github.com:kristerkari/react-native-css-modules-stylename-example.git\ncd react-native-css-modules-stylename-example\n```\n\n### Step 3: Install example app's dependencies\n\n```sh\nnpm install\n```\n\n### Step 4: Run React Native packager\n\nYou can open a new terminal tab to run React Native's packager.\n\n```sh\nnpm start\n```\n\n### Step 5: Run app on Android, iOS or Web\n\nFirst make sure that your Android emulator or iOS simulator is working, then:\n\n```sh\nnpm run ios\n```\n\nor\n\n```sh\nnpm run android\n```\n\nor\n\n```sh\nnpm run web\n```\n\nWeb app can be accessed by opening `http://localhost:8080` in a browser.\n\n---\n\n...or if you use Yarn:\n\n```sh\nyarn ios\n```\n\n```sh\nyarn android\n```\n\n```sh\nyarn web\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristerkari%2Freact-native-css-modules-stylename-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkristerkari%2Freact-native-css-modules-stylename-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristerkari%2Freact-native-css-modules-stylename-example/lists"}