CS

Css

@styled-system/css

Styled System for the `css` prop

Animation
css
css-in-js
emotion
styled-components
style
react
@styled-system/css
Animation
javascript
npm
Stars
292
Weekly
742k
Open issues
4
Bundle
~25 kB

Installation

npm install @styled-system/css

Code example

import { motion } from "@styled-system/css";

export function Example() {
  return (
    <motion.div
      initial={{ opacity: 0, y: 12 }}
      animate={{ opacity: 1, y: 0 }}
      transition={{ duration: 0.35 }}
    >
      <h2>Animated with Css</h2>
    </motion.div>
  );
}

Pros & cons

Pros

  • Actively maintained by Brent Jackson
  • 742k weekly downloads. Battle tested
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 4 open issues on GitHub

FAQs

Alternatives & similar libraries