claus / react-dat-gui

React dat.GUI
MIT License
292 stars 56 forks source link

Custom labels for DatSelect items #31

Closed rin3s closed 5 years ago

rin3s commented 5 years ago

As a user, it would be nice if you could use custom item names which are displayed in the DatSelect dropdown. Currently, you're forced to display the options as they are, e.g. options={[ 0, 1, 2, 3 ]}, but these don't necessarily tell the user everything.

dat.GUI uses this approach { Stopped: 0, Slow: 0.1, Fast: 5 }, as seen in their examples: http://workshop.chromeexperiments.com/examples/gui/#2--Constraining-Input

I would be happy with just an array of labels, which could be used with matching index.