• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputs
    • 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
    • PivotGrid
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • ToolBar
    • Tooltips
    • TreeList
    • TreeViewupdated
    • 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

Label Directive

The Label directive can associates a focusable Angular components and HTML elements with a <label> HTML tag by using the for property binding.

To associate a component using Label directive set the [for] property binding:

  • to a template reference variable:

    <label [for]="datepicker">DatePicker: </label>
    <kendo-datepicker #datepicker></kendo-datepicker>
  • to an id HTML string value:

    <label for="input">Input: </label>
    <input id="input" />

The following example demonstrates both approaches in action.

Example
View Source
Change Theme:

In this article

Not finding the help you need?