Skip to content

Best way to to have an input indicate it is a dollar amount? #953

Answered by katiegeorge
tomvonheill asked this question in Q&A
Discussion options

You must be logged in to vote

Good question! There are a couple different ways you could do this that would all be good industry practice, so it's up to you which one you ultimately end up using.

  1. Add an indicator directly to the field label
  1. Add an indicator inside the constraint text.
  1. Add an indicator inline, as a prefix or suffix.

One small aspect to keep in mind with adding a prefix here is that if you have several fields lined up vertically, the alignment could look off.

Remember to add type="number" to the Input as an added affordance so that the user can't accidentally type a letter value!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by katiegeorge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants