Dialog Stack
Dialog Stack composes triggers, overlays and panels around open state.
Practical React example
Move through a short sequence of related dialog views while retaining a visible way to exit.
Before you copy and paste
Use the composed primitives together under their required provider, where one is present. Copy components/kibo-ui/dialog-stack/index.tsx and its returned support files from the Code tab; preserve the project-relative paths. This example also uses shadcn UI primitives: button; install compatible versions or replace them with your existing equivalents.
Listed package dependencies: @radix-ui/react-use-controllable-state, radix-ui.
Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.
Move through a short sequence of related dialog views while retaining a visible way to exit
// Usage adapted from Kibo UI's pinned MIT source.
// Copyright (c) 2023 — Present shadcnblocks. See ./LICENSES.md.
"use client";
import {
DialogStack,
DialogStackBody,
DialogStackContent,
DialogStackDescription,
DialogStackFooter,
DialogStackHeader,
DialogStackNext,
DialogStackOverlay,
DialogStackPrevious,
DialogStackTitle,
DialogStackTrigger,
} from "@/components/kibo-ui/dialog-stack";
import { Button } from "@/components/ui/button";
const Example = () => (
<DialogStack>
<DialogStackTrigger asChild>
<Button variant="outline">Show me</Button>
</DialogStackTrigger>
<DialogStackOverlay />
<DialogStackBody>
<DialogStackContent>
<DialogStackHeader>
<DialogStackTitle>I'm the first dialog</DialogStackTitle>
<DialogStackDescription>
With a fancy description
</DialogStackDescription>
</DialogStackHeader>
<DialogStackFooter className="justify-end">
<DialogStackNext asChild>
<Button variant="outline">Next</Button>
</DialogStackNext>
</DialogStackFooter>
</DialogStackContent>
<DialogStackContent>
<DialogStackHeader>
<DialogStackTitle>I'm the second dialog</DialogStackTitle>
<DialogStackDescription>
With a fancy description
</DialogStackDescription>
</DialogStackHeader>
<DialogStackFooter className="justify-between">
<DialogStackPrevious asChild>
<Button variant="outline">Previous</Button>
</DialogStackPrevious>
<DialogStackNext asChild>
<Button variant="outline">Next</Button>
</DialogStackNext>
</DialogStackFooter>
</DialogStackContent>
<DialogStackContent>
<DialogStackHeader>
<DialogStackTitle>I'm the third dialog</DialogStackTitle>
<DialogStackDescription>
With a fancy description
</DialogStackDescription>
</DialogStackHeader>
<DialogStackFooter className="justify-between">
<DialogStackPrevious asChild>
<Button variant="outline">Previous</Button>
</DialogStackPrevious>
</DialogStackFooter>
</DialogStackContent>
</DialogStackBody>
</DialogStack>
);
export default Example;
Usage example adapted from Kibo UI's pinned MIT source. Retain the source licence notices when copying.
Use the stack for one bounded task and keep important form data in parent state if a panel transition should preserve it.
Customization
- DialogStackChildProps.index
- Optional; number.
- DialogStackProps.open
- Optional; boolean.
- DialogStackProps.clickable
- Optional; boolean.
- DialogStackProps.onOpenChange
- Optional; (open: boolean) => void.
- DialogStackProps.defaultOpen
- Optional; boolean.
- DialogStackTriggerProps.asChild
- Optional; boolean.
- DialogStackBodyProps.children
- Required; | ReactElement<DialogStackChildProps>[] | ReactElement<DialogStackChildProps>.
- DialogStackContentProps.index
- Optional; number.
- DialogStackContentProps.offset
- Optional; number.
- DialogStackNextProps.asChild
- Optional; boolean.
- DialogStackPreviousProps.asChild
- Optional; boolean.
Integration notes
- Check accessible names, focus movement and which panel is currently interactive.
- Do not close the only view of a save error before the user can understand or recover from it.
Component source: Kibo UI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.
Give your agent taste.
The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.
All components are free. Sign up only to connect MCP.