タブボタンは、タブバー の内部に配置される UI コンポーネントです。タブボタンを使用すると、アイコンとラベルのレイアウトを指定し、タブビュー に接続できます。
タブの設定の詳細については、tabs ドキュメント を参照してください。
使い方 Angular JavaScript React Vue
< ion-tabs >
< ion-tab-bar slot = " bottom " >
< ion-tab-button tab = " schedule " >
< ion-icon name = " calendar " aria-hidden = " true " > </ ion-icon >
< ion-label > Schedule </ ion-label >
</ ion-tab-button >
< ion-tab-button tab = " speakers " >
< ion-icon name = " person-circle " aria-hidden = " true " > </ ion-icon >
< ion-label > Speakers </ ion-label >
</ ion-tab-button >
< ion-tab-button tab = " map " >
< ion-icon name = " map " aria-hidden = " true " > </ ion-icon >
< ion-label > Map </ ion-label >
</ ion-tab-button >
< ion-tab-button tab = " about " >
< ion-icon name = " information-circle " aria-hidden = " true " > </ ion-icon >
< ion-label > About </ ion-label >
</ ion-tab-button >
</ ion-tab-bar >
</ ion-tabs > プロパティ disabled Description trueの場合、ユーザはタブボタンを操作することができません。Attribute disabledType booleanDefault false
download Description この属性は、ブラウザが URL に移動する代わりに URL をダウンロードするように指示し、ユーザはローカルファイルとして保存するように促されます。この属性に値がある場合、保存のプロンプトであらかじめ入力されたファイル名として使用されます(ユーザーはファイル名を変更することができます)。 Attribute downloadType string | undefinedDefault undefined
href Description ハイパーリンクが指し示す URL または URL フラグメントを格納します。このプロパティが設定されている場合、アンカータグがレンダリングされます。 Attribute hrefType string | undefinedDefault undefined
layout Description タブバーのテキストとアイコンのレイアウトを設定します。デフォルトは"icon-top"です。 Attribute layoutType "icon-bottom" | "icon-end" | "icon-hide" | "icon-start" | "icon-top" | "label-hide" | undefinedDefault undefined
mode Description modeは、どのプラットフォームのスタイルを使用するかを決定します。 This is a virtual property that is set once during initialization and will not update if you change its value after the initial render. Attribute modeType "ios" | "md"Default undefined
rel Description ターゲットオブジェクトとリンクオブジェクトの関係を指定します。値は、スペースで区切られたリンクタイプ のリストです。 Attribute relType string | undefinedDefault undefined
selected Description 選択されたタブコンポーネント Attribute selectedType booleanDefault false
tab Description 各 ion-tab にはタブ ID を指定する必要があります。これは、選択されたタブを参照したり、ルータがタブを切り替えたりするために内部的に使用される。 Attribute tabType string | undefinedDefault undefined
target Description リンク先のURLを表示する場所を指定します。hrefを指定した場合のみ適用される。特別なキーワードがあります。"_blank", "_self", "_parent", "_top". Attribute targetType string | undefinedDefault undefined
イベント No events available for this component.
メソッド No public methods available for this component.
CSS Shadow Parts Name Description nativeすべての子要素を包むネイティブHTMLのアンカー要素です。
CSSカスタムプロパティ iOS MD
Name Description --backgroundタブボタンの背景 --background-focusedタブキーでフォーカスされたときのタブボタンの背景 --background-focused-opacityタブキーでフォーカスしたときのタブボタンの背景の不透明度 --colorタブボタンの色 --color-focusedタブキーでフォーカスしたときのタブボタンの色 --color-selected選択されたタブボタンの色 --padding-bottomタブボタンのBottom Padding --padding-endタブボタンの向きが左から右の場合はRight Padding、右から左の場合はLeft Paddingとなります。 --padding-startタブボタンの向きが左から右の場合はLeft Padding、右から左の場合はRight Paddingとなります。 --padding-topタブボタンのTop Padding --ripple-colorボタンリプルエフェクトの色
Slots No slots available for this component.