API Integrations
In addition to the API for customizing utility, variant, handler, ... that we introduced in the Customization
chapter, windi includes many functions that may be helpful in practice.
WARNING
You can view all the API documentation here, the documentation is currently not commented in detail, this is the next phase of our work.
Packages
Different functional APIs are defined in different packages, all entries can be imported from the windijs
repo, except for the @windijs/utilities
and @windijs/variants
package.
@windijs/core
Core APIs of windijs, like createUtility
, createVariant
, colorHandler
, configHandler
, ...
@windijs/colors
Colors of some popular web frameworks, bootstrapColors
, materialColors
, ...
@windijs/config
The config variables of windi utilities. Also modular, you can import or expand the config of corresponding utility. The naming rule is camelCased(utilityName) + "Config"
. For example, backgroundSizeConfig
.
@windijs/utilities
All windi utilities, like bg
, text
, p
, m
, ...
@windijs/variants
All windi variants, like sm
, md
, hover
, focus
, dark
, ...
@windijs/style
The style
utility, support for style.backgroundColor.red
, style.borderRadius.px[3]
, ...
@windijs/helpers
Operations related to css.
- CSS-in-JS:
css
,prop
,unify
,bundle
, ... - color process:
darken
,lighten
,adjustLightness
, ... - css units:
rem
,px
,em
, ... - css functions:
rgb
,rgba
,linearGradient
, ... - others:
alphaNamer
,hashNamer
,mergeObject
, ...
@windijs/transformer
Windi internal typescript transformers.
@windijs/shared
Some common JavaScript functions, such as range
, fractions
, spacings
, hash
, ...
@windijs/plugin-utils
A set of utility functions commonly used by windijs development plugins, like vite plugin.