Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 894 Bytes

Presets.md

File metadata and controls

28 lines (18 loc) · 894 Bytes

Presets

nano-css comes with a range of addons that sometimes may be overwhelming to pick through and cumbersome to install. To ease this we have created Presets — presets are simply functions that create a nano-css instance and install addons automatically for you.

Example

import {preset} from 'nano-css/preset/sheet';

const {rule, sheet} = preset();

export {
    rule,
    sheet
};

List

Below is a list of available presets.

  • sheet — installs sheet() addon, as well as stable, nesting, atoms, and keyframes addons
  • vdom — similar to sheet preset, but also installs jsx() addon, you need to provide h function in configuration
  • react — similar to vdom preset, but specifies hyperscript function h automatically and also installs snake, style, styled, and decorator addons