• Introduction
  • Getting Started
  • Vue 2 End of Support
  • Native Components
    • Animation
    • Buttons
    • Chartsupdated
    • Conversational UInew
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gauges
    • Grid
    • Icons
    • Indicators
    • Inputs
    • Labels
    • Layoutupdated
    • ListBox
    • ListView
    • Notification
    • PDF Processing
    • Popup
    • Progress Bars
    • Scheduler
    • ScrollView
    • Tooltip
    • TreeList
    • TreeView
    • Upload
  • Wrapper Components
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • FAQ
  • Troubleshooting
New to Kendo UI for Vue? Start a free 30-day trial

Label Overview

The Label component enables you to provide a label functionality to Vue components. It supports labelling both form elements (e.g.: input element) and custom focusable elements. It can contain Kendo Vue Input components such as Kendo UI for Vue DropDownList and NumericTextBox, or HTML elements like input.

Basic Usage

Add the Label component and the desired editor next to it. Then set the editorId property of the Label and the id property of the editor.

View Source
Change Theme:

Labelling components without form element

By default the target editor is associated with the label element only if it's a form element (e.g.: input, select element). Custom components that do not contain form element (e.g.: Kendo UI for Vue DropDownList) would require setting additional properties to allow screen readers to correcly read the label. These properties are:

  • id property of the Label
  • aria-labelledby attribute of the editor (Kendo UI for Vue components provide it as ariaLabelledBy property)

Additionally you can forward the click events from the Label to the editor by setting the editorId property. On click events the Label component will look for focus method or activeElement property (to call its click method) on the editor ref. This functionality is already supported on all Kendo UI for Vue form components (e.g.: DropDownList).

View Source
Change Theme:

Editors with invalid state

The Label component supports invalid styles by setting the editorValid to false.

View Source
Change Theme:

Marking the Label as optional

The Label component supports marking the label as optional by setting the optional to true.

View Source
Change Theme:

Support and Learning Resources

Additional Resources