ion-backdrop
Backdrop は他のコンポーネントに重ねて画面全体を覆うコンポーネントです。別のコンテンツに重ねて表示するコンポーネントの背後に置き、そのコンポーネントを閉じるためにも使えます。
基本的な使い方
Backdropは、その後ろのコンテンツをクリックしたりタップしたりするのを防ぎます。デフォルトでは透明なので、下のデモではCSSで見えるようにしています。
スタイリング
バックドロップは、CSSプロパティをバックドロップ要素に直接割り当てることで、カスタマイズすることができます。一般的なプロパティには background-color, background, opacity があります。
コンテンツの z-index に Backdrop の値(デフォルトは 2)より大きな値を指定すると、Backdrop の手前にコンテンツを表示できます。
Properties
stopPropagation
| Description | trueの場合、バックドロップはタップ時に伝搬を停止します。 |
| Attribute | stop-propagation |
| Type | boolean |
| Default | true |
tappable
| Description | trueの場合、背景をクリックすることができ、ionBackdropTapイベントを発生させます。 |
| Attribute | tappable |
| Type | boolean |
| Default | true |
visible
| Description | If true, the backdrop will be visible. This property controls whether or not the backdrop's default background is shown. It does not control whether or not the backdrop blocks interaction, and it does not override a custom background set on ion-backdrop. |
| Attribute | visible |
| Type | boolean |
| Default | true |
Events
| Name | Description | Bubbles |
|---|---|---|
ionBackdropTap | バックドロップがタップされたときに発行されます。 | true |
Methods
No public methods available for this component.
CSS Shadow Parts
No CSS shadow parts available for this component.
CSS Custom Properties
No CSS custom properties available for this component.
Slots
No slots available for this component.