[carbon-react] Input className prop inconsistencies
See original GitHub issueWhat 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
(ortextarea
) 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?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Guide - Carbon Design System
This guide helps you update your project to Carbon v11. It is broken into sections based on packages that you are using in...
Read more >Warning: Prop `className` did not match. when using styled ...
It looks like the className prop that is being set on your component is not the same when the component is rendered on...
Read more >How to Create and Validate Forms in React using Formik and ...
In this tutorial, you'll learn how creating and validating forms can be simpler in React using Formik and Yup.
Read more >Carbon v11 Beta 2. The second public beta for v11 - Medium
The className prop is available in almost every component that we ship today. ... Icon components are now available in @carbon/react.
Read more >Building a design system with Radix - LogRocket Blog
The guide shows how to use Radix to develop a basic React component ... Root className="rootSlider" value={props.value}> <SliderPrimitive.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@janhassel nothing is finalized at the moment but I would say at the very least in 6 months or further down the road
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)