New to KendoReact? Learn about KendoReact Free.
Marking the Label as optional
You can indicate that a form field is optional by setting the optional
property of the Label. When set to true
, the Label automatically renders an additional (Optional) text within its contents.
The following example demonstrates the optional Label in action.
Change Theme
Theme
Loading ...
You can customize the default optional content through custom messages the same way you can provide localization of the messages. You can set custom optional message by providing a value for the labels.optional
message key in the messages object provided to the loadMessages
function from the internalization package and wrapping the component in a Localization.Provider
. For further information and an example refer to Labels Globalization article.