---
title: Slot
description: "`Slot` is a component that merges its props onto its immediate child."
links:
- source: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/components/slot
- storybook: https://yamada-ui.github.io/yamada-ui?path=/story/components-slot--basic
---
```tsx
const Button = ({ asChild, ...props }) => {
const Component = asChild ? Slot : "button"
return
}
return (
)
```
## Usage
```tsx
import { Slot, Slottable } from "@yamada-ui/react"
```
```tsx
import { Slot, Slottable } from "@/components/ui"
```
```tsx
import { Slot, Slottable } from "@workspaces/ui"
```
```tsx
```
### Multiple Children
`Slot` only accepts a single child element. If you want to accept multiple children, use `Slottable`.
```tsx
const Button = ({ asChild, children, endIcon, startIcon, ...props }) => {
const Component = asChild ? Slot : "button"
return (
{startIcon}
{children}
{endIcon}
)
}
return (
)
```