Account field
Account profile, address book, and account access forms.
- Component
- AccountField
- Classes
- Label + shadcn Input + optional error text
Sample
Internal reference for SENTIENT Custom Leather UI patterns, typography, and components.
The leather site uses two field stacks: shadcn Label + Input for account and checkout flows, and native inputs with React Hook Form on the public contact form. Configurator specification controls use custom selection components.
| Pattern | Value | Used for |
|---|---|---|
| Validation | Zod at the edge | Inquiry uses React Hook Form + zodResolver. Account, checkout, and address forms validate with Zod schemas before API submission. |
| Labels | text-sm font-medium | All labeled fields expose htmlFor/id pairs. Required fields show a destructive asterisk on account and checkout forms. |
| Errors | text-xs text-destructive | Field errors use role="alert", aria-invalid on inputs, and aria-describedby pointing to the error id. |
| Captcha | InvisibleTurnstile | Contact inquiry, account access, and checkout sign-in forms gate submission behind Cloudflare Turnstile when needed. |
| Layout | space-y-4 / space-y-6, sm:grid-cols-2 | Multi-field forms use vertical rhythm; name and contact rows split into two columns from the sm breakpoint. |
| Section header | LeatherSectionHeader + inline help link | Texture, sheen, softness, and thickness controls share one heading component with an optional step number and an inline text link that opens an option comparison dialog. |
| Specification selector | role="radiogroup" of option cards | Texture and sheen render an image + label + description card; softness renders label + description only. All three share the same selected-state treatment. |
| Field surface | White fill (site-wide) | All text inputs, selects, and textareas render on a white surface. Applied via a [data-leather-site] rule in globals.css so the shared shadcn Input/Select (bg-gray-50 elsewhere) and native fields match without forking primitives or affecting other projects. |
Account profile, address book, and account access forms.
Sample
Quote/checkout contact and shipping forms.
Sample
Public contact form on /contact.
Sample
US state dropdown on account addresses and checkout shipping.
Sample
Boolean fields such as the default-address and tax-exempt toggles. Base component for new forms; native checkboxes are being retired.
Sample
Single-choice option lists where each choice is a short label (e.g. shipping speed). Distinct from the visual Specification selector below, which uses thumbnail cards.
Sample
Standard dropdown for future menu-style choices. The US state field currently uses a styled native select; new selects should use this component.
Sample
Two-state on/off control for view or unit switches. Base component for future settings-style toggles.
Sample
Configurator production quantity in hides and square feet.
Sample
Tax exemption certificate upload during checkout.
Sample
PDF, JPG, PNG, or DOC up to 10 MB
Configurator texture, sheen, and softness controls.
Sample
Fields flip to an invalid state the same way everywhere: aria-invalid on the control drives the shadcn destructive treatment, and a small destructive message renders directly below, wired to the input via aria-describedby.
AccountField with an error passed in. aria-invalid draws the destructive border and ring; the message links via aria-describedby.
Enter a valid email address.
QuoteTextField error state, showing the required asterisk beside the label and the destructive message below.
Postal code is required.
The native select inherits the same destructive border and message treatment through aria-invalid.
Select your state.
Contact form fields use a native input with border-destructive and a role=alert message so it is announced live.
Project details are required.
LeatherInquiryForm
/contact
Validation: React Hook Form + leatherInquirySchema
LeatherAccountAccessForm
/account
Validation: Client required fields + auth API
LeatherSignInModal
/quote
Validation: Client required fields + auth API
ProfileSection
/account
Validation: Zod account profile schema
AddressForm
/account
Validation: Zod shipping address schema
PaymentStep
/quote
Validation: Zod billing/shipping schema
LeatherTaxExemptionControl
/quote
Validation: File type and size checks
LeatherQuantityInput
/configurator
Validation: Minimum production hides
LeatherColorPicker
/configurator
Validation: Color selection required before quote
LeatherTextureSelect, LeatherSoftnessSelect, LeatherThicknessSelect
/configurator
Validation: Required before quote