Skip to content

[button][button base] Document type attribute#48146

Open
mj12albert wants to merge 3 commits intomui:masterfrom
mj12albert:button-base-type
Open

[button][button base] Document type attribute#48146
mj12albert wants to merge 3 commits intomui:masterfrom
mj12albert:button-base-type

Conversation

@mj12albert
Copy link
Copy Markdown
Member

@mj12albert mj12albert commented Mar 30, 2026

Closes #21924

Follow up to #47989

string seems the best considering we need to account for:

render(<ButtonBase component="a" href="some-recording.ogg" download type="audio/ogg" />);

@mj12albert mj12albert added docs Improvements or additions to the documentation. scope: button Changes related to the button. component: ButtonBase The React component. labels Mar 30, 2026
@mui-bot
Copy link
Copy Markdown

mui-bot commented Mar 30, 2026

Netlify deploy preview

https://deploy-preview-48146--material-ui.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against b74e7a1

@mj12albert mj12albert force-pushed the button-base-type branch 3 times, most recently from 070d14b to 3c06809 Compare March 30, 2026 12:04
@mj12albert mj12albert marked this pull request as ready for review March 30, 2026 13:29
@zannager zannager requested a review from silviuaavram March 31, 2026 15:31
/**
* @ignore
*/
type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this considered a breaking change? probably not since we are expanding the allowed values.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah widening the type is ok ~

*/
touchRippleRef?: React.Ref<TouchRippleActions> | undefined;
/**
* The [type](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#type) attribute applied to the `button` element.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we expect the ButtonBase to also be a non-native button, maybe we need to change the documentation to reflect that.

Copy link
Copy Markdown
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as Silviu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: ButtonBase The React component. docs Improvements or additions to the documentation. scope: button Changes related to the button.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Button] Is the 'type' prop really removed from ButtonBase?

5 participants