Grow Dialog
A dialog that grows out of the element you clicked while the page behind blurs and dims, and shrinks back into the same element when it closes.
pixikit.com/docs/components/grow-dialog
Customize
Default open
Show trigger
Width750px
Height467px
Radius20px
Padding24px
Duration0.45s
Easing
Motion
Start scale0.80
Backdrop blur15px
Backdrop opacity0.80
Backdrop color
Background color
Border color
Show close
Show arrows
Close on escape
Close on backdrop
Portal
Lock scroll
Props
34| Name | Type | Default | Description |
|---|---|---|---|
children | ReactNode | None | What the dialog shows. A sample layout shows when left out. |
open | boolean | None | Open state, when you hold it. |
defaultOpen | boolean | false | Starts open. |
onOpenChange | (open: boolean) => void | None | Called when the dialog opens or closes. |
origin | HTMLElement | null | None | The element the dialog grows from and returns to. Defaults to the built-in trigger. |
showTrigger | boolean | true | Renders the built-in trigger button. Turn off when you open it yourself. |
triggerLabel | string | "Open details" | Text of the built-in trigger. |
trigger | ReactNode | None | Custom trigger content; replaces `triggerLabel`. |
title | string | "Star, outline" | Dialog name, read by screen readers and shown in the sample layout. |
description | string | "The dialog starts at the place and size of what you clicked, then settles in the middle while the page behind blurs. Escape sends it back." | Text of the sample layout. |
width | number | 750 | Dialog width, in px. It shrinks on narrow screens. |
height | number | 467 | Dialog height, in px; 0 fits the content. |
radius | number | 20 | Corner radius, in px. |
padding | number | 24 | Space inside the dialog, in px. |
duration | number | 0.45 | Seconds the dialog takes to grow and to return. |
easing | "spring" | "ease-out" | "ease" | "ease-out" | How the dialog moves. |
motion | "grow" | "scale" | "fade" | "grow" | `grow` starts at the origin's place and size, `scale` grows in the middle from `startScale`, `fade` only fades. |
startScale | number | 0.8 | Size the dialog starts from with `scale`, as a share of its full size. |
backdropBlur | number | 15 | Blur of the page behind, in px. |
backdropOpacity | number | 0.8 | Darkness of the page behind, 0 to 1. |
backdropColor | string | "#000000" | Colour laid over the page behind. |
backgroundColor | string | "var(--background)" | Dialog fill. |
borderColor | string | "var(--border)" | Dialog border colour. |
showClose | boolean | true | Shows the round close button. |
showArrows | boolean | false | Shows previous and next buttons beside the dialog. |
onPrevious | () => void | None | Called by the previous button and the left arrow key. |
onNext | () => void | None | Called by the next button and the right arrow key. |
closeOnEscape | boolean | true | Closes on Escape. |
closeOnBackdrop | boolean | true | Closes on a click outside the dialog. |
portal | boolean | true | Renders into document.body over the whole window. Turn off to keep it inside its container. |
lockScroll | boolean | true | Stops the page from scrolling while open. |
closeLabel | string | "Close" | Screen reader text of the close button. |
className | string | "" | |
style | CSSProperties | None |