Skip to main content

ion-label

scoped

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

DescriptionThe 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.
Attributecolor
Type"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
Defaultundefined

mode

DescriptionThe mode determines which platform styles to use.
Attributemode
Type"ios" | "md"
Defaultundefined

position

DescriptionThe position determines where and how the label behaves inside an item.
Attributeposition
Type"fixed" | "floating" | "stacked" | undefined
Defaultundefined

事件

¥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

NameDescription
--colorColor of the label. This property is only available when using ion-label inside of an ion-item.

插槽

¥Slots

No slots available for this component.