leva icon indicating copy to clipboard operation
leva copied to clipboard

Feature request: Allow label for `options` bindings?

Open danfuzz opened this issue 4 months ago • 2 comments

Rather than always have to see the actual values for a multi-value selection, it'd be great if one could specify per-value labels. Maybe along the lines of this:

const colorPicker = useControls({
  options: [
    { value: '#f00', label: 'red' },
    { value: '#0f0', label: 'green' },
    { value: '#00f', label: 'blue' }
  ],
  value: '#f00'
});

In my current use case I actually want the values to be JavaScript function objects, and I want to make human-readable labels for them.

danfuzz avatar Aug 08 '25 17:08 danfuzz

Want to make a PR @danfuzz ?

gsimone avatar Oct 31 '25 17:10 gsimone

@gsimone Thanks for the vote of confidence! For context, I found my way here as a user of a downstream tool (Replicad), and I'm mostly a low-ish-level back-end developer. I took a quick look at the source, and unfortunately I'm not confident I could get this done in a timely fashion given my other commitments.

danfuzz avatar Oct 31 '25 18:10 danfuzz