Write scoped, autoprefixed styles declaratively in React
npm install react-style-tagWrite styles declaratively in React
- react-style-tag
- Table of contents
- Installation
- Usage
- Implementation
- Summary
- Scoped Styles
- Props
- hasSourceMap
- isMinified
- isPrefixed
- Global Options
- Development
```
$ npm i react-style-tag --save
`javascript
// ES2015
import { Style } from 'react-style-tag';
// CommonJS
const Style = require('react-style-tag').Style;
`
`javascript
import React, { Component } from 'react';
import { Style } from 'react-style-tag';
function App() {
return (
Summary
react-style-tag creates a React component that will inject a Notice you can easily mix both scoped and global styles, and for mental mapping the scoped styles all follow the format
scoped__{key}__{hash}, for example scoped__test__3769397038. The hashes are uniquely based on each execution of hashKeys, so the implementation can either be Component-specific (if defined outside the class) or instance-specific (if defined inside the class, on componentDidMount for example).Props
Naturally you can pass all standard attributes (
id, name, etc.) and they will be passed to the