zedkit
@zedtech/zedkit-ui

Render a route as a modal over the list

@zedtech/zedkit-ui — alpha

alpha

At a glance

  • Who: Developers opening list details in an overlay with a shareable URL (Next.js parallel/intercepting routes).
  • What: A route-driven modal (right drawer or centered dialog) that plays its exit before navigating back, with a list fallback.
  • Use when: Inside an intercepting @modal slot, with onClose wired to closeRoute.
  • Avoid when: For state-driven modals — use Dialog/Drawer directly with local state.
  • See also: Slide in a drawer panel, Open modal dialogs, Confirm destructive actions

Preview

@zedtech/zedkit-ui — RouteModal, RouteModalProps, RouteModalDirection, RouteModalSize, RouteModalVariant, closeRoute, CloseRouteOptions

Install

pnpm add @zedtech/zedkit-ui

Latest: 0.4.0 (via changesets).

Example

Usage
import { RouteModal, closeRoute } from "@zedtech/zedkit-ui";
import { useRouter } from "next/navigation";
const router = useRouter();
<RouteModal title="Delivery" onClose={() => closeRoute({ ...router, fallback: "/items" })}>
  <DetailView />
</RouteModal>

Wraps: (none)

Props

Prop

Type

On this page