Skip to content

Use in-track sliders for customization tokens - #19

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

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

Conversation

@AnaKissi05

@AnaKissi05 AnaKissi05 commented Nov 18, 2026 •

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 18, 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.

@AnaKissi05
AnaKissi05 force-pushed the t3/replace-docs-customization-sliders-with-diakit branch from f722079 to f8a349c Compare November 18, 2026 23:58
@AnaKissi05 AnaKissi05 changed the title Replace customization token sliders with DialKit controls Use in-track sliders for customization tokens Nov 18, 2026
@AnaKissi05 AnaKissi05 closed this Nov 19, 2026
@AnaKissi05
AnaKissi05 deleted the t3/replace-docs-customization-sliders-with-diakit branch November 19, 2026 00:02
@AnaKissi05

Copy link
Copy Markdown
Author

Branch renamed to t3/replace-docs-customization-sliders; the change continues in #20.

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