[InputLabel] does not accept prop "size" in TypeScript
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
Current behavior 😯
I add the prop size="small" to an InputLabel component, and TypeScript complains:

Expected behavior 🤔
TypeScript should accept "size" as a prop, since the prop does what it is supposed to. It is simply not added to the typing.
Steps to reproduce 🕹
Steps:
- Add an
<InputLabel>component to the app. - Add
size="small"as a prop to the component. - The component renders as expected.
- TypeScript is not happy.
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
System:
OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 28.06 GB / 31.23 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 16.13.1 - /usr/local/bin/node
npm: 8.1.2 - /usr/local/bin/npm
Managers:
Apt: 2.0.6 - /usr/bin/apt
Utilities:
Make: 4.2.1 - /usr/bin/make
GCC: 9.3.0 - /usr/bin/gcc
Git: 2.25.1 - /usr/bin/git
Virtualization:
Docker: 20.10.9 - /usr/bin/docker
IDEs:
Nano: 4.8 - /usr/bin/nano
Vim: 8.1 - /usr/bin/vim
Languages:
Bash: 5.0.17 - /usr/bin/bash
Perl: 5.30.0 - /usr/bin/perl
Python: 2.7.18 - /usr/bin/python
Python3: 3.8.10 - /usr/bin/python3
Browsers:
Chrome: 98.0
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 at the InputLabel component's TypeScript prop definition and inspect how its existing size behavior is represented. Confirm that size="small" is accepted by TypeScript while preserving the current rendered behavior, then run the relevant existing InputLabel checks or tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100