@corvu-next/persistent
v0.1.5
Published
SolidJS 2 utility for keeping elements in DOM while hidden.
Readme
@corvu-next/persistent
Persistent rendering utility for SolidJS 2.0 — keeps components in the DOM when hidden for faster show/hide transitions.
Note: This is the Solid 2.0 fork of solid-persistent. It targets
[email protected].
Features
- Keeps component subtree in the DOM when hidden
- Avoids re-mount cost on repeated show/hide
- Works with any conditional rendering pattern
Installation
pnpm add @corvu-next/persistentUsage
import Persistent from '@corvu-next/persistent'
<Persistent when={isOpen()}>
<div>This stays in the DOM even when hidden</div>
</Persistent>Further Reading
This package is part of corvu-next, a collection of unstyled, accessible and customizable UI primitives for SolidJS 2.0.
