Label
Label is part of the Forms and selection group. Accessible label primitive for form controls.
Installation
Section titled “Installation”npx bambiui add label --framework reactnpx bambiui add label --framework solidnpx bambiui add label --framework sveltenpx bambiui add label --framework vueimport { Label } from "@/components/ui/label";
export function Example() { return <Label />;}import { Label } from "~/components/ui/label";
export function Example() { return <Label />;}<script lang="ts"> import { Label } from "$lib/components/ui/label";</script>
<Label /><script setup lang="ts">import { Label } from "@/components/ui/label";</script>
<template> <Label /></template>Preview
Section titled “Preview”
Label preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.
Behavior
Section titled “Behavior”Use with inputs, textareas, checkboxes, switches, radio groups, selects, and comboboxes.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Label. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”LabelTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-foreground--bambi-muted