New to Kendo UI for AngularStart a free 30-day trial

Represents the Kendo UI Label component for Angular.

Use the LabelComponent to associate a label with input elements or components.

Definition

Package:@progress/kendo-angular-label

Selector:kendo-label

Export Name:Accessible in templates as #kendoLabelInstance="kendoLabel"

Syntax:

html
<kendo-label [for]="input" text="First name">
  <kendo-textbox #input></kendo-textbox>
</kendo-label>

Inputs

for

any

Associates the label with a component by a template reference or with an HTML element by id.

Sets the CSS classes for the label element. Accepts values supported by the ngClass directive.

Sets the CSS styles for the label element. Accepts values supported by the ngStyle directive.

optional

boolean

Marks a form field as optional. When enabled, the label displays the Optional text by default. You can customize the text by providing a custom message. (See example).

Default:

false

text

string

Sets the text content of the Label. Use this property to describe the input.