Skip to content

feat: [drawer] add swipe area, keyboard handling, and indent - #956

Merged
rohanchkrabrty merged 3 commits into
mainfrom
feat/drawer-swipe-area-keyboard-indent
Oct 27, 2026
Merged

rohanchkrabrty merged 3 commits into
mainfrom
feat/drawer-swipe-area-keyboard-indent

Conversation

@ravisuhag

Copy link
Copy Markdown
Member

Summary

  • Add Drawer.SwipeArea, an invisible edge strip users drag from to open the drawer. It sits on the edge named by side by default, and accepts swipeDirection and disabled.

  • Wrap Drawer.Content in Base UI's VirtualKeyboardProvider, so focused inputs in a modal drawer stay above the phone keyboard. Apps do not need to set anything up.

  • Add optional Drawer.Provider, Drawer.Indent, and Drawer.IndentBackground for the iOS-style background inset. Nothing changes unless an app uses them. New slots (drawer-swipe-area, drawer-indent, drawer-indent-background) have tests and docs. Tests cover what jsdom can show. Swipe gestures, the keyboard, and the indent animation still need testing on a real phone.

  • Why it's like this: Sheet moved to Base UI Drawer on Feb 27, 2026 (feat: migrate sheet to drawer #654), two weeks after Base UI first shipped Drawer. SwipeArea and Indent came in Base UI 1.3, and the keyboard provider in 1.6, so the wrapper did not have them.

  • Breaking: no.

  • I have followed the pull request section of the contributing guide.

@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
apsara Ready Ready Preview Oct 27, 2026 7:37pm UTC

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0c632cb-304b-41fb-a330-0f5fccd92aa3
Commits

Reviewing files that changed from the base of the PR and between 2cfaa03 and 8b4d480.

Files selected for processing: 12
  • apps/www/src/content/docs/components/drawer/demo.ts
  • apps/www/src/content/docs/components/drawer/index.mdx
  • apps/www/src/content/docs/components/drawer/props.ts
  • packages/react/components/drawer/__tests__/data-slots.test.tsx
  • packages/react/components/drawer/__tests__/drawer.test.tsx
  • packages/react/components/drawer/drawer-content.tsx
  • packages/react/components/drawer/drawer-indent.tsx
  • packages/react/components/drawer/drawer-swipe-area.tsx
  • packages/react/components/drawer/drawer.module.css
  • packages/react/components/drawer/drawer.tsx
  • packages/react/components/drawer/index.tsx
  • packages/react/index.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@raystack/apsara@956

commit: 8b4d480

- Add enableVirtualKeyboard to Drawer.Content. The bottom drawer moves up by --drawer-keyboard-inset while the keyboard is open.
- Add a container prop to Drawer.Content.
- Drawer.Indent renders the indent background. Remove Drawer.IndentBackground.
- Give the indent a min-height of 100dvh.
- Export DrawerIndentProps and DrawerSwipeAreaProps.
- Keep the swipe area and indent docs examples inside their own box.
@rohanchkrabrty
rohanchkrabrty merged commit 1af6c30 into main Oct 27, 2026
8 checks passed
@rohanchkrabrty
rohanchkrabrty deleted the feat/drawer-swipe-area-keyboard-indent branch October 27, 2026 19:56

This branch was successfully deployed

1 active deployment
Preview — 8b4d480e Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants