Rewrite of svelte-collapsible to use svelte5 syntax
npm install svelte5-collapsibleRewrite of svelte-collapsible to support svelte5 syntax.
``bash`
npm install svelte5-collapsible
Standalone collapsible card with transitions.
`svelte
{#snippet header()}
Card Header
{/snippet}
{#snippet body()}
Card content here
{/snippet}
`
Collection where only one item is open at a time.
`svelte
{#snippet item1(key)}
{#snippet header()}
First Item
{/snippet}
{#snippet body()}
Hello from first item
{/snippet}
{/snippet}
{#snippet item2(key)}
{#snippet header()}
Second Item
{/snippet}
{#snippet body()}
Hello from second item
{/snippet}
{/snippet}
`
CollapsibleCard:
- transition: TransitionParamstransitionIn?
- : TransitionParamstransitionOut?
- : TransitionParamsisOpen?
- : boolean (default: false)header
- : Snippetbody
- : Snippet
Accordion
- itemN: Snippet function (e.g., item1, item2, etc.)
> Support for changing the item name will come soon™
AccordionItem:
- transition: TransitionParamstransitionIn?
- : TransitionParamstransitionOut?
- : TransitionParams header
- : Snippetbody
- : Snippet
TransitionParams:
- transition: Transition type (svelte/transition)easing
- : EasingFunction (svelte/transition)duration
- : Duration of the animation in msdelay`: Time before the animation starts in ms
-