# Overriding component structure

Learn how to override the default DOM structure of Joy UI components.

Joy UI components are designed to suit the widest possible range of use cases, but you may occasionally need to change how a component's structure is rendered in the DOM. To understand how to do this, it helps to have an accurate mental model of the components. ## The mental model A component's structure is determined by the elements that fill that component's **slots**. Slots are most commonly filled by HTML tags, but may also be filled by React components. 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_ Joy UI components accept two props for overriding their rendered HTML structure: - `component`—to override the root slot - `slots`—to replace any interior slots (when present) as well as the root Additionally, you can pass custom props to interior slots using `slotProps`. ## The root slot The root slot represents the component's outermost element. It is filled by a styled component with an appropriate HTML element. For example, the [Button's](/joy-ui/react-button/) root slot is a `