New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for label and help text to color picker #1552
Comments
Hmmm...it seems to work for me. I think the problem is that your codepen has malformed html. (no closing <sl-color-picker value="#4a90e2">
<label slot="label"> Color </label>
- </span>
+ </sl-color-picker> Let me know if that works! |
This was a poor decision I made early on to not show the label. I would almost classify it as a bug. Color pickers should be able to be displayed both with and without a visual label. We can leave this open as a TODO for this feature. |
@claviska I'm thinking label hidden by default for a patch release, and label shown by default in a 3.0 release? Sound reasonable? |
Makes sense. Let's open an issue for this using the 3.0 milestone so we don't forget to update the default :) |
I am facing the same issue, and properly closing all html tags doesn't fix it. |
@semiaddict This is the correct behavior. The label doesn't currently show as a visible label like form controls. This issue is now a TODO to fix that in 3.0. |
Thank you @claviska. Then maybe the docs deserve a slight modification as it seems to indicate that using a slot instead of the attribute will show the label:
|
Describe the bug
Docs state label will be displayed if in a slot. But it's not
Demo
https://codepen.io/haikyuu/pen/zYyKBzR?editors=1000
The text was updated successfully, but these errors were encountered: