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

ion-badge

shadow

Badges are inline block elements that usually appear near another element. Typically they contain a number or other characters. They can be used as a notification that there are additional items associated with an element and indicate how many items there are. Badges are hidden if no content is passed in.

Basic Usage​

Badges in Tab Buttons​

Badges can be added inside a tab button, often used to indicate notifications or highlight additional items associated with the element.

備考

Empty badges are only available for md mode.

Theming​

Colors​

CSS Properties​

Properties​

color​

Descriptionアプリケーションのカラーパレットから使用する色を指定します。デフォルトのオプションは以下の通りです。 "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", と "dark" です.色に関する詳しい情報は theming を参照してください。
Attributecolor
Type"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
Defaultundefined

mode​

Descriptionmodeは、どのプラットフォームのスタイルを使用するかを決定します。

This is a virtual property that is set once during initialization and will not update if you change its value after the initial render.
Attributemode
Type"ios" | "md"
Defaultundefined

Events​

No events available for this component.

Methods​

No public methods available for this component.

CSS Shadow Parts​

No CSS shadow parts available for this component.

CSS Custom Properties​

NameDescription
--backgroundバッジの背景
--colorバッジの文字色
--padding-bottomバッジのBottom Padding
--padding-endバッジの向きが左から右の場合はRight Padding、右から左の場合はLeft Paddingとなります。
--padding-startバッジの向きが左から右の場合はLeft Padding、右から左の場合はRight Paddingとなります。
--padding-topバッジのTop Padding

Slots​

No slots available for this component.