Skip to content

Conversation

@Ad1tya-007
Copy link
Contributor

@Ad1tya-007 Ad1tya-007 commented Nov 14, 2025

Closes #47260

Fix: Document correct default values for AppBar elevation and square props

The problem

AppBar inherits elevation and square from Paper, but uses different defaults:

  • Paper defaults: elevation: 1, square: false
  • AppBar defaults: elevation: 4, square: true

Because these weren’t documented in AppBar’s TypeScript definitions, IntelliSense showed Paper’s defaults instead of AppBar’s, which was confusing.

The solution

Added elevation and square to AppBar’s TypeScript definitions with the correct defaults:

  • elevation: default 4 (was showing 1)
  • square: default true (was showing false)

What changed

  1. Updated AppBar.d.ts to document these props with correct defaults
  2. Excluded them from Paper’s type map to avoid conflicts
  3. Regenerated PropTypes (automatic)

Result

  • IntelliSense shows the correct defaults
  • Documentation matches the implementation

I also ran pnpm proptypes and pnpm docs:api respectively to generate proptypes and the API docs

@mui-bot
Copy link

mui-bot commented Nov 14, 2025

Netlify deploy preview

https://deploy-preview-47261--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 ed832b3

@ZeeshanTamboli ZeeshanTamboli changed the title docs(AppBar): document correct default values for elevation and squar… [docs][appbar] Document correct default values for elevation and square props Nov 15, 2025
@ZeeshanTamboli ZeeshanTamboli added docs Improvements or additions to the documentation. scope: app bar Changes related to the app bar. labels Nov 15, 2025
Copy link
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.

Thanks.

@ZeeshanTamboli ZeeshanTamboli merged commit f1a709d into mui:master Nov 15, 2025
22 checks passed
@Ad1tya-007 Ad1tya-007 deleted the fix/appbar-document-default-props branch November 15, 2025 05:23
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: app bar Changes related to the app bar.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AppBar] Default elevation and square props are incorrectly documented

3 participants