Apple Select
An iOS-style text highlight with a translucent band and a lollipop handle at each end. The span is fixed by the author rather than dragged. It's a presentational highlight, not a draggable control, so it always reads the way you set it.
Installation
npx stepwise-ui add apple-select
Default
Pass the highlighted range as [start, end] character offsets. The band and handles get a little edge padding so they never sit on the glyphs.
Accents
The handles and highlight both follow accent - one of the bundled system tints or any hex value. Pick one with the ColorSwatch below.
Props
PropTypeDescription
textstringThe full text.
selection[number, number]The highlighted range as [start, end] offsets. Defaults to a word mid-text.
accentstringHandle + highlight colour. Default iOS blue.
edgePaddingnumberBreathing room (px) on each edge of the highlight. Default 3.