ion-label
Label 是一个主要用于向 条目 组件添加文本内容的元素。当指定可见标签时,Label 也可以用在表单控件组件内部,例如 输入 或 单选框,但这不是必需的。
¥Label is an element used primarily to add text content to Item components. Label can also be used inside of form control components such as Input or Radio when specifying the visible label, but it is not required.
项目内部标签的位置可以是内联、固定、堆叠或浮动。
¥The position of the label inside of an item can be inline, fixed, stacked, or floating.
基本用法
¥Basic Usage
条目标签
¥Item Labels
主题化
¥Theming
颜色
¥Colors
属性
¥Properties
color
Description | The color to use from your application's color palette. Default options are: "primary" , "secondary" , "tertiary" , "success" , "warning" , "danger" , "light" , "medium" , and "dark" . For more information on colors, see theming. |
Attribute | color |
Type | "danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined |
Default | undefined |
mode
Description | The mode determines which platform styles to use. |
Attribute | mode |
Type | "ios" | "md" |
Default | undefined |
position
Description | The position determines where and how the label behaves inside an item. |
Attribute | position |
Type | "fixed" | "floating" | "stacked" | undefined |
Default | undefined |
事件
¥Events
No events available for this component.
方法
¥Methods
No public methods available for this component.
CSS 阴影部分
¥CSS Shadow Parts
No CSS shadow parts available for this component.
CSS 自定义属性
¥CSS Custom Properties
- iOS
- MD
Name | Description |
---|---|
--color | Color of the label. This property is only available when using ion-label inside of an ion-item . |
Name | Description |
---|---|
--color | Color of the label. This property is only available when using ion-label inside of an ion-item . |
插槽
¥Slots
No slots available for this component.