<stripe-modal>
このページは
src/components/stripe-modal/readme.mdから自動生成されています。
Accessibility
Section titled “Accessibility”While open, the modal behaves as a modal dialog:
- The host element gets
role="dialog"andaria-modal="true". - Focus moves into the modal (the close button, or the first focusable element) and returns to the previously focused element when it closes.
Tab/Shift+Tabcycle through the focusable elements inside the modal.- Pressing
Escapecloses the modal and emits thecloseevent.
Give the dialog an accessible name with aria-label or aria-labelledby on the host element:
<h2 id="payment-title">Add your payment information</h2><stripe-modal aria-labelledby="payment-title"></stripe-modal>Note: key presses inside cross-origin iframes (for example Stripe Elements fields) are not visible to the modal, so Escape pressed while such a field has focus does not close it.
Properties
Section titled “Properties”| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
open |
open |
Modal state. If true, the modal will open | boolean |
false |
showCloseButton |
show-close-button |
If true, the modal display close button | boolean |
true |
Events
Section titled “Events”| Event | Description | Type |
|---|---|---|
close |
CustomEvent<any> |
Methods
Section titled “Methods”closeModal() => Promise<void>
Section titled “closeModal() => Promise<void>”Close the modal
Returns
Section titled “Returns”Type: Promise<void>
openModal() => Promise<void>
Section titled “openModal() => Promise<void>”Open the modal
Returns
Section titled “Returns”Type: Promise<void>
toggleModal() => Promise<void>
Section titled “toggleModal() => Promise<void>”Toggle modal state
Returns
Section titled “Returns”Type: Promise<void>
Dependencies
Section titled “Dependencies”Used by
Section titled “Used by”Depends on
Section titled “Depends on”- ion-icon
graph TD; stripe-modal --> ion-icon stripe-card-element-modal --> stripe-modal stripe-payment-sheet --> stripe-modal
Built with StencilJS