@alloc/ui-box

Fork of ui-box with Vite support

Usage no npm install needed!

<script type="module">
  import allocUiBox from 'https://cdn.skypack.dev/@alloc/ui-box';
</script>

README

@alloc/ui-box

Fork of ui-box with Vite support

Changelog

SSR hydration

On the server-side, call getHydrateScript to retrieve the <script> tag that injects the cached class names and computed CSS. You should include the script at the end of your <head> element.

For this to work optimally, you'll want to ensure the <html> tag has its font-size set (based on the screen width) before the hydration script is executed. Otherwise, rem units won't be properly converted into px units (which is necessary to avoid subpixel rounding errors).