@atmc/ssr

Atomic CSS-in-JS with a featherweight runtime

Usage no npm install needed!

<script type="module">
  import atmcSsr from 'https://cdn.skypack.dev/@atmc/ssr';
</script>

README

@atmc/ssr

Next.js SSR Implementation

  1. Install the package: yarn add @atmc/ssr or npm install @atmc/ssr

  2. Configure the pages/_document.js

import { getStyleElement } from "@atmc/ssr";

export default class CustomDocument extends Document {
  static async getInitialProps({ renderPage }) {
    const page = await renderPage();
    return {
      ...page,
      styles: getStyleElement(),
    };
  }
}
  1. Create styles with @atmc/ssr instead @atmc/css.

  2. Done!