# style

Dynamic CSS authoring helpers: per-element style application and runtime stylesheet management.

[`createApplyStyle`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-createApplyStyle) and [`createApplyStyles`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-createApplyStyles) produce reusable functions that apply a [`Style`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-Style) or [`StyleMap`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-StyleMap) to one or many target elements, useful when the same style block is applied repeatedly. [`cssRule`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-cssRule) and [`cssRules`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-cssRules) build CSS rule strings from object literals; [`cssObjectToString`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-cssObjectToString) is the lower-level converter from a [`Style`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-Style) object to its CSS representation. [`addStylesheet`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-addStylesheet) and [`removeStylesheet`](https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/#api-removeStylesheet) mount and unmount `<style>` elements at runtime, so dynamic themes and feature-flagged styles can be inserted without touching the DOM by hand.

---

Canonical page: https://www.hyperfrontend.dev/docs/libraries/utils/ui/style/
This file: https://www.hyperfrontend.dev/docs/libraries/utils/ui/style.md
Documentation index: https://www.hyperfrontend.dev/llms.txt
