setStyle
Imperative helper for applying styles to an element. Accepts a CSS string, a style object, or a reactive accessor. A property value of null, undefined or false removes that property.
# Signature
# Arguments
| name | type | description |
|---|---|---|
| node | Element | target element |
| value | string | object | signal | strings are assigned to style.cssText; objects are applied property-by-property; functions are unwrapped reactively. A property set to null, undefined or false is removed. |
Returns: void
# When to use
In JSX, style="…", style={…} and style:color={…} already route through this helper. Call setStyle directly when you are building elements imperatively, writing a propsPlugin, or driving styles from an effect outside the render tree.