Component
Bottom Sheet
A mobile-first modal surface for dense forms and focused decisions.
Preview
Installation
Install the package, then import the component and shared stylesheet in your app.
Package install
Install the package when you want components imported from axie-ui.
install
pnpm add axie-uiImport
code
import "axie-ui/styles.css";import { BottomSheet } from "axie-ui";Registry install
Use the direct URL when you want shadcn to copy editable source into your app. This works without the official registry and does not install axie-ui.
registry
pnpm dlx shadcn@latest add https://axie.alexi.life/r/bottom-sheet.jsonCopied source import
code
import "@/styles/axie.css";import { BottomSheet } from "@/components/axie/bottom-sheet";Prefer @axie/bottom-sheet? Add the Axie namespace once from the Installation page, then use that shorthand.
Usage
code
import { BottomSheet } from "axie-ui";export function Example() { return ( <BottomSheet open={open} title="Edit plan" onOpenChange={setOpen}> Content </BottomSheet> );}Accessibility
- Move focus into the sheet when it opens and return focus to the trigger when it closes.
- Lock background scrolling while the sheet is open.
- Use a clear title so screen reader users understand the temporary context.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | - | Controls sheet visibility. |
| onOpenChange | (open: boolean) => void | - | Called with the next open state. |
| title | string | - | Optional sheet heading. |
| footer | ReactNode | - | Optional sticky action area rendered after content. |