Dark mode: disabled input contrast #2547
-
Hey folks, I got some feedback from one of our users about the disabled input using dark mode: https://paste.twilio.design/components/input/#disabled-input
I'll share the screenshot in Slack. I tend to agree with them, it does seem hard to read. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @andoyle, If users are meant to read but not interact with an input, we generally advise not using the disabled prop because disabled inputs are meant to be low contrast. If they are higher contrast, people believe they can interact with them or that they are submitted with the form. Instead, you could use the readOnly prop which maintains high contrast but prevents users from typing or using Text or Paragraph component to just display the field label and content as normal text. We have a note about this on the Input docs: https://paste.twilio.design/components/input/#disabled-input. Please let us know if you have more questions! |
Beta Was this translation helpful? Give feedback.
-
Thanks @shleewhite Yeah, we generally display the field text as normal so I'll look at this use case again. Understand not wanting users to think they can interact with the disabled field. Just think in the dark mode, it's much harder to read than light mode. https://paste.twilio.design/components/input/#read-only-input would make me think I can interact with it. Wonder if there's been any feedback on that before? |
Beta Was this translation helpful? Give feedback.
Hi @andoyle,
If users are meant to read but not interact with an input, we generally advise not using the disabled prop because disabled inputs are meant to be low contrast. If they are higher contrast, people believe they can interact with them or that they are submitted with the form.
Instead, you could use the readOnly prop which maintains high contrast but prevents users from typing or using Text or Paragraph component to just display the field label and content as normal text. We have a note about this on the Input docs: https://paste.twilio.design/components/input/#disabled-input.
Please let us know if you have more questions!