Components
Bottom Sheet
Bottom sheets surface content or actions from the bottom of the viewport, typically on smaller screens.
Anatomy
Anatomy
import {BottomSheet} from '@staffbase/design';
<BottomSheet.Root>
<BottomSheet.Trigger />
<BottomSheet.Popup>
<BottomSheet.Header>
<BottomSheet.Back />
<BottomSheet.Title />
<BottomSheet.Description />
<BottomSheet.Close />
</BottomSheet.Header>
<BottomSheet.Action />
</BottomSheet.Popup>
</BottomSheet.Root> API reference
Root
Inherits props fromBase UI Drawer Root
Trigger
Inherits props fromBase UI Drawer Trigger
| Name | Type | Description |
|---|---|---|
children | ReactNode | Opens the bottom sheet when activated. Must be a button element. |
Popup
Inherits props fromBase UI Drawer Popup
| Name | Type | Description |
|---|---|---|
children | ReactNode | The content of the bottom sheet. |
container | HTMLElementRefObject<HTMLElement> | Use this instead of z-index to specify another parent element to render the sheet portal into. Default is the document body. |
Header
| Name | Type | Description |
|---|---|---|
children | ReactNode | The header content, typically a title, description, and close or back buttons. |
Back
| Name | Type | Description |
|---|---|---|
aria-label | string | An accessible label for the back button, since it has no visible text. |
Title
Inherits props fromBase UI Drawer Title
| Name | Type | Description |
|---|---|---|
children | ReactNode | A heading that labels the bottom sheet. |
Description
Inherits props fromBase UI Drawer Description
| Name | Type | Description |
|---|---|---|
children | ReactNode | A description that provides additional context for the bottom sheet. |
Close
Inherits props fromBase UI Drawer Close
| Name | Type | Description |
|---|---|---|
aria-label | string | An accessible label for the close button, since it has no visible text. |
Action
| Name | Type | Description |
|---|---|---|
children | ReactNode | The label of the action button. |