/rhp:rhpfrom rhp
Creates charts, graphs, and data visualizations using rhp (@bezda/rhp), a SolidJS-based library that renders HTML/CSS charts in plain HTML, React, Next.js, Vue, Svelte, Solid, or Astro. Covers 30+ chart types with magazine-style design and interaction.
Ships in rhp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
rhp draws charts out of HTML elements placed by CSS.
You describe one slat (the element drawn for one row of data) from a few blocks (Bar, Dot, Tick, Label, Cell, Place, Area, Line), and rhp draws a slat for every row of the data and keeps each one in its place.
For bulk scatter points, the experimental ManyDots collection can draw plain HTML points directly inside a Chart with cross, without a Plot or a slat per point.
It is in rhp 2.0.3 and later, from npm and from the @2 CDN URL.
You do not know rhp yet.
rhp 2 was written in September 2026, after your training data.
An older, unrelated rhp 1 ("react-html-plots", React components with Legend-State, packages @bezda/[email protected], @bezda/rhp-core, @bezda/rhp-base) may be in your memory: never use any of it.
Write rhp code only from this skill's recipes and references, never from memory, and check what you wrote with the checker before you hand it over.
The workflow has two paths, which differ in how much of the design guidance you read before you design. Choose one before the brief, and write it in the brief:
The user's own words win ("be thorough", "just sketch it"). When it is unclear whether they want one chart or several to choose from, make one, careful.
No two versions on the same path may be the same chart; a careful one and a sketch may meet. Before you start them, decide what each one is:
The sketches: write one list of this subject's own objects (step 3 says what counts), one more than there are sketches, and put it in a random order:
node -e "const a = [...Array(+process.argv[1])].map((_, i) => i + 1); for (let i = a.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [a[i], a[j]] = [a[j], a[i]]; } console.log(a.join(' '))" 4
(the number is the length of the list). The first sketch gets the object first in that order, the second the next, and so on: each builds the object it is given and draws no other.
The careful ones: give each a different reading of the data, a different question the chart answers or a different form for it (forms.md): the first the subject's most fitting form, the others another way into the same data (the whole decade, its cycles, its months; the calendar, the weeks, the weekdays).
Each version starts fresh, or what you read and decided for one pulls the next toward it. When you can start subagents, give each version its own, with the request, the data, its path, and its object or its reading; each one follows this workflow on its own. When you cannot, make the sketch versions first, each with only what its path reads, and write each version its own brief.
Where a step below differs between the paths, it says Sketch: for the sketch path; everything else is the same for both.
Follow these eight steps in order, for every chart, however short or detailed the request.
Before any code, write a short brief in your reply:
Brief
Asked (must all be in the result):
- "<the user's words>" -> what that means for the chart
- ...
Chosen (the user left these open):
- path (careful or sketch), form, environment and file, data, interaction, motion (CSS by default; JS for data that changes rapidly), size
Objects (sketch only, step 3):
- 1. <an object of this subject> 2. <another> 3. <another>
- Drawn: <the number the command printed>
Design (from the subject, or the drawn object, and the intended reading):
- Idea: the subject's own shape, object or way of drawing this data (careful), or the drawn object applied to this data (sketch), and how it helps the reading
- Marks: how each mark is drawn to carry the idea
- Composition: where the headline, the chart and the other parts sit, on a desktop and on a phone
- Palette: the paper, the ink, the accent, and where each comes from
- Type: the faces, and why these
Look at the project before you write anything: read package.json (dependencies and devDependencies) and go down this table; the first row that matches wins, because a Next.js app also has react, a SvelteKit app svelte, a Nuxt app vue.
| What you find | Write the chart as | environments.md |
|---|---|---|
| no project, an empty folder, a chatbot conversation, or "an HTML file" | one .html file that loads rhp from jsDelivr (it needs a connection) | section 3 |
astro | a Solid island with @astrojs/solid-js, otherwise a custom element | section 12 |
next | a React component the server never renders (loaded with next/dynamic and ssr: false) | section 8 |
nuxt | a Vue component | section 9 |
@sveltejs/kit | a Svelte component | section 10 |
@solidjs/start | a JSX component importing @bezda/rhp | section 4 |
@angular/core | a standalone component | section 11 |
solid-js (with vite-plugin-solid) | a JSX component importing @bezda/rhp | section 4 |
react | a React component that mounts an html-template chart from @bezda/rhp/standalone | section 7 |
vue | a Vue component | section 9 |
svelte | a Svelte component | section 10 |
solid-js in node_modules alone does not make a Solid app: npm installs it with @bezda/rhp in every app.
Name a new file after its subject (languages.html, RainfallChart.jsx), and put it where the project keeps similar files.
Install with the project's package manager (npm install @bezda/rhp) unless the chart is a plain HTML page, which loads rhp from jsDelivr.
Look at the subject before you think of a chart type. A reader already knows what it looks like: its shape (a week is seven columns, a river runs from source to mouth, a depth hangs below the surface), its objects (a ticket, a scoreboard, a gauge, a ledger), and the way people who work with it already draw this data (a tide table, a score sheet, a growth chart at the doctor's). When one of those can hold the data honestly, it is the chart's form: forms.md lists the shapes rhp draws and the recipe that has the technique for each. When none can, the form comes from the data alone, and the subject shows in the marks and the composition (step 4). The form the user named always wins.
Sketch: write three answers in the brief, each this subject's own and each a different thing: its shape, an object a reader knows it by, or the way the people who work with it draw this data (for the electricity a country makes: a meter's dial, the bill that comes each month, a map of the grid's pylons). Models given the same request reach for the same first answer, so pick one of the three by chance and build that one (a sketch of a request for several builds the object it was given instead):
node -e "console.log(1 + Math.floor(Math.random() * 3))"
Draw once and keep it. The object gives the poster its idea, its paper, its type and its composition (step 4). It shapes the chart only as far as the chart stays as easy to read as plain bars: a tape measure is still bars along a ruler. An object that cannot hold the data honestly, or that a reader would have to learn, is replaced by another of the subject's own before you draw.
An rhp chart has no chart type to configure. It is one slat, the element drawn for each row of data, composed from blocks, so you design that slat:
Label, Bar, Dot, Tick, Line, Area, Cell, Place) or an element of your own inside one.overlap) draws layers: a scatter, a line, a crosshair, a marker for today.forms.md maps subjects, data and stories to forms and to these compositions; use the form the user named, if they named one.
Then open the closest recipe in recipes/ and read it whole.
Sketch: read it up to the line <style id="poster-download-styles">: what follows is the fit-to-screen and download block, the same in every recipe, which step 6 adds to your page.
A recipe gives technique, not a design. Every recipe is a complete, tested chart page, and its comment at the top says which part is which. Take its technique: how the Plots and blocks are composed, the scale, the helpers, reliable state and event handling, the accessibility, the phone rules. Reconsider its design: its look, the order and place of its parts, its readout band and controls row, the way its marks are drawn, and its wording were made for another subject. Keep the choices that fit this chart, and adapt the rest to its subject and reader's task. When the story needs a slat no recipe has (a name, a bar, a sparkline and a target in one slat), combine the techniques of several recipes.
For a bulk scatter collection, consider ManyDots instead of creating one slat per point.
Keep Dot when you need rich point content or Plot's automatic keyboard navigation, selection, or readout behavior.
Both remain explicit choices at any count, with no automatic switch at 500 points.
Read the ManyDots API and accessible example before using it.
It preserves per-point color, size, shape, classes, and appearance styles and supports native hover, click, touch, and pointer events through its host.
Point metadata uses the original data-rhp-index; drag behavior and keyboard-accessible controls are supplied by the application.
Its numeric sizes mean pixels, updates are immediate and scan the rows, and initial SSR hydration requires aligned row order when DOM identity matters.
| Recipe | Use it for |
|---|---|
bar | ranked categories, long names (horizontal bars) |
column | values over a few periods or categories (vertical bars) |
grouped-bars | two to four values side by side per category |
stacked-bars | parts adding up to a total per category |
stacked-100 | shares of 100% per category |
diverging-bars | values either side of zero, survey agree / disagree |
waterfall | how a start value becomes an end value, step by step |
line | one series over time |
multi-line | several series over time |
area | one quantity over time, filled |
scatter | two measures per item |
bubble | two measures plus a size per item |
slope | change between two dates per item |
sparklines | many small series side by side, a table of trends |
race | a ranking that changes step by step, played over time (JS motion) |
live | values that arrive from a feed without pause (JS motion) |
histogram | the distribution of one measure |
box-plot | distributions compared by group, summarized |
violin | distributions compared by group, their full outline |
strip | every value of a few groups as dots |
dumbbell | two values per item and the gap between them |
gantt | tasks over time, a schedule |
candlestick | open, high, low and close prices |
donut | a few parts of one whole |
radial-bars | progress toward goals, in a ring |
waffle | counts out of 100, people or units |
heatmap | a value over two categories (weekday by hour) |
lollipop | ranked values, lighter than bars |
bullet | actual against target, with bands |
pyramid | two sides of one population by age |
silhouettes | things known by their shape (buildings, ships, bottles), each in its own outline to scale |
dial | how a day, a week or another cycle splits into parts, around a dial |
tape | how a day, a budget or another whole splits into parts, laid end to end along one ruled tape cut into lengths |
log-line | a quantity that grows by multiples over years, on a log scale, its falls measured |
unit-stack | a total made of parts over periods, counted out in units, one part to follow |
The rhp MCP server's rhp_recipe tool (rhp:rhp_recipe) returns the same recipes when the files are not on disk.
Unless the user gave a style, the chart is an original editorial poster: a magazine, advertisement or feature-article infographic designed for this subject. Original means that a reader could not guess which recipe it started from, and that with its words covered it still says what it is about. Read design.md and make its five decisions, in the brief's Design lines, each from this subject and each different from the starting recipe's. Sketch: read sections 2, 4 and 5 of design.md, and make the five decisions from the object you drew.
What the user or the project has fixed stays fixed, and the rest is still designed:
| The request | Fixed | Yours, from the subject |
|---|---|---|
| no style given | nothing | all five |
| the user's colors, fonts, brand or "dark" | those, exactly | the idea, the marks, the composition, and what they left open |
| a chart inside an app with a look of its own | the app's fonts, colors, card and spacing | the idea, the marks, and the composition inside the card |
| "plain", "minimal", "no poster", "just the chart" | the plain chart of design.md section 9 | nothing: plain wins |
Unless the request is plain (design.md section 9 says what a plain or a minimal chart keeps):
Unless the user said otherwise, the chart gets one interaction that serves its story, using interaction.md for techniques and examples.
Sketch: use the recipe's technique, or read the section of interaction.md for the interaction you choose when the recipe has none like it.
Choose interaction behavior and presentation for the reader's task and the intended design.
Familiar patterns are welcome when they fit.
Recipe examples demonstrate working techniques; their controls, feedback, layout, and transitions are choices to reconsider.
It works with a mouse, a finger and the keyboard, and nothing is shown only on hover.
For a hover, focus and tap readout, the readout follows a mouse or a pen as it moves; a tap, a click or the keyboard picks a slat, and a scroll never does (pick on click, never on pointerdown); between slats the pick stays; leaving the poster gives the pick back to the slat that has focus, or clears it.
The example below demonstrates that readout pattern.
The hint for an interaction sits beside its control, in words that fit every device ("Tap or point at a fruit"), never in the source note.
When the user asks for a "static" chart, an image-like chart or no interaction, add none.
A chart with fixed data and no interaction gets static=${true} on its Chart: rhp draws it once and keeps no signals.
For every standalone HTML poster page, keep the recipe's fit-to-screen and PNG download controls, or copy the complete block from download.md before </body>.
Sketch: when the skill's files are on disk (an installed skill), add the block before </body> with node <this skill's folder>/scripts/add-download.mjs <your page>: it copies it from the recipes without your reading it.
Otherwise (the skill read through the rhp MCP server or from the website), copy it from download.md, as above.
The icons sit above the poster on the right, outside the saved image; on gallery recipe pages they share the row and color of the gallery link.
The fit toggle scales the view to up to 95% of the viewport height and restores full size on the next activation.
Download saves the full poster, including the headline and note, even when the view is fitted or the page scrolls.
ManyDots, omit slat types and put the collection directly inside the Chart.nice(...extent([0, ...values])), which skips missing values (rule 2 below).order sorts only what it draws.aria-label) must stay true for any data it may get:
grep -n the prop in api.md, and read the lines around it).Run the checker on the file after the first full draft and again after every fix, until it reports no errors and no warnings:
rhp_check tool (rhp:rhp_check) with the file's absolute path;npx -y @bezda/rhp-mcp check <file> (add --dark when the page has a dark mode).Sketch: check at 1280px, 390px and 320px from the first draft (--widths 1280,390,320, or widths: [1280, 390, 320] for rhp_check): most phone layouts that break do it at 320px.
When a finding comes back after you fixed it once, read the section its See line names.
A chart component that takes its data from the app cannot be drawn on its own: check a small entry file that draws it with fixed data, as environments.md section 13 shows.
For the experimental ManyDots collection, also check its rendered point count, coordinates, per-point appearance, native interactions, and keyboard-accessible alternative directly in the browser.
A clean standard-chart checker report alone does not establish coverage of its bulk points.
It builds the chart, renders it in a browser at 1280px and 390px, tries its interaction, and reports runtime errors, props rhp does not have, data the slat reads but the Plot lacks, values past the scale, overlapping or cut-off text, marks sticking out, sideways scrolling, low contrast and tiny text, with a fix for each.
Its screenshots show the page with reduced motion asked for, so a chart that animates on load is pictured at rest; its interactions run with motion on.
They go to a folder in the system's temp directory, and the report gives their paths; --out <dir> puts them elsewhere.
Keep screenshots, and any test files of your own, out of the user's project.
Then open the screenshots and look at them as a demanding art director would: hierarchy, spacing, alignment, color, legibility on the phone, and whether the headline is true for the data.
Unless the request was plain or minimal, put the design to two tests:
Fix what you see, and check again.
Never make a warning go away by removing something the user asked for. If the checker cannot run here (no Node, no browser, a chatbot without tools), go through the rules in "Rules that prevent most bugs" below one by one against your code instead, and say in the handoff that the chart was not rendered.
--widths 1280,1024,768,390,360,320): layouts that change between 320px and 1280px (a breakpoint, a turned chart, a panel beside the chart) are where most layout bugs are; 360px and 320px catch narrower phone layouts.
If rhp_check accepts only four widths per call, use two calls to cover all six.npx -y @bezda/rhp-mcp check <file>.Poster optional panel: kicker, headline, dek, the chart, note
└─ Chart the frame: scale, orientation, axis, theme, height or aspect
└─ Plot one stack of slats; every prop that is not a setting is a column of data
└─ slat (d) => <div> one element per row of data, made of blocks placed by d's values
├─ Label edge="start" the row's name, before the chart
├─ Bar to={d.value} a bar from 0 (or from) to the value
└─ Label at={d.value} the value's number, just past the bar
scale={[min, max]}, orientation ("horizontal", the default, or "vertical"), ticks, format, theme, and height or aspect. A Chart can hold several Plots drawn on the same scale.name={[...]}, sold={[...]}), each single value is shared by every row, and each function of d is computed per row. A list of objects goes in rows. Its own settings are order, reorder, key, rows, overlap, orientation, slats, animate, thick, static, keyboard, class, style, ref.d, one row: it reads d.name, d.sold, d.index (the row's place in the data) and d.position (its place on screen), and returns one root element holding blocks.slat(settings, fn) turns that function into a slat type with its own scoped CSS and layout: css, thickness (px per slat), room (px outside the plot for names and numbers, or "auto"), inset.Bar from to, Dot at, Tick at, Label at or edge, Cell value, Place at, Area points, Line points. Each also takes class, style, handlers, data-* and children, and all but Label and Place take color.cross={[min, max]} on the Chart) turns an overlap Plot into a scatter plot or a line chart: Dot at={x} cross={y}, Line points={[[x, y], ...]}.nice, extent, every, stackUp, shares, running, summary, bins, density, sortBy, series, cycle.css (gradients, textures, type, custom outlines with shape()). That freedom is where an original design comes from.A complete chart in the plain HTML format (the format of every recipe), with a poster and a hover, focus and tap readout:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bananas outsell everything</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,[email protected],700&family=Inter:wght@400;600&display=swap">
<script type="importmap">{ "imports": { "@bezda/rhp/standalone": "https://cdn.jsdelivr.net/npm/@bezda/rhp@2/dist/standalone.js" } }</script>
<style>
body { margin: 0; padding: 40px 16px; background: #e8e4dc; }
.poster { max-width: 720px; margin: 0 auto; padding: 28px 28px 18px; background: #fbf8f1; color: #1f1a14; font-family: Inter, system-ui, sans-serif; }
.poster figcaption { display: grid; gap: 6px; margin-bottom: 18px; }
.poster .kicker { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8a5a12; }
.poster .headline { font: 700 clamp(27px, 4.7vw, 34px)/1.05 Fraunces, Georgia, serif; text-wrap: balance; }
.poster .dek { font-size: 15px; line-height: 1.45; color: #4d453b; max-width: 52ch; }
.poster .note { display: block; margin-top: 14px; font-size: 11.5px; color: #6f665a; }
/* The dek is the readout: on a phone it keeps two lines, its longest text at 320px, so a pick never moves the chart */
@media (max-width: 480px) { .poster { padding: 20px 16px 14px; } .poster .dek { min-height: 2lh; } }
</style>
</head>
<body>
<div id="chart"></div>
<script type="module">
import { Chart, Plot, Bar, Label, Poster, slat, nice, extent, html, render, createSignal } from "@bezda/rhp/standalone";
// Data, and what depends on it
const fruit = ["Bananas", "Apples", "Cherries", "Pears", "Plums"];
const sold = [18, 12, 7, 5, 3];
const scale = nice(...extent([0, ...sold])); // 0 to 20, ticks every 5
const lead = sold.indexOf(Math.max(...sold)); // the fruit the headline names: lit until the reader picks another
// Slat type: one slat per row; its CSS reaches only these slats
const Fruit = slat({
thickness: 40,
room: { start: "auto", end: 44 },
css: `
.name { font-size: 14px; font-weight: 600; }
.bar { --rhp-end-radius: 6px; }
.value { font-size: 13px; font-variant-numeric: tabular-nums; }
.slat.on .value { font-weight: 700; }
`,
}, (d) => html`
<div class=${() => (d.on ? "slat on" : "slat")} data-row=${() => d.index}>
<${Label} edge="start" class="name">${() => d.fruit}<//>
<${Bar} to=${() => d.sold} color=${() => (d.on ? "#c2410c" : "#e0a65b")} />
<${Label} at=${() => d.sold} class="value">${() => d.sold}<//>
</div>`);
// Chart component: the app holds the state (which slat the reader picked)
function FruitChart() {
const [on, setOn] = createSignal(null);
// The row of the slat an element is in, or null (between slats, on the axis or the text)
const rowOf = (el) => {
const root = el.closest("[data-row]");
return root ? +root.dataset.row : null;
};
// A mouse or a pen picks as it moves, a tap or a click picks, the keyboard picks; on no slat the pick stays
const pick = (e) => {
const row = rowOf(e.target);
if (row != null) setOn(row);
};
// Leaving the poster: back to the slat that has focus (a keyboard's or a click's pick), or none
const leave = (e) => {
if (e.pointerType === "touch") return; // a finger sends pointerleave as it lifts after a tap
setOn(e.currentTarget.contains(document.activeElement) ? rowOf(document.activeElement) : null);
};
// Off the chart (on the headline, the readout or the note), pointing is as if the pointer had left the poster
const move = (e) => e.pointerType !== "touch" && (e.target.closest(".rhp-chart") ? pick(e) : leave(e));
return html`
<${Poster}
kicker="Market stall, Saturday"
title="Bananas outsell everything else"
dek=${() => (on() == null ? "Crates sold by midday. Tap or point at a fruit." : `${fruit[on()]}: ${sold[on()]} crates by midday.`)}
note="Illustrative data."
onPointerMove=${move} onClick=${pick} onFocusIn=${pick}
onPointerLeave=${leave} onFocusOut=${(e) => !e.currentTarget.contains(e.relatedTarget) && setOn(null)}>
<${Chart} scale=${[scale.min, scale.max]} ticks=${scale.ticks} label="Crates of fruit sold by midday"
theme=${{ font: "Inter, system-ui, sans-serif", ink: "#1f1a14", muted: "#6f665a", grid: "#e6dfd2" }}>
<${Plot} keyboard=${true} fruit=${fruit} sold=${sold} on=${(d) => (on() ?? lead) === d.index}>${Fruit}<//>
<//>
<//>`;
}
render(() => html`<${FruitChart} />`, document.getElementById("chart"));
</script>
</body>
</html>
In a Solid app the same chart is JSX: <Bar to={d.sold} /> instead of <${Bar} to=${() => d.sold} />, imports from @bezda/rhp and solid-js; environments.md has the exact rules.
Data:
d.sold only if the Plot has a prop sold. A list of objects goes in rows={[...]}, never data={...}: data would just be a column named "data". Any prop a Plot does not know (id, title, onClick) is a column too, and an array is always a column, item i for row i: to give every slat the same list, pass a function of the row (shown=${(d) => shown()}).scale={[min, max]} with min below max covers every value: a Bar past it is cut off, and Dots, Ticks, Places and the points of an Area or a Line past it land outside or squeeze the outline.
Build it from the data, const s = nice(...extent([0, ...values])), which keeps 0, holds negative values and skips missing ones, and give the Chart scale=${[s.min, s.max]} ticks=${s.ticks}.key on the Plot (key="city"), or slats swap data instead of leaving. d.index can change then, so read it in a function: data-row=${() => d.index}.Intl.NumberFormat (thousands, units, percentages, currency) and use font-variant-numeric: tabular-nums where numbers line up. In the JS version (animate), values in between are fractional: round what you print.The html template (every format except Solid JSX):
<${Bar} ...>, closed by <//> or />.${() => d.sold}. ${d.sold} is read once and never updates. Never destructure d. Lists and numbers that never change can be passed as they are (fruit=${fruit}).keyboard=${true}, overlap=${true}, static=${true}, fill=${true}, smooth=${true}. A bare keyboard passes an empty string, which is false, and silently does nothing.onClick=${(e) => pick(e)}. A function with no parameter on a component (a block or a Poster) runs once while drawing and is never attached. Handlers on plain elements (div, button) work either way, and the Chart takes none at all (rule 16).class, never className: on a block, className replaces rhp's own class and the block disappears.<b>${() => d.name}</b> <em>12</em> renders "Name12". Write the space as ${" "} or keep text next to it (<b>Name</b>: <em>).style=${{ "pointer-events": "none" }}: a string is dropped.
On a slat's root, keep a changing style an object (style=${() => ({ "--n": d.n })}), because a string that changes or a style that becomes undefined erases its stack position.
On rhp 2.0.2 the same replacement can erase a Block's position and color, so use objects there too; 2.0.3 fixed it for Blocks.
Other plain elements accept objects or strings.Structure and layout:
<div>) holding its blocks.
In an overlap Plot or a Scale, a single block can be the root itself, including its own children, so avoid an extra wrapper.
Those children use the block's box, not the full slat's band.
Several blocks still need a common root.
Keep a wrapper for a full-band hover or pointer target, even with one block.
Give the Plot the slat type slat() returns, not the function you passed to it.@bezda/rhp and Solid from solid-js. Everywhere else, import everything from @bezda/rhp/standalone (rhp, html, render, createSignal, createMemo, createEffect, Show, For, Index, onMount, onCleanup, batch, untrack, createStore, reconcile), which carries its own Solid: never add a second solid-js beside it. From rhp 2.0.2 it also has createSelector, createComputed, on, mergeProps, splitProps, Switch and Match (2.0.1 lacks them); it has no Dynamic, Portal, createResource or ErrorBoundary. For the slat the reader is on, a per-row comparison (on=${(d) => on() === d.index}) works with every rhp 2.room.start, and labels past the plot need room.end.
In a poster row with one main plot and labels on either or both sides, usually size those gutters from their rendered text, letting the plot use the remaining width as fonts scale and labels wrap or stack.
Especially on smaller screens, prefer shared left and right content edges with the caption, controls, readout and footer, using the poster's padding for outer whitespace.
This is a design preference: the intended composition takes priority, including deliberate spacing or different alignments.
A room you give replaces the defaults on every side, so set each side you need.
"auto" measures only edge Labels that are direct children of the slat's root; point-anchored Labels need measured room in px (design.md, "Fit the label gutters").
Long names need max-width with an ellipsis, or wrapping, in the slat CSS.height gives each slat 32px unless the slat type sets thickness; a vertical chart is 240px tall unless you set height. A chart inside a flex row, an inline-block or a fit-content box collapses: give it flex: 1; min-width: 0 or a width.data-* on the Poster or a wrapper element, not on the Chart: the Chart keeps only id, class, role, style, ref, label and aria-*.Style and color:
css and the Chart's theme.
rhp's block CSS is !important inside cascade layers, so page CSS cannot change a block's color, background, font, border, radius, shadow, padding or transition.
Page CSS styles the poster around the chart and the chart's box.
Focus styles for slats (.slat:focus-visible) go in the slat's css too: a page :focus-visible rule never reaches a slat.
ManyDots instead uses pointClass and ordinary application CSS or pointStyle for appearance, while the collection guards point geometry.color="series-2", "positive", "negative", "muted" or "#c2410c".
Set the palette in the Chart's theme (series, ink, muted, grid, surface, positive, negative, low, high, font).
Theme values may read the page's own variables (ink: "var(--ink)"), so the poster and the chart share one set of tokens and dark mode is a few lines of CSS (design.md); a block's color may not (rhp warns), and page CSS never sets rhp's own --rhp-* variables.
series() counts six colors: with a shorter series list, call series(n).
A Label does not take its Bar's color: give the slat's root --rhp-color in a style object (style=${() => ({ "--rhp-color": d.on ? ACCENT : QUIET })}) or color the Label's own text.size is a length (size="12px"); a bare number stretches it into an oval.style=${{ "pointer-events": "none" }} so the pointer reaches the Plot under them.Motion:
animate for the data groups that change: animate=${["sold"]}, or animate=${true} for all of its numbers, or animate=${{ groups: ["sold"], duration: 1200, ease: "linear" }} to time them (here for a feed with a reading every 800 ms). The blocks drawn from those values then move on rhp's JS clock, which carries each move through the next new value instead of restarting a CSS transition on every change, and labels stay exactly on their bars. When the scale follows the data too, put animate on the Chart, so the axis moves with the marks. A Plot inside a slat needs its own animate. Give the changing numbers as lists (gdp=${() => gdpAt(t())}): the JS version never moves a group given as a function of the row ((d) => ...). To play back data you have (a race, a year slider with Play), move a playhead t on every frame, give the Plot the values interpolated between the steps around it, and keep the default 150 ms: the marks glide without stopping at each step, and Pause leaves them between steps (interaction.md section 10). For a live feed, whose next value is not known yet, ease linear into each new reading over a little more than one interval (ease: "linear", 1.5 intervals), or the marks stop between readings. For a slider or a drag keep the default 150 ms. Round the numbers you print while they move. The race and live recipes show all of it. Data that changes now and then (a click that switches years) keeps the default CSS version.transition on a block itself (.bar { transition: ... }): rhp moves blocks with its own transitions and yours would replace them, so the block jumps.The full list, with the mistake and the fix for each, is pitfalls.md.
Read the ones the chart needs; each is self-contained. On the sketch path, read only what the request needs, at the step that needs it (the table after this list).
recipes/*.html: the tested pages listed in step 3, for technique.On the sketch path:
| When | Read |
|---|---|
| every chart | this file, and the closest recipe up to its download block (a second recipe only for a part the first lacks) |
| a poster, not a plain chart | design.md sections 2, 4 and 5, and forms.md "Start from the subject's own form" |
| no recipe has the slat | forms.md "The compositions rhp charts are made of" |
| a prop the recipe does not use | api.md: grep -n the prop, and the lines around it |
| package.json names a framework (step 2) | environments.md: sections 2 and 6 (4 and 5 for Solid), the framework's own section, 13 and 14 |
| the chart goes into an app with a look of its own | design.md section 8 |
| the user gave colors, fonts, a brand, a publication or "dark" | design.md section 9 |
| "plain", "minimal", "no poster" | design.md section 9 "A plain or minimal chart" only |
| an interaction the recipe does not have | interaction.md: that interaction's section, and section 11 |
| play, a race, live data, an animated refresh, a slider that drives the data | interaction.md section 10, the race or live recipe, and api.md section 12 when unsure |
| hundreds of marks, or a slow chart | performance.md; for a bulk scatter, api.md "ManyDots" |
| a layout problem at 390px or 320px the checker reports | design.md section 6 |
| a checker finding comes back after one fix | the section its See line names |
| a look written out in full, as an example | looks.md |
Live gallery and docs: https://rhp.vercel.app
recipes/area.html (opens in a new tab)recipes/bar.html (opens in a new tab)recipes/box-plot.html (opens in a new tab)recipes/bubble.html (opens in a new tab)recipes/bullet.html (opens in a new tab)recipes/candlestick.html (opens in a new tab)recipes/column.html (opens in a new tab)recipes/dial.html (opens in a new tab)recipes/diverging-bars.html (opens in a new tab)recipes/donut.html (opens in a new tab)recipes/dumbbell.html (opens in a new tab)recipes/gantt.html (opens in a new tab)recipes/grouped-bars.html (opens in a new tab)recipes/heatmap.html (opens in a new tab)recipes/histogram.html (opens in a new tab)recipes/line.html (opens in a new tab)recipes/live.html (opens in a new tab)recipes/log-line.html (opens in a new tab)recipes/lollipop.html (opens in a new tab)recipes/multi-line.html (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub bezda-team/rhp --plugin rhpOther plugins' skills for the same job