[](https://bundlejs.com/?q=@alinea/styler)
npm install @alinea/styler
Class name composer. Fully typed in your IDE when paired with
typescript-plugin-css-modules.
``scss`
// Some.module.scss
.root {
color: blue;
&-sub {
color: red;
}
}
.link {
color: yellow;
&.is-active {
color: orange;
}
&.is-small {
font-size: 2em;
}
&.is-large {
font-size: 2em;
}
}
`tsx
import styler from '@alinea/styler'
import css from './Some.module.scss'
const styles = styler(css)
You can reach subclasses, separated in css by dashes, with dot access
`tsx
// =>
`Reflect state by passing objects with boolean properties or strings
`tsx
// => `Use
styler.global to add a global classname`tsx
// =>
`Use
styler.merge to add in props with a className`tsx
// =>
``