feat: improve form usability with auto-focus, character limits, and unsaved changes warnings for better user experience

This commit is contained in:
Usman Baig
2026-02-22 20:02:50 +01:00
parent 5d234b30d6
commit da0366603e
6 changed files with 96 additions and 2 deletions

View File

@@ -191,6 +191,8 @@ export default function NewSitePage() {
<Input
id="name"
required
autoFocus
maxLength={255}
value={formData.name}
onChange={(e) => setFormData({ ...formData, name: e.target.value })}
placeholder="My Website"
@@ -204,6 +206,7 @@ export default function NewSitePage() {
<Input
id="domain"
required
maxLength={253}
value={formData.domain}
onChange={(e) => setFormData({ ...formData, domain: e.target.value.toLowerCase().trim() })}
placeholder="example.com"