UI·loomora/Dialog

Dialog

A dialog primitive driven by open/show state and setter callbacks, with optional portal rendering and placement controls.

Interactive live playground

Tweak props, change states, and see the live component respond in real time.

Live

How to call

Import directly from the Loomora package root. For projects without Tailwind CSS, ensure loomora/dist/index.css is imported once in your root layout.

import { Dialog } from 'loomora'

<Dialog open={open} setOpen={setOpen} show={show} setShow={setShow}>
  <div className="p-6">Dialog content</div>
</Dialog>

API reference

Important public props and how they affect rendering.

6 props
PropTypeDefaultDescription
openbooleanrequiredWhether the dialog is interactive/open.
setOpen(open: boolean) => voidrequiredUpdates the open state.
showbooleanrequiredControls whether the dialog is mounted/shown for its transition.
setShow(show: boolean) => voidrequiredUpdates the show state.
position'center' | 'top' | 'bottom' | 'start' | 'end''center'Dialog placement.
usePortalbooleantrueRenders into a portal when enabled.