diff --git a/docs/data/base/components/button/UnstyledButtonCustom.js b/docs/data/base/components/button/UnstyledButtonCustom.js index ec343d488f0ff3..629ed5a0f2d9f2 100644 --- a/docs/data/base/components/button/UnstyledButtonCustom.js +++ b/docs/data/base/components/button/UnstyledButtonCustom.js @@ -22,7 +22,7 @@ ButtonRoot.propTypes = { }; const SvgButton = React.forwardRef(function SvgButton(props, ref) { - return ``` -### Slot props +### Custom structure -:::info -The following props are available on all non-utility Base components. -See [Usage](/base/getting-started/usage/) for full details. -::: - -Use the `component` prop to override the root slot with a custom element: +Use the `slots.root` prop to override the root slot with a custom element: ```jsx -; + return ; } diff --git a/docs/data/base/guides/overriding-component-structure/OverridingRootSlot.tsx b/docs/data/base/guides/overriding-component-structure/OverridingRootSlot.tsx index c3d68ca7a78238..bd3fe646922256 100644 --- a/docs/data/base/guides/overriding-component-structure/OverridingRootSlot.tsx +++ b/docs/data/base/guides/overriding-component-structure/OverridingRootSlot.tsx @@ -2,5 +2,5 @@ import * as React from 'react'; import Button from '@mui/base/Button'; export default function DivButton() { - return ; + return ; } diff --git a/docs/data/base/guides/overriding-component-structure/OverridingRootSlot.tsx.preview b/docs/data/base/guides/overriding-component-structure/OverridingRootSlot.tsx.preview index 1a3d44bd97a2fa..d8e8070585ac6a 100644 --- a/docs/data/base/guides/overriding-component-structure/OverridingRootSlot.tsx.preview +++ b/docs/data/base/guides/overriding-component-structure/OverridingRootSlot.tsx.preview @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/data/base/guides/overriding-component-structure/overriding-component-structure.md b/docs/data/base/guides/overriding-component-structure/overriding-component-structure.md index b66a5d9097831c..5916e885da5b0a 100644 --- a/docs/data/base/guides/overriding-component-structure/overriding-component-structure.md +++ b/docs/data/base/guides/overriding-component-structure/overriding-component-structure.md @@ -13,12 +13,9 @@ Slots are most commonly filled by HTML tags, but may also be filled by React com All components contain a root slot that defines their primary node in the DOM tree; more complex components also contain additional interior slots named after the elements they represent. -All _non-utility_ Base UI components accept two props for overriding their rendered HTML structure: +All _non-utility_ Base UI components accept [the `slots` prop](#the-slots-prop) for overriding their rendered HTML structure. -- `component`—to override the root slot -- `slots`—to override any interior slots (when present) as well as the root - -Additionally, you can pass custom props to interior slots using `slotProps`. +Additionally, you can pass custom props to [interior slots](#interior-slots) using `slotProps`. ## The root slot @@ -26,19 +23,7 @@ The root slot represents the component's outermost element. For simpler components, the root slot is often filled by the native HTML element that the component is intended to replace. For example, the [Button's](/base/react-button/) root slot is a `