Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including afrododi with all npm packages installed. Try it out:

// afrododi server-side rendering example // Make a component that generates some styles and returns some HTML. function render() { const {StyleSheet, css} = require("afrododi/no-important"); // Make some styles const styles = StyleSheet.create({ red: { color: "red", ":hover": { color: "blue", }, }, }); // Generate some CSS with afrododi class names in it. return `<div class=${css(styles.red)}> Hover, and I'll turn blue! </div>`; } const {StyleSheetServer} = require("afrododi"); // Call our render function inside of StyleSheetServer.renderStatic const {css, html} = StyleSheetServer.renderStatic(() => { return render(); }); // Observe our output HTML and the afrododi-generated CSS `<style>${css.content}</style>${html}`;

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

afrododi v3.1.4

Framework-agnostic async-compatible CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free