# Port @kuhyx/web-ui from React to Astro + vanilla TS ## what kuhy chose one framework for every web UI: Astro, with no React islands. This package is the first blocker. `RangeSlider` is its only React export. It becomes `RangeSlider.astro` plus a `` custom element. The pure-TS helpers and the CSS stay as they are. Every repo's `TODO-astro-migration.md` waits for the tag this produces. ## steps 1. Keep these as they are: `quantile.ts` (`nth`, `clamp01`, `quantileValue`, `valueQuantile`, `fractionFromPointer`), `stepped-value.ts` (`keyTarget`, `steppedValue`), `text.ts` (`fuzzyMatch`), `tokens.css`, `range-slider.css`. 2. Write `src/range-slider-element.ts`, a `RangeSliderElement extends HTMLElement` registered as `range-slider`. Inputs: a `values` property (number[]), `lo` and `hi` attributes, a `label` attribute, and a `format` property (a function). Output: a bubbling `change` CustomEvent with `{ lo, hi }`. Keep the current DOM: two `