• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filter
    • Gantt
    • Gauges
    • Gridupdated
    • Icons
    • Indicators
    • Inputsupdated
    • Labels
    • Layout
    • ListBox
    • ListView
    • Map
    • Menus
    • Navigation
    • Notification
    • Pager
    • PDF Export
    • PDFViewer
    • PivotGridupdated
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • ToolBar
    • Tooltips
    • TreeList
    • TreeView
    • Typography
    • Uploads
    • Utilities
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs
New to Kendo UI for Angular? Start a free 30-day trial

LabelDirective

Represents the Kendo UI Label directive for Angular. The Label associates a focusable Angular component or an HTML element with a label tag by using the [for] property binding.

To associate a component by using the label element, either:

  • Set the [for] property binding to a

template reference variable, or

  • Set the [for] property binding to an id HTML string value.
@Component({
selector: 'my-app',
template: `
 <div class="row example-wrapper" style="min-height: 450px;">
   <div class="col-xs-12 col-md-6 example-col">
     <label [for]="datepicker">DatePicker: </label>
     <kendo-datepicker #datepicker></kendo-datepicker>
   </div>

   <div class="col-xs-12 col-md-6 example-col">
     <label for="input">Input: </label>
     <input id="input" />
   </div>
 </div>
`
})
class AppComponent { }

Selector

label[for]

Inputs

NameTypeDefaultDescription

for

string | { focus: Function; }

Sets the focusable target to either of the following options (see example):

In this article

Not finding the help you need?