- Implementation
- BottomSheet Props
Common Examples
To use theBottomSheet, pass the required title and content props. Open it with a Carto Button through trigger, or control it with isOpen and onOpenChange.Body content
UnlikeDialog, the sheet’s content is a general body region for forms, lists, and composed layouts.Subheader
Pass a shortsubheader to provide context beneath the title.Close button
The header close button appears by default. SetshowCloseButton={false} to remove it. The sheet remains dismissable through the drag handle, backdrop, and Escape.Scrolling body
Content beyond the current detent scrolls inside the body while the handle and header remain visible.Controlled state
Omittrigger and pass isOpen with onOpenChange when an event or another component opens the sheet.Internationalization
Localizetitle, subheader, and content before passing them to BottomSheet. The component uses these messages for built-in controls:ai-kit.bottomSheet.closeai-kit.bottomSheet.resizeai-kit.bottomSheet.resizeValue
AiKitIntlProvider inside CartoTheme to switch locale or override them. resizeValue receives a {percent} value.React Accessibility
- The required
titlelabels the modal througharia-labelledby.subheaderis associated througharia-describedby. - The drag handle is a vertical slider. Arrow keys move between detents and expose the current viewport percentage.
- The body is always keyboard-focusable so keyboard users can scroll plain content.
- React Aria supplies focus trapping and restoration, scroll lock,
aria-modal, Escape dismissal, and outside-interaction dismissal.