App shell
Peek
Open a page without leaving the current one: the side peek docked at the right edge, or the center peek modal. Both share the top bar and body parts.
Usage
- Use a side peek to preview a page or record while keeping the list beside it usable.
- Use a center peek when the preview should take focus (modal) but the user stays in context.
- Offer “Open in full page” for long content; peeks are for quick reads and edits.
- Don’t stack peeks; replace the content (Previous / Next) instead.
- Don’t use a peek for confirmations or short forms; use
Dialog/ConfirmDialog.
Installation
Install the package (React 19):
terminal
terminal
terminal
Import the styles once, in your app entry or root layout:
/src/main.tsx
Use it anywhere inside your app's <Theme> (see Installation):
/src/PeekExample.tsx
Examples
Center peek
Peek top bar
Database row in a peek
Use PropertyList for editable database properties.
Composition
anatomy
API Reference
SidePeek
Based on a non-modal <dialog open> (except title). Also takes the PeekTopBar callbacks.
| Prop | Type | Default |
|---|---|---|
open | boolean | true |
label | string | "Page preview" |
autoFocus | boolean | true |
width | number | 660 |
minWidth | number | 400 |
maxWidth | number | 1200 |
onClose | () => void | |
onOpenFull | () => void | |
onSwitchMode | () => void | |
onPrev | () => void | |
onNext | () => void | |
actions | ReactNode | |
children | ReactNode |
CenterPeek
| Prop | Type | Default |
|---|---|---|
open | boolean | |
onOpenChange | (open: boolean) => void | |
title | string | "Page" |
onClose | () => void | |
onOpenFull | () => void | |
onSwitchMode | () => void | |
onPrev | () => void | |
onNext | () => void | |
actions | ReactNode | |
children | ReactNode | |
className | string |
PeekTopBar
| Prop | Type | Default |
|---|---|---|
mode | "side""center" | "side" |
onClose | () => void | |
onOpenFull | () => void | |
onSwitchMode | () => void | |
onPrev | () => void | |
onNext | () => void | |
actions | ReactNode |
PeekBody
Based on <div> (except title).
| Prop | Type | Default |
|---|---|---|
header | ReactNode | |
properties | ReactNode | |
comments | ReactNode | |
children | ReactNode | |
gutter | number | 76 |
PeekProperties
Based on <div>. Table wrapper + "Add a property".
| Prop | Type | Default |
|---|---|---|
onAddProperty | () => void |
PeekProperty
Based on <div>. Static property row.
| Prop | Type | Default |
|---|---|---|
icon | IconName | "textNormal" |
label | ReactNode | |
children | ReactNode | |
empty | ReactNode | "Empty" |
PeekComments
Based on <div> (except onSubmit).
| Prop | Type | Default |
|---|---|---|
avatar | ReactNode | letter avatar |
placeholder | string | "Add a comment…" |
onSubmit | (text: string) => void | |
children | ReactNode |
Accessibility
- Side peek: a non-modal
dialog(aria-modal="false", labelled bylabel, default "Page preview"). Focus moves into it on open and returns to the opener on close; Escape inside it closes it (onClose). The left-edge resize handle is a "Preview width" slider: ←/↑ widen, →/↓ narrow (20px), Page Up/Down 100px, Home/End jump tominWidth/maxWidth. - Center peek: Radix Dialog with a visually hidden title; focus is trapped, Escape and the underlay close it, focus returns to the trigger.
- Top bar buttons have labels and titles (Close, Open in full page, Switch peek mode, Previous page, Next page); the hover-only group also appears on focus.
- Comments: the input is labelled by its placeholder, Enter sends; Attach, Mention and Send are labelled buttons.
- Both slide / scale in and out (disabled under reduced motion) and are full-screen on phones.
© 2026 Motion. Internal documentation.