-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
The new DCC components in Dash 4 are fantastic! After taking the pre-release for a spin, I have a few suggestions:
Dropdown
- Add a prop so it's possible change labels such as Search, Selected, Select All, Deselect All
- Enable focus when clicking on a label with
htmlFor
linked to the dropdown - Make sure long labels in the
options
are visible on small screens
Input
- Add style for focus state and disabled state.
Slider
- The input fields is a nice feature, but it would be helpful to make it easy to style. For example by default it only displays 7 digits, which could be misleading when dealing with large numbers. Perhaps add props
input_style
andinput_className
- When using the
className
prop, it only applies the style to the slider portion, rather than the whole component. For example, if you add a top margin, then the input boxes are not aligned with the slider.
Consistency
Consistency in design helps components look cohesive, especially in forms and control panels. I appreciate that the inputs now have consistent colors and heights. Are there any plans to make the Inputs and Dropdowns more aligned as well?
- It might be more user-friendly if Inputs matched the Dropdown by taking up the full container width, rather than a fixed width of 170px. It would make it easier to add labels too. Currently the labels are in-line with the Inputs and for the Dropdown, they are stacked.
- The Dropdown has a margin, so if you place an Input and a Dropdown side-by-side they are not aligned.
- The Dropdown has a nice disabled state style. The Input doesn't change visibly except the cursor
- Inputs inherit their background via
var(--Dash-Fill-Inverse-Strong)
, but Dropdowns simply inherit from the container without explicitly setting the same variable. This leads to differences in appearance depending on the container background.
CSS
- Would it be possible to use CSS variables for the box-shadow color? This would make it easier to adjust for dark themes.