Skip to content

Label

Label is part of the Forms and selection group. Accessible label primitive for form controls.

Terminal window
npx bambiui add label --framework react
Terminal window
npx bambiui add label --framework solid
Terminal window
npx bambiui add label --framework svelte
Terminal window
npx bambiui add label --framework vue
import { 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>
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.

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.

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.

Label

Customize tokens after installing and previewing the component. Relevant tokens include:

  • --bambi-foreground
  • --bambi-muted