-
-
Notifications
You must be signed in to change notification settings - Fork 302
Description
Feature request
Summary
In the Select.Value component, I would like a way to change my className or render values based on the current value of the component. Now, the only way to do that would be to make it a controlled component because SelectValue.State has nothing in it.
Examples in other libraries
The concept of passing state to class/render callbacks is unique to Base UI as far as I know. SliderRoot.State and NumberFieldRoot.State are examples of components that have value in the state that's provided to callbacks.
Motivation
We would like to have the text of our Value component be a "dim" color if it is displaying placeholder text, but a normal color when a value is selected.
I also expect there will be a need for the Value to display more than just the text content of the selected Item (for example, showing an icon)
Metadata
Metadata
Assignees
Labels
Projects
Status