FieldLabel is a fundamental component for form field labels in Arkyn. It provides clear identification, supports indicating required fields with an asterisk, and maintains visual and semantic consistency throughout the application.FieldLabel should not be used with native components in @arkyn/components, as these already have the FieldLabel integrated internally.tsx
import { FieldLabel } from "@arkyn/components";
tsx
<FieldLabel htmlFor="username">Username</FieldLabel>
tsx
<FieldLabel htmlFor="email" showAsterisk></FieldLabel>
showAsterisk - boolean (default: false)
Defines whether to display the asterisk (*) to indicate a required field.htmlFor - string
ID of the input element associated with the label (important for accessibility).children - ReactNode
Label content (text, icons, additional elements).className - string
Additional CSS classes for custom styling.label element properties, including
onClick, onFocus, style, data-, aria-, etc.<label> element for maximum accessibilityhtmlFor to connect to the corresponding input