Skip to content

Label

Last updated 6 Nov 2026

NbLabel is a lightweight label element for associating descriptive text with form controls. Use it standalone or let NbTextInput manage it automatically.

Basic Usage ​

vue
<template>
  <NbLabel for="my-input">Workspace name</NbLabel>
  <input id="my-input" type="text" placeholder="my-workspace" />
</template>

Props ​

PropTypeDefaultDescription
forstringundefinedMaps to the HTML for attribute (links to input)
requiredbooleanfalseAppends a red * asterisk
disabledbooleanfalseReduces opacity
size'sm' | 'md''md'Both render the label type set (12/16 regular)

Slots ​

SlotDescription
defaultThe label text