LayerDialog

A second layer slides over the first (add model → review values); Back returns.

View source
import { LayerDialog } from "@logicplanes/kaeso-ui";

Props

  • defaultOpen
    boolean

    Whether it starts open, when the component keeps its own state.

  • hideClose
    boolean

    Hide the close circle (rare).

  • inline
    boolean

    Render without a portal and backdrop, for documentation and state matrices.

  • layer
    number

    The visible layer; layers above the first slide over it.

  • layers
    DialogLayer[]

    The layers, each with its title, content and footer; one shows at a time, and the ones below it stay mounted and hidden.

  • onLayerChange
    ((layer: number) => void)

    Called with the index of the layer shown.

  • onOpenChange
    ((open: boolean) => void)

    Called when it opens or closes.

  • onSubmit
    (() => void)

    ⌘/Ctrl+Enter calls this on every layer; pass the action of the layer shown.

  • open
    boolean

    Whether it is open, when you control it.

  • size
    "md" | "sm" | "lg"

    The dialog's width.

  • trigger
    ReactElement<unknown, string | JSXElementConstructor<any>>

    The trigger, a single element.