ttolbel UI

Component

Modal

A full-screen sheet that rises to cover the entire viewport, with a nav bar carrying a centered title and a Done button to dismiss.

The primitive

modal.tsx
<NativeModal open={open} onClose={() => setOpen(false)} title="Settings">
  <div className="p-4">...</div>
</NativeModal>

Example

Editing account details opens this full-screen, listing every editable field with a Done button as the only way out.

modal-example.tsx
<NativeModal open={open} onClose={() => setOpen(false)} title="Account details">
  <NativeRow label="Legal name" sublabel={account.legalName} />
  <NativeRow label="Account number" sublabel={account.number} />
</NativeModal>

Capabilities

PropTypeDescription
openrequiredboolean
onCloserequired() => void
titlestring
showDonebooleanShow the "Done" / close button in top-right
doneLabelstring
childrenrequiredReact.ReactNode
classNamestring