Components
API Reference

API Reference

Modal containers allow users to view content that demands attention through an overlay window that opens on top of the current page.

Parameters

props

  • Type: @vtex/shoreline-components.ModalProps & @types/react.React.RefAttributes<typescript.HTMLDivElement>

Props

onClose (optional)

  • Type: { (event: typescript.Event): void; }

open (optional)

Whether the modal is open or not

  • Type: boolean

  • Default: false

portal (optional)

Whether to render the modal inside a portal or not

  • Type: boolean

  • Default: true

size (optional)

Modal size

  • Type: small | large | medium

  • Default: medium

View source (opens in a new tab)