
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
solid-transition-size
Advanced tools
SolidJS utility which makes it possible to transition the width and height of elements that don't have a fixed size applied.
SolidJS utility which makes it possible to transition the width and height of elements that don't have a fixed size applied.
The utility returns two signals: transitioning
and transitionSize
. transitioning
can be used to know when the transition is happening, and transitionSize
returns the fixed size of the element while transitioning. You have to use it to style the element you want to transition.
import createTransitionSize from 'solid-transition-size';
For a very simple example we can take the <details>
element and transition the height when it is toggled:
const Details = () => {
const [ref, setRef] = createSignal<HTMLElement | null>(null)
const { transitionSize } = createTransitionSize({
element: ref,
dimension: 'height',
})
const height = () => {
if (!transitionSize()) return undefined
return transitionSize() + 'px'
}
return (
<details
ref={setRef}
class="transition-[height]"
style={{
height: height(),
}}
>
<summary>Show detail</summary>
Detail
</details>
)
}
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 Transition Size.
FAQs
SolidJS utility which makes it possible to transition the width and height of elements that don't have a fixed size applied.
The npm package solid-transition-size receives a total of 2,280 weekly downloads. As such, solid-transition-size popularity was classified as popular.
We found that solid-transition-size 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’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.