UIElement Docs Version 0.13.3

🔗 Function: setStyle()

setStyle<P, E>(prop, reactive): Effect<P, E>

Defined in: src/lib/effects.ts:572

Effect for setting a CSS style property on an element.
Sets the specified style property with support for deletion via UNSET.

🔗 Type Parameters

🔗 P

P extends ComponentProps

🔗 E

E extends HTMLElement | SVGElement | MathMLElement

🔗 Parameters

🔗 prop

string

Name of the CSS style property to set

🔗 reactive

Reactive<string, P, E> = prop

Reactive value bound to the style property value (defaults to property name)

🔗 Returns

Effect<P, E>

Effect function that sets the style property on the element

🔗 Since

0.8.0