typedcssx v2.4.1
⌘ K

On this page

cssx.create

Create a stylesheet that takes the key as a className.
Since this function is created almost only once, we recommend using css as the variable name.

style.ts
import cssx from 'typedcssx'
 
export const css = cssx.create({
  container: {
    display: 'flex',
    justifyContent: 'space-between'
  },
  link: {
    fontSize: '14px',
    textDecoration: 'none'
  },
})

Compiled create

A hashed prefix of the object is added to the class name, so styles do not conflicts between different components.

css
.container_40ExT {
  display: flex;
  justify-content: space-between;
}
 
.link_40ExT {
  font-size: 14px;
  text-decoration: none;
}