1 viewer
Back to Components
Component · Overlay

Modal

Focus-managed dialog with backdrop and dismiss affordances.

Category
Overlay
Slots
6
States
2
Writer
Shared
cre8.primitive.modal

Preview

Live renderShared SSR + WASM writers
<Modal title="Hermetic Sandboxed Container" trigger="Open Execution Modal">
  <Text
    text="This container executes within CRE8VM with bounded gas and no external host authority."
  />
</Modal>

Anatomy

The named parts of the rendered markup. Recipes style these hooks, and every renderer keeps them stable.

SlotDOM class
root.primitive-modal
backdrop.primitive-modal__backdrop
header.primitive-modal__header
title.primitive-modal__title
close.primitive-modal__close
body.primitive-modal__body
6 rows
Modifier
primitive-modal--{state}
State attribute
data-statefrom the state prop
Role
dialog
Hydration markers
data-cre8-modal, data-cre8-modal-dismiss

States and platforms

The states the contract publishes, the platforms it declares, and the style recipes that dress it.

States
openclosed
Platforms
webruntime-node
Recipes
unstyledruntime-console

Renderers

Shared writer
Modal renders through the one writer the server and the WASM DOM share, so both emit the same markup.

Every tag in the example above renders through a shared writer.

Declared adapters. A status is the manifest's declaration, not a measured parity result.

TargetRendererStatus
webreactexperimental
runtime-nodeview-nodeready
ssrhtml-semanticready
terminalterminal-textplanned
4 rows

Accessibility

Focus enters, stays within, and returns from the dialog.

  • Dialog has role=dialog, aria-modal, and either a visible title or an aria-label.
  • Escape and backdrop dismiss return focus to the triggering control unless the dialog explicitly disables those accidental-dismiss paths.