Skip to content

Improve Button documentation examples #47266

@dheena017

Description

@dheena017

The current Button documentation provides basic usage, but some common scenarios are missing or unclear. For example, developers may not easily find examples of using different variants, sizes, or combining buttons with icons. This can make it harder for new users to understand the full flexibility of the Button component.

Why it matters:
Clear and comprehensive documentation helps developers quickly implement UI components without confusion. Adding more examples will reduce repetitive questions, improve onboarding, and make the docs more user‑friendly.

Steps / Examples

  1. No example showing how to use variant="outlined" vs variant="contained".
  2. Limited examples of size="small", size="large".
  3. No clear example of combining a Button with an icon (e.g., startIcon or endIcon).

Proposed Solution:

Add missing code examples to the Button documentation that demonstrate:

  1. Different variants (contained, outlined, text).
  2. Different sizes (small, medium, large).
  3. Usage with icons (startIcon, endIcon).
  4. A short section on accessibility best practices for buttons.

Search keywords:

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: buttonChanges related to the button.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions