Skip to content

[docs] Documentation for passing a function in slotProps seems to be missing #48573

Description

@isti115

Search keywords

slotProps, function, ownerState

Related page

https://mui.com/material-ui/customization/overriding-component-structure/#the-slotprops-prop

Kind of issue

Missing information

Issue description

I saw some code passing a { paper: (ownerState) => ... } function as a prop to a Popover, which surprised me. Looking at the Popover API docs page I can see that it specifies slotProps as { ..., paper?: func | object, ... }, but the relevant docs page about "Overriding component structure" only gives examples for the object variant and does not mention the ability to pass a function at all, even though it's clearly present in the type definition.

Context

I am trying to find official documentation on passing functions in slotProps, or at least a mention that states clearly whether it's part of the public API, meant for internal use, deprecated, or not recommended for any other reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to the documentation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions