ion-text
textコンポーネントは、任意の要素のテキストカラーのスタイル設定に使用できる単純なコンポーネントです。テキストカラーを変更するには、要素を ion-text
要素で囲む必要があります。
基本的な使い方
<ion-text color="primary">
<h1>H1: The quick brown fox jumps over the lazy dog</h1>
</ion-text>
<ion-text color="secondary">
<h2>H2: The quick brown fox jumps over the lazy dog</h2>
</ion-text>
<ion-text color="tertiary">
<h3>H3: The quick brown fox jumps over the lazy dog</h3>
</ion-text>
<p>
<ion-text color="warning"><ion-icon name="warning"></ion-icon></ion-text>
I saw a werewolf with a Chinese menu in his hand. Walking through the
<ion-text color="success"><sub>streets</sub></ion-text> of Soho in the rain. He
<ion-text color="medium"><i>was</i></ion-text> looking for a place called Lee Ho Fook's. Gonna get a
<ion-text color="danger">big dish of beef chow mein.</ion-text>
</p>
テーマ
テキストコンポーネントは、Ionicが提供するデフォルトのcolorsのいずれかを変更することでカスタマイズすることが可能です。
プロパティ
color
Description | アプリケーションのカラーパレットから使用する色を指定します。デフォルトのオプションは以下の通りです。 "primary" , "secondary" , "tertiary" , "success" , "warning" , "danger" , "light" , "medium" , と "dark" です.色に関する詳しい情報は theming を参照してください。 |
Attribute | color |
Type | "danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined |
Default | undefined |
mode
Description | modeは、どのプラットフォームのスタイルを使用するかを決定します。 |
Attribute | mode |
Type | "ios" | "md" |
Default | undefined |
イベント
No events available for this component.
メソッド
No public methods available for this component.
CSS Shadow Parts
No CSS shadow parts available for this component.
CSSカスタムプロパティ
No CSS custom properties available for this component.
Slots
No slots available for this component.