
Product
Introducing Historical Analytics – Now in Beta
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
solid-presence
Advanced tools
SolidJS utility that manages the presence of an element in the DOM while being aware of pending animations.
SolidJS utility that manages the presence of an element in the DOM while being aware of pending animations.
The utility returns a boolean called present
which indicates if the element should be present in the DOM or not.
The state
variable can be used to get the current state of the presence. Valid states are present
, hiding
or hidden
.
import createPresence from 'solid-presence'
const DialogContent: Component<{
open?: boolean
}> = (props) => {
const [dialogRef, setDialogRef] = createSignal<HTMLElement | null>(null)
const { present } = createPresence({
show: () => props.open,
element: dialogRef,
})
return (
<Show when={present()}>
<div ref={setDialogRef}>Dialog</div>
</Show>
)
}
This utility is from the maintainers of corvu, a collection of unstyled, accessible and customizable UI primitives for SolidJS. It is also documented in the corvu docs under Presence.
FAQs
SolidJS utility that manages the presence of an element in the DOM while being aware of pending animations.
The npm package solid-presence receives a total of 22,166 weekly downloads. As such, solid-presence popularity was classified as popular.
We found that solid-presence demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.