@letar/forms

Field Types Overview

All 40+ field components available in @letar/forms

Text Fields

ComponentDescriptionExample
Form.Field.StringSingle-line text inputName, email, URL
Form.Field.TextareaMulti-line text inputDescription, comments
Form.Field.PasswordPassword with visibility toggleLogin forms
Form.Field.MaskedInputInput with format maskPhone, credit card
Form.Field.EditableInline-editable textClick to edit
Form.Field.RichTextRich text editorBlog posts, articles

Number Fields

ComponentDescriptionExample
Form.Field.NumberNumeric input with stepperQuantity, age
Form.Field.SliderRange sliderVolume, rating
Form.Field.CurrencyMoney input with currency symbolPrice, salary
Form.Field.PercentagePercentage input (0-100%)Discount, progress
Form.Field.RatingStar rating inputReviews, feedback

Selection Fields

ComponentDescriptionExample
Form.Field.SelectDropdown selectCategory, status
Form.Field.ComboboxSearchable select with autocompleteUser search
Form.Field.AutocompleteText input with suggestionsCity, tag
Form.Field.ListboxAlways-visible list selectionFilters
Form.Field.RadioGroupRadio button groupGender, plan
Form.Field.RadioCardCard-style radio selectionPricing tier
Form.Field.SegmentedGroupSegmented controlView mode
Form.Field.TagsTag input with autocompleteLabels, skills
Form.Field.NativeSelectNative HTML selectSimple dropdowns
Form.Field.CascadingSelectCascading dependent selectsCountry → City

Boolean Fields

ComponentDescriptionExample
Form.Field.CheckboxStandard checkboxTerms, preferences
Form.Field.SwitchToggle switchEnable/disable
Form.Field.CheckboxCardCard-style checkboxMulti-select options

Date & Time Fields

ComponentDescriptionExample
Form.Field.DateDate pickerBirthday, deadline
Form.Field.DateRangeDate range pickerBooking period
Form.Field.DateTimePickerCombined date + timeEvent scheduling
Form.Field.TimeTime pickerAppointment time
Form.Field.DurationDuration input (hours/minutes)Task duration
Form.Field.ScheduleWeekly schedule gridWorking hours

Specialized Fields

ComponentDescriptionExample
Form.Field.PhonePhone number with maskContact form
Form.Field.AddressAddress autocompleteShipping, billing
Form.Field.CityCity selectorLocation
Form.Field.FileUploadFile upload with previewAvatar, documents
Form.Field.PinInputPIN code inputVerification
Form.Field.OTPInputOne-time password input2FA
Form.Field.ColorPickerColor selectionTheme, branding

Basic Usage

All fields share the same pattern:

<Form schema={Schema} initialValue={data} onSubmit={save}>
  <Form.Field.String name="fieldName" />
</Form>

The field type, label, placeholder, and validation are all derived from the Zod schema. You only need to specify the name prop matching a key in your schema.

Custom Props

Override schema defaults with props:

<Form.Field.String
  name="title"
  label="Custom Label"
  placeholder="Custom placeholder..."
  helperText="Additional guidance"
  required
/>

On this page