Skip to content

Use in-track sliders for customization tokens - #20

Open
AnaKissi05 wants to merge 1 commit into
pasqualevitiello:mainfrom
AnaKissi05:t3/replace-docs-customization-sliders
Open

AnaKissi05 wants to merge 1 commit into
pasqualevitiello:mainfrom
AnaKissi05:t3/replace-docs-customization-sliders

Conversation

@AnaKissi05

Copy link
Copy Markdown

The token controls in /docs/customization now use a compact in-track slider: the token name, live value, fill, and handle share one 36px bar. The old control put the label above a thin rail and the value at the far right.

Before After
Before: 13 token sliders with labels above thin rails and values at the right edge After: 13 in-track token sliders with labels and values inside 36px bars

Why it is quicker to use

  • One target. Drag or click anywhere on the track. A click jumps and snaps; a drag updates continuously. The 36px bar is much harder to miss than a thin rail.
  • The value is editable in place. Hover the value for a moment, click it, and type an exact number. Enter on the handle opens the same editor, so keyboard users do not need the hover path.
  • The range is visible on demand. Hash marks appear on hover, so the available steps are apparent without adding permanent chrome.
  • The name and number stay together. Both live inside the control, so a narrow column cannot push the value onto a different row from the token it edits.
  • The typed-value path is announced. The intro now reads “Drag a slider, or hover a value and click to type an exact number,” so the second interaction is discoverable at first read.

The same component handles light, dark, and 390px layouts. I checked drag, click-to-snap, typed commit, keyboard step, Reset, CSS output, and the MEC-05 preview stroke in the browser.

Change shape

 <PlotterTokenGuide>
   <Field> (Ink input)
   <fieldset> Stroke widths
-    <FieldLabel>Primary stroke</FieldLabel>
-    <Slider><SliderValue /></Slider>
+    <Slider label="Primary stroke" value={…} max={…} step={…} />
     <FieldDescription>Sits below the track</FieldDescription>
   <fieldset> Opacity
  • components/ui/slider.tsx is replaced by the in-track implementation: label and value in the bar, hover handle, hash marks, click snapping, hover-to-edit, Enter-to-edit, and large steps.
  • components/plotter/plotter-token-guide.tsx passes the existing token labels into the slider and keeps the descriptions below each control.
  • ATTRIBUTION.md records the component’s MIT attribution.

@vercel

vercel Bot commented Nov 19, 2026

Copy link
Copy Markdown

@AnaKissi05 is attempting to deploy a commit to the Cruip Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant