Getting Started
App Providerglobal.d.tsThemesTypes
cn(...args)Text ParserUnits Converters
AnchorAvatarBreadcrumbBurgerButtonCardCarouselCheckerCodeColor PickerCommandConfettiCopyButtonDouble Helix WordsFloating IndicatorGroupHighlight TextIndicatorInputKbdLabelLoaderPaginationPassword RequirementPolymorphic SlotProgressProseRatingRunning AreaScroll AreaSheetsSkeletonSliderStackSvgTableTabsTextareaTimelineTimesToasterTooltipTyping WordsTypography
useClickOutsideuseClipboarduseDeviceInfouseDialoguseDidUpdateuseDirectionuseDisclosureuseDocumentTitleuseDocumentVisibilityuseElementInfouseEyeDropperuseFetchuseFullscreenuseGeoLocationuseHotkeysuseHoveruseIduseImagePopupuseInputStateuseIntersectionuseIntervaluseIsomorphicEffectuseListStateuseLocalStorageuseMeasureScrollbaruseMediaQueryuseMergedRefuseMouseuseMoveuseMutationObserveruseNetworkuseOpenStateuseOrientationuseOSusePaginationusePWAInstalleruseRandomColorsuseReducedMotionuseReloaduseResizeObserveruseScrollIntoViewuseStateHistoryuseTimeoutuseTouchuseTriggeruseUncontrolleduseValidatedStateuseViewportSizeuseWindowEventuseWindowScroll
Docs
Web
Components
Label
Kbd

A stylized component that displays keyboard keys for user instructions or guides.

Loader

A loading indicator component used to show that content or data is being loaded or processed.


Edit this page on GitHub
  • Started
  • Utilities
  • Configuration
  • Components
  • Hooks
  • Examples
  • Github
  • Contributing
⌘+J

© 2025 oeri rights MIT


Designed in Earth-616

Built by oeri

Label

A component that tags and describes form elements, ensuring accessibility and clear UI semantics.

Usage

Basic usage example to quickly see how the Label works.

import { Input } from "@/ui/input";
import { Label } from "@/ui/label";

export function LabelDemo() {
  return (
    <div className="flex items-center space-x-2">
      <Input id="terms" type="checkbox" />
      <Label htmlFor="terms">Accept terms and conditions</Label>
    </div>
  );
}

Peer Dependencies

Install required dependencies before using the Label. These libraries handle the low-level mechanics to ensure features.

pnpm add @radix-ui/react-label
npm install @radix-ui/react-label
yarn add @radix-ui/react-label
bun add @radix-ui/react-label

API References

Styles API

Styles APITypeDefaultAnnotation
unstyled?booleanfalseif true, all default styles will be removed

Props API

Props APITypeDefaultAnnotation
-?-~--

Source Codes

Full working code example, including necessary markup and styles. You can copy and paste this code directly to start using the component immediately.

label.tsx