Skip to content
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

[carbon-react] Input className prop inconsistencies #5853

Closed
2 tasks done
Tracked by #9356 ...
janhassel opened this issue Apr 14, 2020 · 5 comments · Fixed by #9491
Closed
2 tasks done
Tracked by #9356 ...

[carbon-react] Input className prop inconsistencies #5853

janhassel opened this issue Apr 14, 2020 · 5 comments · Fixed by #9491
Labels
package: react carbon-components-react type: enhancement 💡 type: question ❓ version: 11 Issues pertaining to Carbon v11

Comments

@janhassel
Copy link
Member

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Summary

The elements which receive extra classnames one can provide to carbon components vary for the different inputs. This makes it really hard to apply some custom styling to individual input components consistently.

  • For text inputs and textareas, the className gets added to the actual input (or textarea) element
  • In number inputs and the select component, it is added to the outer-most element (.bx--number / .bx--select), where .bx--form-requirement is a child.
  • For Dropdown, ComboBox and MultiSelect the className is added to a wrapper element adjacent to .bx--form-requirement.

Is it planned to make this behaviour consistent and therefore more predictable in v11?

@emyarod
Copy link
Member

emyarod commented Apr 14, 2020

yes this is on our radar (related #5208 #4356 (comment) #4321 #2529)

@janhassel
Copy link
Member Author

Thank you for the references, @emyarod!

Is there already a rough timeline of when v11 will be released? I'm not looking for a specific date but something like this year / next year / beyond that, would already help.

@emyarod
Copy link
Member

emyarod commented Apr 14, 2020

@janhassel nothing is finalized at the moment but I would say at the very least in 6 months or further down the road

@joshblack joshblack added version: 11 Issues pertaining to Carbon v11 package: react carbon-components-react type: enhancement 💡 labels Oct 29, 2020
@joshblack joshblack mentioned this issue Mar 3, 2021
@vpicone
Copy link
Contributor

vpicone commented Jun 4, 2021

We should compare and normalize all the props between inputs as part of this effort. For example, titleText (Dropdown) and labelText (TextInput).

@vpicone
Copy link
Contributor

vpicone commented Jun 4, 2021

If we want to broaden the scope to include events, that might be helpful as well (for ex. should Dropdown pass an event like the other form inputs do)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: react carbon-components-react type: enhancement 💡 type: question ❓ version: 11 Issues pertaining to Carbon v11
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants