メインコンテンツまでスキップ
バージョン: v8

ion-menu

shadow

Properties

contentId

Descriptionメインコンテンツの id です。ルータを使用する場合は、通常 ion-router-outlet となります。ルータを使用しない場合は、通常、メインビューの ion-content となります。これは ion-menu 内の ion-content の ID ではありません。
Attributecontent-id
Typestring | undefined
Defaultundefined

disabled

Descriptiontrueの場合、メニューは無効化される。
Attributedisabled
Typeboolean
Defaultfalse

maxEdgeStart

Descriptionドラッグでメニューを開く際のエッジのしきい値です。この値を超えてドラッグ/スワイプが行われた場合、メニューはトリガーされない。
Attributemax-edge-start
Typenumber
Default50
DescriptionメニューのIDです。
Attributemenu-id
Typestring | undefined
Defaultundefined

side

Descriptionメニューがビューのどの側に配置されるべきか。
Attributeside
Type"end" | "start"
Default'start'

swipeGesture

Descriptiontrueの場合、スワイプによるメニュー操作が有効になる。
Attributeswipe-gesture
Typeboolean
Defaulttrue

type

Descriptionメニューの表示形式を指定します。利用可能なオプション。overlay", "reveal", "push"`.
Attributetype
Type"overlay" | "push" | "reveal" | undefined
Defaultundefined

Events

NameDescription
ionDidCloseメニューが閉じられたときに発行されます。
ionDidOpenメニューが開いているときに発行されます。
ionWillCloseメニューが閉じられようとするときに発行されます。
ionWillOpenメニューが開かれようとするときに発行されます。

Methods

close

Descriptionメニューを閉じる。メニューが既に閉じられていたり、閉じることができない場合は、falseを返します。
Signatureclose(animated?: boolean, role?: string) => Promise<boolean>

isActive

Descriptionメニューがアクティブな場合は true を返します。メニューが開閉可能で有効化されており、ion-split-pane の一部でないときにアクティブとみなされます。
SignatureisActive() => Promise<boolean>

isOpen

Descriptionメニューが開いている場合は true を返します。
SignatureisOpen() => Promise<boolean>

open

Descriptionメニューを開く。メニューが既に開いているか、開くことができない場合は、falseを返します。
Signatureopen(animated?: boolean) => Promise<boolean>

setOpen

Descriptionメニューを開くか閉じます。操作が正常に完了できない場合は false を返します。
SignaturesetOpen(shouldOpen: boolean, animated?: boolean, role?: string) => Promise<boolean>

toggle

Descriptionメニューを切り替えます。メニューが既に開かれている場合は閉じようとし、そうでない場合は開こうとします。操作が正常に完了しない場合は、falseを返します。
Signaturetoggle(animated?: boolean) => Promise<boolean>

CSS Shadow Parts

NameDescription
backdropメニューを開いているときに、メインコンテンツの上に表示される背景です。
containerメニューの内容を格納するコンテナです。

CSS Custom Properties

NameDescription
--backgroundメニューの背景
--backgroundメニューの背景
--heightメニューの高さ
--heightメニューの高さ
--max-heightメニューの最大の高さ
--max-heightメニューの最大の高さ
--max-widthメニューの最大幅
--max-widthメニューの最大幅
--min-heightメニューの高さの最小値
--min-heightメニューの高さの最小値
--min-widthメニューの最小幅
--min-widthメニューの最小幅
--widthメニューの幅
--widthメニューの幅
View Source