ConciergeDrawer
Site-wide chat panel for Dex, the Contentstack developer experience assistant (built on Contentstack Concierge). Fixed to the right edge, opened from the header "Ask Dex" trigger (grouped with search) or the ⌘I / Ctrl+I shortcut. Mounted once in app/layout.tsx inside ConciergeProvider, alongside ConciergeShell which pads the site chrome when the panel is open on desktop.
Props
None. All chat and open/close state comes from useConcierge().
Usage
import { ConciergeDrawer } from "@/components/organisms/ConciergeDrawer";
import { ConciergeShell } from "@/components/system/ConciergeShell";
// app/layout.tsx, inside <ConciergeProvider>
<ConciergeShell>{appShell}</ConciergeShell>
<ConciergeDrawer />Open it from anywhere with the context:
const { openDrawer, toggleDrawer } = useConcierge();Behavior
- Slides in from the right (
translate-xtransition,z-[60]). - Desktop (md+): push layout —
ConciergeShellapplies matching right padding so header, main, and footer shrink beside the panel. Default widthmax-w-md; widen expands tomax-w-3xl/xl:max-w-4xland updates shell padding in sync.aria-modal={false}so the page stays interactable. - Mobile: full-width overlay with dimmed backdrop (click to close).
aria-modal={true}. - Header bar actions: new conversation, widen/narrow panel, close.
- Escape closes; focus returns to the previously focused element. Panel is
inertwhile closed. - Empty state shows a greeting plus compact
SuggestedQuestions; composer auto-focuses on open. - Wide mode (
isWide/toggleWideonConciergeProvider) expands both the panel and the shell padding.
Notes
- Dex is drawer-only. There is no standalone Dex route.
- Set
CONCIERGE_ENABLED=falseto hide the drawer, header trigger, ⌘I / Ctrl+I shortcut, and disablePOST /api/concierge. - Requires
CONCIERGE_API_KEYon the server viaPOST /api/concierge. Optionally enrich prompts with site MCP content (default). SetCONCIERGE_SITE_CONTEXT_ENABLED=falsefor native Digital Concierge only.