Picostyle for React
Picostyle React is the package of Picostyle for React.
Features
- 🚀 The smallest CSS-in-JS library: Only 0.3 KB (minified & gzipped).
- 👏 Zero dependencies: And under 60 LOC.
- 💅 Styled components: Gives you a styled component like styled-components that y'all love.
- ❤️ For React: The 1 KB frontend library family.
Installation
$ npm install picostyle-react
Usage
Picostyle React works well with:
- Media Queries (
@media
) - Pseudo-element (
::before
) - Pseudo-classes (
:hover
)
With React
const ps = Component { const keyColor = "#f07" const Text = fontSize: "64px" cursor: "pointer" color: "#fff" padding: "0.4em" transition: "all .2s ease-in-out" ":hover": transform: "scale(1.3)" "@media (max-width: 450px)": fontSize: "32px" const Wrapper = display: "flex" justifyContent: "center" alignItems: "center" width: "100vw" height: "100vh" backgroundColor: keyColor return <Wrapper id="pico"> <Text>Picostyle</Text> </Wrapper> } ReactDOM