SE

Server

@emotion/server

Extract and inline critical css with emotion for server side rendering.

Animation
styles
emotion
react
css
css-in-js
ssr
server-side-rendering
@emotion/server
Animation
javascript
Stars
1
Weekly
0
Open issues
0
Bundle
~60 kB

Installation

npm install @emotion/server

Code example

import { motion } from "@emotion/server";

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

Pros & cons

Pros

  • Actively maintained by Kye Hohenberger
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Not supported in React Native
  • 0 open issues on GitHub

FAQs

Alternatives & similar libraries