LayerChart Svelte 5 patterns. Use for chart components with tooltip snippets, Chart context access, and all Svelte 5 snippet patterns for tooltips, gradients, highlights, and axes.
/plugin marketplace add spences10/svelte-skills-kit/plugin install svelte-skills@svelte-skills-kitThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/full-patterns.mdreferences/tooltip-modes.mdUse next.layerchart.com docs (NOT layerchart.com - that's Svelte 4).
<Chart {data} x="date" y="value" tooltip={{ mode: 'bisect-x' }}>
<Svg>
<Axis placement="left" grid rule />
<Area
class="fill-primary/20"
line={{ class: 'stroke-primary' }}
/>
<Highlight points lines />
</Svg>
<Tooltip.Root>
{#snippet children({ data })}
<Tooltip.Header>{data.date}</Tooltip.Header>
<Tooltip.Item label="Value" value={data.value} />
{/snippet}
</Tooltip.Root>
</Chart>
{#snippet children({ data })} - NOT let:data{#snippet children({ context })}{#snippet children({ gradient })}tooltip={{ mode: 'band' | 'bisect-x' | 'quadtree' }}| Mode | Use Case |
|---|---|
band | Bar charts (scaleBand) |
bisect-x | Time-series area/line |
quadtree-x | Area (nearest x) |
quadtree | Scatter plots |
{#snippet children({ data }: { data: MyDataType })}
git clone --branch next https://github.com/techniq/layerchart.gitUse when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.