Shadcn.io is not affiliated with official shadcn/ui
Form Required Optional
A form showing the pattern for required versus optional fields with asterisks and labels.
Scroll to load preview
Clear visual distinction between required and optional form fields using asterisks and helper text. Helps users understand which information is mandatory before they start filling out the form.
Related Components
Validation Inline
Inline field validation messages
Validation Summary
Error summary banner with inline errors
Validation Realtime
Live validation as users type
Field Hints
Field hints and helper text patterns
Disabled Fields
Disabled field states across input types
Readonly Fields
Read-only non-editable field display
FAQ
Last updated on March 24, 2026
Was this page helpful?
Sign in to leave feedback.