# Autoload units

This function allows you to set every default units that needs to be added automatically.

This allows you to use any units recognized by CSS, and LazyCss does not check for this.

import {setUnit, useStyle} from "lazycss-base"
setUnit("length", "%");

//use array
setUnit(["length", "height", "width"], "%");

let style = useStyle({
    //... more code
})

//other use method
setUnit("width","%");
style.demo.width = 22;
setUnit("width","px");
//equal to
style.demo.width = '22%';