Skip to content
Harness Design System Harness Design System Harness Design System

Label

beta

The Label component is a customizable label for form elements. It includes an optional required indicator and follows consistent styling across the design system.

Usage

import { Label } from '@harnessio/ui/components'
// ...
return (
<>
<Label htmlFor="username">Username</Label>
<input id="username" type="text" />
</>
)

Optional

With informer

The Label component supports displaying a tooltip with additional information. Use the informerContent prop to provide the tooltip content, and pass additional configuration via the informerProps prop.

Suffix

API Reference

interface InformerProps extends Omit<TooltipProps, "children"> {
className?: string;
/**
* If disabled, the tooltip will not be shown
*/
disabled?: boolean;
iconProps?: IconPropsV2;
}
Prop
Required
Default
Type
htmlForfalsestring
optionalfalsefalseboolean
classNamefalsestring
childrentrueReactNode
informerContentfalseExclude<ReactNode, boolean | null | undefined>
informerPropsfalseInformerProps
suffixfalseReactNode