` containing the other interior slots
+- `root`: an outer `
` containing the other interior slots
- `input`: an ` ` element
- `incrementButton`: a `` for increasing the value
- `decrementButton`: a `` for decreasing the value
@@ -98,12 +56,7 @@ The Base UI Number Input component consists of 4 slots:
```
-### Slot props
-
-:::info
-The following props are available on all non-utility Base components.
-See [Usage](/base-ui/getting-started/usage/) for full details.
-:::
+### Custom structure
Use the `slots` prop to override the root slot or any interior slots:
@@ -117,11 +70,16 @@ Use the `slots` prop to override the root slot or any interior slots:
/>
```
+:::info
+The `slots` prop is available on all non-utility Base components.
+See [Overriding component structure](/base-ui/guides/overriding-component-structure/) for full details.
+:::
+
Use the `slotProps` prop to pass custom props to internal slots.
The following code snippet:
-- applies a CSS class called `my-num-input` to the input slot,
-- and passes a `direction` prop to the `CustomButton` components in the increment and decrement button slots
+- applies a CSS class called `my-num-input` to the input slot
+- passes a `direction` prop to the `CustomButton` components in the increment and decrement button slots
```jsx
+
+// only accepts values between -10 and 10:
+
+
+// only accepts values greater than 0:
+
+
+```
+
+The demo below shows a Number Input with a an accepted range of 1 to 99:
+
+{{"demo": "QuantityInput", "defaultCodeOpen": false}}
+
+### Incremental steps
+
+Use the `step` prop to define the granularity of the change in value when incrementing or decrementing.
+For example, if `min={0}` and `step={2}`, valid values for the component would be 0, 2, 4, and on, since the value can only be changed in increments of 2.
+
+```jsx
+// valid values: 0, 2, 4, 6, 8...
+
+```
+
+:::warning
+Support for decimal values and step sizes isn't available yet, but you can upvote [this GitHub issue](https://github.com/mui/material-ui/issues/38518) to see it arrive sooner.
+:::
+
+When the input field is in focus, you can enter values that fall outside the valid range.
+The value will be clamped based on `min`, `max` and `step` once the input field is blurred.
+
+### Shift multiplier
+
+Holding down the
Shift key when interacting with the stepper buttons applies a multipler (default 10x) to the value change of each step.
+
+You can customize this behavior with the `shiftMultiplier` prop.
+In the following snippet, if
Shift is held when clicking the increment button, the value will change from 0, to 5, to 10, and on.
+
+```jsx
+
+```
diff --git a/docs/data/base/components/popper/popper.md b/docs/data/base/components/popper/popper.md
index 279b09652864cf..b4b73087f550af 100644
--- a/docs/data/base/components/popper/popper.md
+++ b/docs/data/base/components/popper/popper.md
@@ -31,27 +31,17 @@ Once the [Popup](/base-ui/react-popup/) is stable, we will deprecate and, later,
## Component
-### Usage
-
-After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this component using the following basic elements:
-
```jsx
import { Popper } from '@mui/base/Popper';
-
-export default function MyApp() {
- return
{/* the popper's content */} ;
-}
```
-### Basics
-
By default, the Popper is mounted to the DOM when its `open` prop is set to `true`, and removed from the DOM when `open` is `false`.
`anchorEl` is passed as the reference object to create a new `Popper.js` instance.
The children are placed in a [Portal](/base-ui/react-portal/) prepended to the body of the document to avoid rendering problems.
You can disable this behavior with `disablePortal` prop.
-The following demo shows how to create and style a basic popper.
+The following demo shows how to create and style a basic Popper.
Click **Toggle Popper** to see how it behaves:
{{"demo": "UnstyledPopperBasic", "defaultCodeOpen": true}}
@@ -65,7 +55,7 @@ If you need this behavior, you can use the [Click-Away Listener](/base-ui/react-
### Placement
-The popper's default placement is `bottom`.
+The Popper's default placement is `bottom`.
You can change it using the `placement` prop.
Try changing this value to `top` in the interactive demo below to see how it works:
@@ -73,10 +63,10 @@ Try changing this value to `top` in the interactive demo below to see how it wor
### Transitions
-You can animate the open and close states of the popper with a render prop child and a transition component, as long as the component meets these conditions:
+You can animate the open and close states of the Popper with a render prop child and a transition component, as long as the component meets these conditions:
-- Is a direct child descendant of the popper
+- Is a direct child descendant of the Popper
- Calls the `onEnter` callback prop when the enter transition starts
- Calls the `onExited` callback prop when the exit transition is completed
-These two callbacks allow the popper to unmount the child content when closed and fully transitioned.
+These two callbacks allow the Popper to unmount the child content when closed and fully transitioned.
diff --git a/docs/data/base/components/popup/popup.md b/docs/data/base/components/popup/popup.md
index e70be61c6cc07c..9b4845e0fa18db 100644
--- a/docs/data/base/components/popup/popup.md
+++ b/docs/data/base/components/popup/popup.md
@@ -27,20 +27,10 @@ The Popup component, once stable, is intended to replace the [Popper](/base-ui/r
## Component
-### Usage
-
-After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this component using the following basic elements:
-
```jsx
import { Unstable_Popup as Popup } from '@mui/base/Unstable_Popup';
-
-export default function MyApp() {
- return
{/* the popup's content */} ;
-}
```
-### Basics
-
By default, the Popup is mounted to the DOM when its `open` prop is set to `true`, and removed from the DOM when `open` is `false`.
`anchor` is passed as the reference element to Floating UI's [`useFloating`](https://floating-ui.com/docs/react#positioning) hook.
@@ -48,13 +38,13 @@ The children are placed in a [Portal](/base-ui/react-portal/) prepended to the b
You can disable this behavior with `disablePortal` prop.
See how it's done in the [Disable portal](#disable-portal) section below.
-The following demo shows how to create and style a basic popup.
+The following demo shows how to create and style a basic Popup.
Click **Toggle Popup** to see how it behaves:
{{"demo": "SimplePopup.js", "defaultCodeOpen": true}}
:::warning
-By default, clicking outside the popup does not hide it.
+By default, clicking outside the Popup doesn't hide it.
If you need this behavior, you can use the [Click-Away Listener](/base-ui/react-click-away-listener/) component.
:::
diff --git a/docs/data/base/components/portal/portal.md b/docs/data/base/components/portal/portal.md
index e669fa372121e1..0b562e5f4d1457 100644
--- a/docs/data/base/components/portal/portal.md
+++ b/docs/data/base/components/portal/portal.md
@@ -22,22 +22,10 @@ The Portal component is used internally by the [Modal](/base-ui/react-modal/) an
## Component
-### Usage
-
-After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this component using the following basic elements:
-
```jsx
import { Portal } from '@mui/base/Portal';
-
-export default function MyApp() {
- return (
-
{/* children to be rendered outside of the current DOM node */}
- );
-}
```
-### Basics
-
Normally, children of a component are rendered within that component's DOM tree.
But sometimes it's necessary to mount a child at a different location in the DOM.
diff --git a/docs/data/base/components/select/select.md b/docs/data/base/components/select/select.md
index 4054eadb82b1d6..bc5bc93cea020d 100644
--- a/docs/data/base/components/select/select.md
+++ b/docs/data/base/components/select/select.md
@@ -19,45 +19,23 @@ waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-sel
A select is a UI element that gives users a list of options to choose from.
-Base UI offers components to replace the native HTML `
` tag: Select.
-It also includes Option for creating the options on the list, and Option Group for grouping those options.
+Base UI's Select component replaces the native HTML `` tag.
+It also includes the Option component for creating the options in the list, and Option Group for grouping those options.
{{"demo": "UnstyledSelectIntroduction", "defaultCodeOpen": false, "bg": "gradient"}}
-### Features
-
-- 🦍 Can be used as a controlled or uncontrolled component
-- 🧬 Accepts custom elements and non-string values for options
-- 🗃️ Options can be grouped and nested
-
## Components
-### Usage
-
-After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this component collection using the following basic elements:
-
```jsx
import { Select } from '@mui/base/Select';
import { Option } from '@mui/base/Option';
-
-export default function MyApp() {
- return (
-
- Red
- Green
- Blue
-
- );
-}
```
-### Basics
-
-The following demo shows how to create and style a Select component.
+The following demo shows how to create and style a Select component with several Options:
{{"demo": "UnstyledSelectBasic", "defaultCodeOpen": false}}
-#### Form submission
+### Form submission
The value(s) chosen in the Select can be posted to a server using a standard HTML form.
When the `name` prop is set, the Select will render a hidden input with the selected value.
@@ -65,11 +43,9 @@ When the `name` prop is set, the Select will render a hidden input with the sele
{{"demo": "UnstyledSelectForm.js"}}
Note how the second Select in the demo above renders a hidden input with the name provided as a prop.
+You can customize the value of this hidden input—see the [Object values](#object-values) section for details.
-You can customize the value of this hidden input.
-See the [Object values](#object-values) section to learn how to do it.
-
-#### TypeScript caveat
+### TypeScript caveat
Select's props are generic.
Due to TypeScript limitations, this may cause unexpected behavior when wrapping the component in `forwardRef` (or other higher-order components).
@@ -91,17 +67,15 @@ const CustomSelect = React.forwardRef(function CustomSelect(
For the sake of brevity, the rest of the demos throughout this doc will not use `forwardRef`.
-### Multi-select
+### Multiple selections
-The Select component lets your users select multiple options from the list.
-In contrast to the single-selection mode, the options popup doesn't close after an item is selected, enabling users to continue choosing more options.
+Set the `multiple` prop to let your users select multiple options from the list.
+In contrast with single-selection mode, the options popup doesn't close after an item is selected, which enables users to continue choosing more options.
-Set the `multiple` prop to turn on the multi-selection mode.
+Note that in multiple selection mode, the `value` prop (and `defaultValue`) is an array.
{{"demo": "UnstyledSelectMultiple.js", "defaultCodeOpen": false}}
-Note that in the multiple selection mode, the `value` prop (and `defaultValue`) is an array.
-
### Controlled select
Select can be used as an uncontrolled or controlled component.
@@ -116,9 +90,9 @@ Learn more about controlled and uncontrolled components in the [React documentat
{{"demo": "UnstyledSelectControlled.js", "defaultCodeOpen": false}}
-To set the value of the controlled Select, use the `value` prop.
+Use the `value` prop to set the value of the controlled Select.
The uncontrolled component accepts the `defaultValue` that can be used to set the initial value.
-In any case, if you wish to deselect all values, pass `null` to the respective prop.
+To deselect all values, pass `null` to the respective prop.
:::warning
This pattern is where Base UI's Select differs from the equivalent [Material UI component](/material-ui/react-select/).
@@ -139,17 +113,21 @@ You can change this behavior with the help of the `getSerializedValue` prop.
### Grouping options
+```jsx
+import { OptionGroup } from '@mui/base/OptionGroup';
+```
+
Options can be grouped, similarly to how the native `` element works.
Unlike the native ``, groups can be nested.
-The following demo shows how to group options with the Option Group component:
+The following demo shows how to group Options with the Option Group component:
{{"demo": "UnstyledSelectGrouping.js", "defaultCodeOpen": false}}
### Anatomy
-The Select component is composed of a root `` along with a `` that houses a `
` within a Popper.
-Option renders as an ``:
+The Select component is composed of a root `` along with a `` that houses a `
` within a [Popper](/base-ui/react-popper/).
+Option renders as an ``, and Option Group renders a `` with an `` that represents its label.
```html
Open
@@ -190,9 +168,10 @@ To instead render the popup where the component is defined, override the `disabl
```
-#### Usage with TypeScript
+### Usage with TypeScript
-In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component. This way, you can safely provide the custom root's props directly on the component:
+In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component.
+This way, you can safely provide the custom root's props directly on the component:
```tsx
slots={{ root: CustomComponent }} customProp />
@@ -210,10 +189,10 @@ The same applies for props specific to custom primitive elements:
import { useSelect } from '@mui/base/useSelect';
```
-The `useSelect` hook lets you apply the functionality of a select to a fully custom component.
+The `useSelect` hook lets you apply the functionality of a Select to a fully custom component.
It returns props to be placed on the custom component, along with fields representing the component's internal state.
-Hooks _do not_ support [slot props](#slot-props), but they do support [customization props](#customization).
+Hooks _do not_ support [slot props](#custom-structure), but they do support [customization props](#customization).
:::info
Hooks give you the most room for customization, but require more work to implement.
@@ -224,16 +203,21 @@ You may not need to use hooks unless you find that you're limited by the customi
The following example shows a select built with a hook.
Note how this component does not include any built-in classes.
-The resulting HTML is much smaller compared to the unstyled component version, as the class names are not applied.
+The resulting HTML is much smaller compared with its prebuilt component counterpart, because the class names are not applied.
{{"demo": "UseSelect.js", "defaultCodeOpen": false}}
## Customization
+:::info
+The following features can be used with both components and hooks.
+For the sake of simplicity, demos and code snippets primarily feature components.
+:::
+
### Selected value appearance
You can customize the appearance of the selected value display by providing a function to the `renderValue` prop.
-The element returned by this function will be rendered inside the select's button.
+The element returned by this function will be rendered inside the Select's button.
{{"demo": "UnstyledSelectCustomRenderValue.js", "defaultCodeOpen": false}}
diff --git a/docs/data/base/components/slider/slider.md b/docs/data/base/components/slider/slider.md
index 26327d2fa7059f..de372799103529 100644
--- a/docs/data/base/components/slider/slider.md
+++ b/docs/data/base/components/slider/slider.md
@@ -26,8 +26,6 @@ Sliders are ideal for interface controls that benefit from a visual representati
## Component
-### Usage
-
```jsx
import { Slider } from '@mui/base/Slider';
```
@@ -105,9 +103,10 @@ The following code snippet applies a CSS class called `my-rail` to the rail slot
```
-#### Usage with TypeScript
+### Usage with TypeScript
-In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component. This way, you can safely provide the custom root's props directly on the component:
+In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component.
+This way, you can safely provide the custom root's props directly on the component:
```tsx
slots={{ root: CustomComponent }} customProp />
@@ -125,10 +124,10 @@ The same applies for props specific to custom primitive elements:
import { useSlider } from '@mui/base/useSlider';
```
-The `useSlider` hook lets you apply the functionality of a slider to a fully custom component.
+The `useSlider` hook lets you apply the functionality of a Slider to a fully custom component.
It returns props to be placed on the custom component, along with fields representing the component's internal state.
-Hooks _do not_ support [slot props](#slot-props), but they do support [customization props](#customization).
+Hooks _do not_ support [slot props](#custom-structure), but they do support [customization props](#customization).
:::info
Hooks give you the most room for customization, but require more work to implement.
@@ -143,16 +142,16 @@ You may not need to use hooks unless you find that you're limited by the customi
Slider components can be arranged vertically as well as horizontally.
-When vertical, you must set `orientation="vertical"` on the ` ` component so the user can navigate with the up and down arrow keys (rather than the default left-to-right behavior for horizontal sliders).
+When vertical, you must set `orientation="vertical"` on the Slider so the user can navigate with the up and down arrow keys (rather than the default left-to-right behavior for horizontal sliders).
{{"demo": "VerticalSlider.js"}}
### Discrete sliders
-The most basic slider is _continuous_, which means it does not have pre-defined (_discrete_) values for the user to select from.
+The most basic Slider is _continuous_, which means it does not have pre-defined (_discrete_) values for the user to select from.
This is suitable for situations in which an approximate value is good enough for the user, such as brightness or volume.
-But if your users need more precise options, you can create a discrete slider that snaps the thumb to pre-defined stops along the bar.
+But if your users need more precise options, you can create a discrete Slider that snaps the thumb to pre-defined stops along the bar.
To generate a mark for each stop, use `marks={true}`:
@@ -172,13 +171,14 @@ If the user should only be able to select from the values provided with the `mar
### Range slider
-To let users set the start and end of a range on a slider, provide an array of values to the `value` or `defaultValue` prop:
+To let users set the start and end of a range on a Slider, provide an array of values to the `value` or `defaultValue` prop:
{{"demo": "RangeSlider.js"}}
### Value label
-A label for the value can be rendered around the thumb by using the optional `slots` prop with the `valueLabel` slot. These are the typical use cases for showing the value label:
+A label for the value can be rendered around the thumb by using the optional `slots` prop with the `valueLabel` slot.
+These are typical use cases for showing the value label:
- always
- only when hovering over the thumb (using CSS)
diff --git a/docs/data/base/components/snackbar/snackbar.md b/docs/data/base/components/snackbar/snackbar.md
index b842eda4081fcc..340b477c9d0b2f 100644
--- a/docs/data/base/components/snackbar/snackbar.md
+++ b/docs/data/base/components/snackbar/snackbar.md
@@ -24,27 +24,17 @@ The Snackbar component is built to appear on-screen to inform users about an act
## Component
-### Usage
-
-After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this component using the following basic elements:
-
```jsx
import { Snackbar } from '@mui/base/Snackbar';
-
-export default function MyApp() {
- return {/* snackbar text */} ;
-}
```
-### Basics
-
Snackbar doesn't impose any restrictions on its implementation—it's up to you to design it so that it doesn't interrupt the user experience, and disappears after a set amount of time without requiring the user to take action.
Use the `autoHideDuration` prop to set the time (in milliseconds) that the snackbar remains on the screen.
:::info
-You may want to implement Snackbar with [Click-Away Listener](/base-ui/react-click-away-listener/), so that the user can choose to dismiss the snackbar before its time is up by clicking anywhere outside of it.
-But this behavior is optional for a snackbar.
+You may want to implement Snackbar with [Click-Away Listener](/base-ui/react-click-away-listener/), so that the user can choose to dismiss the Snackbar before its time is up by clicking anywhere outside of it.
+But this behavior is optional.
:::
The following demo illustrates the basic usage of Snackbar.
@@ -62,6 +52,8 @@ The Snackbar component is composed of a single root `` slot with no interio
### Custom structure
+Use the `slots.root` prop to override the root slot with a custom element:
+
```jsx
```
@@ -71,9 +63,10 @@ The `slots` prop is available on all non-utility Base components.
See [Overriding component structure](/base-ui/guides/overriding-component-structure/) for full details.
:::
-#### Usage with TypeScript
+### Usage with TypeScript
-In TypeScript, you can specify the custom component type used in the `slots.root` as a generic to the unstyled component. This way, you can safely provide the custom component's props directly on the component:
+In TypeScript, you can specify the custom component type used in the `slots.root` as a generic to the unstyled component.
+This way, you can safely provide the custom component's props directly on the component:
```tsx
slots={{ root: CustomComponent }} customProp />
@@ -91,15 +84,15 @@ The same applies for props specific to custom primitive elements:
import { useSnackbar } from '@mui/base/useSnackbar';
```
-The `useSnackbar` hook lets you apply the functionality of a snackbar to a fully custom component.
+The `useSnackbar` hook lets you apply the functionality of a Snackbar to a fully custom component.
It returns props to be placed on the custom component, along with fields representing the component's internal state.
-Hooks _do not_ support [slot props](#slot-props), but they do support [customization props](#customization).
+Hooks _do not_ support [slot props](#custom-structure), but they do support [customization props](#customization).
-If you use a [Click-Away Listener](/base-ui/react-click-away-listener/) to let the user close the snackbar by clicking outside of it, make sure to pass the `onClickAway` handler returned by this hook to the Click-Away Listener.
+If you use a [Click-Away Listener](/base-ui/react-click-away-listener/) to let the user close the Snackbar by clicking outside of it, make sure to pass the `onClickAway` handler returned by this hook to the Click-Away Listener.
-Pass the `open` state to the hook and use it to show and hide the snackbar.
+Pass the `open` state to the hook and use it to show and hide the Snackbar.
The demo below shows how to build a fully custom component with the `useSnackbar` hook that also incorporates the Click-Away Listener component:
@@ -121,7 +114,7 @@ For the sake of simplicity, demos and code snippets primarily feature components
### Transitions
-You can animate the open and close states of the snackbar with a render prop child and a transition component, as long as the component meets these conditions:
+You can animate the open and close states of the Snackbar with a render prop child and a transition component, as long as the component meets these conditions:
- Is a direct child descendant of the snackbar
- Has an `in` prop—this corresponds to the open state
@@ -129,9 +122,9 @@ You can animate the open and close states of the snackbar with a render prop chi
- Calls the `onEnter` callback prop when the enter transition starts—sets `exited` to false
- Calls the `onExited` callback prop when the exit transition is completed—sets `exited` to true
-These two callbacks allow the snackbar to unmount the child content when closed and keep it fully transitioned.
+These two callbacks allow the Snackbar to unmount the child content when closed and keep it fully transitioned.
This is only applicable if you are using transition components using [react-transition-group](https://github.com/reactjs/react-transition-group) library internally.
-The demo below shows how to create a snackbar with custom transitions:
+The demo below shows how to create a Snackbar with custom transitions:
{{"demo": "TransitionComponentSnackbar.js", "defaultCodeOpen": false}}
diff --git a/docs/data/base/components/switch/switch.md b/docs/data/base/components/switch/switch.md
index 35aee01b7870c4..2f599c667e31ac 100644
--- a/docs/data/base/components/switch/switch.md
+++ b/docs/data/base/components/switch/switch.md
@@ -23,8 +23,6 @@ The Switch component provides users with a switch for toggling between two mutua
## Component
-### Usage
-
```jsx
import { Switch } from '@mui/base/Switch';
```
@@ -61,9 +59,10 @@ The following code snippet applies a CSS class called `my-thumb` to the thumb sl
```
-#### Usage with TypeScript
+### Usage with TypeScript
-In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component. This way, you can safely provide the custom root's props directly on the component:
+In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component.
+This way, you can safely provide the custom root's props directly on the component:
```tsx
slots={{ root: CustomComponent }} customProp />
@@ -81,7 +80,7 @@ The same applies for props specific to custom primitive elements:
import { useSwitch } from '@mui/base/useSwitch';
```
-The `useSwitch` hook lets you apply the functionality of a switch to a fully custom component.
+The `useSwitch` hook lets you apply the functionality of a Switch to a fully custom component.
It returns props to be placed on the custom component, along with fields representing the component's internal state.
Hooks _do not_ support [slot props](#custom-structure), but they do support [customization props](#customization).
diff --git a/docs/data/base/components/table-pagination/table-pagination.md b/docs/data/base/components/table-pagination/table-pagination.md
index d731fa3a9267e3..ee9f262b89d876 100644
--- a/docs/data/base/components/table-pagination/table-pagination.md
+++ b/docs/data/base/components/table-pagination/table-pagination.md
@@ -21,33 +21,17 @@ It controls two properties of its parent table:
- displayed page index
- number of rows per page
-Table Pagination renders its internal elements in a `` tag by default so it can be inserted into a table's ` `.
-You can use the `slots.root` prop to render a different root element—for example, if you need to place the pagination controls outside of the table.
-See the [Slot props section](#slot-props) for details.
-
{{"demo": "UnstyledPaginationIntroduction", "defaultCodeOpen": false, "bg": "gradient"}}
## Component
-### Usage
-
-After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this component using the following basic elements:
-
```jsx
import { TablePagination } from '@mui/base/TablePagination';
-
-export default function MyApp() {
- return (
-
- );
-}
```
-### Basics
+Table Pagination renders its internal elements in a `` tag by default so it can be inserted into a table's ` `.
+You can use the `slots.root` prop to render a different root element—for example, if you need to place the pagination controls outside of the table.
+See [Custom structure](#custom-structure) for details.
The following demo shows an example of customized pagination controls in a table footer that spans the entire row:
@@ -123,7 +107,8 @@ The following code snippet applies a CSS class called `my-spacer` to the spacer
### Usage with TypeScript
-In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component. This way, you can safely provide the custom root's props directly on the component:
+In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component.
+This way, you can safely provide the custom root's props directly on the component:
```tsx
diff --git a/docs/data/base/components/tabs/tabs.md b/docs/data/base/components/tabs/tabs.md
index cc671c1b4f0d9a..768a599ba7490e 100644
--- a/docs/data/base/components/tabs/tabs.md
+++ b/docs/data/base/components/tabs/tabs.md
@@ -28,8 +28,6 @@ Tabs are implemented using a collection of related components:
## Components
-### Usage
-
```jsx
import { Tab } from '@mui/base/Tab';
import { TabsList } from '@mui/base/TabsList';
@@ -94,7 +92,8 @@ When vertical, you must set `orientation="vertical"` on the ` ` component
### Usage with TypeScript
-In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component. This way, you can safely provide the custom root's props directly on the component:
+In TypeScript, you can specify the custom component type used in the `slots.root` as a generic parameter of the unstyled component.
+This way, you can safely provide the custom root's props directly on the component:
```tsx
slots={{ root: CustomComponent }} customProp />
diff --git a/docs/data/base/components/textarea-autosize/textarea-autosize.md b/docs/data/base/components/textarea-autosize/textarea-autosize.md
index 0e281fcef26ed9..a4117b450c61bc 100644
--- a/docs/data/base/components/textarea-autosize/textarea-autosize.md
+++ b/docs/data/base/components/textarea-autosize/textarea-autosize.md
@@ -23,22 +23,11 @@ The height of the Textarea Autosize component automatically adjusts as a respons
## Component
-### Usage
-
-After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this component using the following basic elements:
-
```jsx
import { TextareaAutosize } from '@mui/base/TextareaAutosize';
-
-export default function MyApp() {
- return ;
-}
```
-### Basics
-
Textarea Autosize behaves similarly to the native HTML`