Label
Label names a form control. Set htmlFor to the control's id so a click on the label focuses or toggles the control. Inside a Field, use FieldLabel.
This example also needs: Input.
Installation
Run npx nxds-cli@latest init first if nxds isn’t set up in your app yet. See Install.
Usage
Examples
Disabled
Dim the label when the checkbox placed before it is disabled.
This example also needs: Checkbox.
Props
Label
Label adds no props of its own; it accepts the props of the element or primitive it wraps.
Label names a form control. Set for to the control's id so a click on the label focuses or toggles the control. Inside a Field, use FieldLabel.
This example also needs: Input.
Installation
Install the following dependencies:
Copy and paste the following code into your project.
components/label/Label.vue components/label/index.ts Keep each file at the path shown above it.
Paths are relative to
packages/vue/src/. Keep the same folders under your@/root, and the imports between files work without edits.
Usage
Examples
Disabled
Dim the label when the checkbox placed before it is disabled.
This example also needs: Checkbox.
Props
Label
Label adds no props of its own; it accepts the props of the element or primitive it wraps.