Use with Vanilla
If you don't use React and other web frameworks, you can also install @fower/core
and use Fower with the most primitive APIs.
- npm
- yarn
- pnpm
npm install @fower/core @fower/preset-web
yarn add @fower/core @fower/preset-web
pnpm add @fower/core @fower/preset-web
Basic Usage
import { fower, css } from '@fower/core'
import preset from '@fower/preset-web'
fower.setConfig(preset)
const className = css('p-20', 'mx-10', 'borderGray', 'text4XL')
const $app = document.getElementById('root')
$app.className = className
With custom style
import { css } from '@fower/core'
const className = css('p-20', 'mx-10', 'borderGray', 'text4XL', {
display: 'inline-block',
textShadow: '1px 1px 2px pink',
})
const $app = document.getElementById('root')
$app.className = className