
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
svelte-collapse
Advanced tools
A Svelte Action that is applied to an element to transition its height between open and closed states.
A Svelte Action that is applied to an element to transition its height between open and closed states.
npm install svelte-collapse
<script>
import collapse from 'svelte-collapse'
let open = true
</script>
<div use:collapse={{open}}>
<p>Lorem ipsum</p>
<p>Lorem ipsum</p>
</div>
<button on:click={() => open = !open}>
Toggle
</button>
Additional parameters that can be used to modify the transition properties, the defaults are shown below.
<div use:collapse={{ open: true, duration: 0.2, easing: 'ease' }}>
Transitioning the height of an element using CSS alone is generally not sufficient. We need to use some Javascript to keep the height variable, so that it responds naturally to added content or a screen resize. This action relies on CSS to handle the transitions smoothly, and Javascript to manage the styles.
By wrapping the logic of this approach in an Action, the elements can be easily styled. Additionally, by maintaining the open state outside of the action, the user has complete control over the open/close mechanism.
The transitions are reversible, so that an open or close transition can be safely interrupted.
FAQs
A Svelte Action that is applied to an element to transition its height between open and closed states.
The npm package svelte-collapse receives a total of 1,100 weekly downloads. As such, svelte-collapse popularity was classified as popular.
We found that svelte-collapse 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.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.