[TextField] Make fullWidth the default on form element?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
Coming from https://github.com/marmelab/react-admin/issues/8796, it seems it's common for UI libraries to set fullWidth={true} as the default behavior (see benchmark). Maybe we should do the same for MUI's open-source projects.
https://stackblitz.com/edit/react-ts-fbuqu9?file=App.tsx
An alternative option would be to set a consistent min-width CSS property on all the inputs. However, it would be surprising to override, so unlikely to fly.
Examples 🌈
- https://getbootstrap.com/docs/5.3/forms/form-control/
- https://ant.design/components/input
- https://chakra-ui.com/docs/components/input/usage
- https://sancho-ui.com/components/form/#input
- https://baseweb.design/components/input/
- https://seek-oss.github.io/braid-design-system/components/TextField
- https://balance.reckon.com/package/text-input
- https://tailwindui.com/components/application-ui/forms/input-groups
Motivation 🔦
In most of the time, as a developer, you need to set a width to an input element. Sometimes, it's width: 100%, sometimes, it's not, but it's almost never the default value. So maybe we should make this breaking change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked React TypeScript StackBlitz reproduction and the TextField behavior described in the issue. No repository file or test is identified; completion would require an agreed direction for the proposed breaking change and a defined implementation and test scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100