--- ## Sparkline **Stability:** beta — the API shape is settled and documented; behaviour-level fixes may still land as breaking changes in a minor. Tiny inline trend line — no axes, no labels — sized to flow in table cells, cards, or running text. Zero-dependency SVG, optional area fill and end-point dot. Fixed `width`/`height` by default, or set `fluid` to fill the container width. Aria-hidden by default with an optional `ariaLabel`. **Import:** `import { Sparkline } from '@urbicon-ui/blocks';` ### Examples ```svelte ``` ### Variants - fluid: false, true (default: false) ### Api | Prop | Type | Required | Default | Description | | --- | --- | :---: | --- | --- | | data | `number[]` | yes | | Sequence of values plotted left → right. | | ...HTMLAttributes | `HTMLAttributes` | no | | HTML attributes (excluding: 'children') | | area | `boolean` | no | false | Fill the area under the line. | | ariaLabel | `string` | no | | Accessible label. A plain `aria-label` names the sparkline too, and this prop wins over it; `aria-labelledby` points it at a visible caption. With none of the three it is aria-hidden. | | class | `string` | no | | Extra classes merged onto the wrapper. In the same Tailwind bucket `class` wins over the `slotClasses` entry for the element it lands on. Presets and provider defaults sit below both. | | color | `string` | no | 'var(--color-chart-1)' | Line + fill color. | | fluid | `boolean` | no | false | Fill the container width instead of a fixed pixel size. Drops the svg's `width`/`height` attributes (they still set the `viewBox` aspect ratio) so it scales to its container; strokes stay crisp via `vector-effect="non-scaling-stroke"`. | | height | `number` | no | 24 | Height in px. | | preset | `string` | no | | Apply a named preset registered on ``. | | showEndPoint | `boolean` | no | false | Mark the last value with a single dot; style it via `slotClasses.endPoint`. | | slotClasses | `SparklineSlotClasses` | no | | Per-slot class overrides. `mark` is the trend line, `area` the band under it, `endPoint` the one dot at the last value — the charts' per-datum `point` has no counterpart here. In the same Tailwind bucket `class` wins over the `slotClasses` entry for the element it lands on. Presets and provider defaults sit below both. | | strokeWidth | `number` | no | 1.5 | Stroke width in px. | | unstyled | `boolean` | no | | Remove all default classes. | | width | `number` | no | 96 | Width in px. | Inherited from: - Omit, 'children'> (omit-pattern) ### Types ```ts type SparklineSlotClasses = Partial> ``` ### Slots (slotClasses keys) `root`, `svg`, `mark`, `area`, `endPoint`