Field

A component that provides structure for form fields, handling label placement, validation messages, descriptions, and consistent spacing across forms.

class-variance-authority

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/field.json

Examples


Choice card and Slider


API Reference

FieldLegend

PropTypeDefault
variantlegend,labellegend

Field

PropTypeDefault
orientationvertical,horizontal,responsivevertical

FieldLabel

PropTypeDefault
asChildbooleanfalse

FieldError

PropTypeDefault
errorsArray<{ message?: string } | undefined>-