On this page

Label

Install, props and the parts Label is built from.

Install

Run this in the app, after shadcn-vue init and the Beehexa theme (Button › Code):

npx shadcn-vue@latest add https://beehexa.design/r/label.json

Use

<script setup lang="ts">
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
</script>

<template>
  <Label for="warehouse-name">Warehouse name</Label>
  <Input id="warehouse-name" />
</template>

Props

Prop Values Notes
for string The id of the control it names
as, as-child element, boolean Render as another element (reka-ui)
class string Merged with the Beehexa classes

Built on

The reka-ui Label with the shadcn-vue Label API, from the control-center copy. reka-ui stops a double click on the label from selecting its text. Beehexa sets the type, colour and gap with tokens, and greys the label after a disabled control (peer) or inside a disabled group (data-disabled="true") with color.text.disabled, not opacity.