UIElement Docs Version 0.13.3

🔗 Function: insertOrRemoveElement()

insertOrRemoveElement<P, E>(reactive, inserter?): Effect<P, E>

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

Effect for dynamically inserting or removing elements based on a reactive numeric value.
Positive values insert elements, negative values remove them.

🔗 Type Parameters

🔗 P

P extends ComponentProps

🔗 E

E extends Element = HTMLElement

🔗 Parameters

🔗 reactive

Reactive<number, P, E>

Reactive value determining number of elements to insert (positive) or remove (negative)

🔗 inserter?

ElementInserter<E>

Configuration object defining how to create and position elements

🔗 Returns

Effect<P, E>

Effect function that manages element insertion and removal

🔗 Since

0.12.1