Skip to content
Frauthy Brand
Frauthy index

Go anywhere.

    No exact contract found. Try a component family, product name, prop, or keyboard key.

    ↑↓ move↵ openesc close

    Modal

    overlay

    An accessible dialog overlay rendered via Solid'sPortal. Manages focus trap, scroll lock, and restore-on-close automatically. Opt into persistent mode to require an explicit action to dismiss.

    Preview

    Usage

    import { Modal, Button } from 'PRIVATE_BETA_PACKAGE_COORDINATE_REDACTED';
    
    const [open, setOpen] = createSignal(false);
    
    <Button onClick={() => setOpen(true)}>Open</Button>
    
    <Modal
      open={open()}
      onClose={() => setOpen(false)}
      title="Confirm action"
      footer={<Button onClick={() => setOpen(false)}>OK</Button>}
    >
      Are you sure?
    </Modal>

    Props

    PropTypeDefaultDescription
    openbooleanfalseWhether the modal is visible
    onClose() => void--Called when the modal requests to close
    titlestring--Dialog title, sets aria-labelledby
    descriptionIdstring--ID for aria-describedby (caller manages element)
    persistentbooleanfalsePrevents backdrop click from closing
    footerJSX.Element--Optional footer slot for action buttons
    childrenJSX.Element--Dialog body content

    Accessibility

    Do / Don't

    Do

    Use modals for confirmations, short forms, or actions that require focused attention. Provide a clear title and at least one dismissal path.

    Don't

    Don't nest modals or use them for long-form content that would be better served by a dedicated page. Avoid removing all close mechanisms.