-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
[meter] Create Meter
component
#743
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy preview |
d8734f9
to
e927c2d
Compare
e7386f8
to
395484a
Compare
c63f06d
to
5bbda04
Compare
@colmtuite I've added a demo here with some controls to tweak the The combination of A The NOTE: The corresponding |
307db4c
to
cd70734
Compare
6c377dc
to
34bb2bd
Compare
78622dc
to
016893e
Compare
016893e
to
31833d5
Compare
Closes: #662
Docs: https://deploy-preview-743--base-ui.netlify.app/components/react-meter/
Demo: https://deploy-preview-743--base-ui.netlify.app/experiments/meter
Summary
meter
element due to cross-browser inconsistencies, attributes likeoptimum
actually make the VO experience worse 1, styling is also annoying 2Progress
since they are closely relatedhigh
/low
props can be used to set the boundaries between the 3 segments, and sets adata-segment
attribute indicating which segment the current value falls in. Due to inconsistent and incorrect browser implementations of this feature, we assume the prop value is inclusive 3optimum
prop, in combination with segmenting, indicates which segment of the range is "preferred". If the current value is in the preferred segment, a[data-optimum]
attribute is setFootnotes
https://www.htmhell.dev/adventcalendar/2022/5/ ↩
https://scottaohara.github.io/a11y_styled_form_controls/src/meter/ ↩
https://www.ctrl.blog/entry/html-meter-segment-boundaries.html ↩