Skip to content

Conversation

@dheena017
Copy link

This PR enhances the Button component documentation by adding missing examples and accessibility guidance.

Changes introduced:

  • Added examples for all variants (contained, outlined, text).

  • Included size variations (small, medium, large).

  • Demonstrated usage with icons (startIcon, endIcon).

  • Added disabled state example.

  • Expanded color coverage (primary, secondary, success, error).

  • Added accessibility tips for icon-only buttons (aria-label, Tooltip usage, focus order).

  • Provided a ready-to-use JSX snippet for quick copy/paste.

Motivation:

The current Button docs lacked comprehensive examples for common use cases. These additions improve clarity, help developers quickly understand usage patterns, and promote accessibility best practices.

Preview:

Netlify deploy preview will show updated examples for review.

Linked Issue:

Closes #47266

@mui-bot
Copy link

mui-bot commented Nov 15, 2025

Netlify deploy preview

https://deploy-preview-47267--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 87bc0ab

@mj12albert mj12albert closed this Nov 16, 2025
@zannager zannager added docs Improvements or additions to the documentation. scope: button Changes related to the button. labels Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Improve Button documentation examples

4 participants