Claude-skill-registry layerchart-svelte5
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.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/layerchart-svelte5" ~/.claude/skills/majiayu000-claude-skill-registry-layerchart-svelte5 && rm -rf "$T"
manifest:
skills/data/layerchart-svelte5/SKILL.mdsource content
LayerChart Svelte 5
Use next.layerchart.com docs (NOT layerchart.com - that's Svelte 4).
Quick Start
<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>
Core Patterns
- Tooltip:
- NOT{#snippet children({ data })}let:data - Chart context:
{#snippet children({ context })} - Gradient:
{#snippet children({ gradient })} - Must enable:
tooltip={{ mode: 'band' | 'bisect-x' | 'quadtree' }}
Tooltip Modes
| Mode | Use Case |
|---|---|
| Bar charts (scaleBand) |
| Time-series area/line |
| Area (nearest x) |
| Scatter plots |
Type the Snippet
{#snippet children({ data }: { data: MyDataType })}
References
- references/full-patterns.md - All patterns
- references/tooltip-modes.md - Mode details
- Clone:
git clone --branch next https://github.com/techniq/layerchart.git