SequentialFocus

Primitive #30

🔍 Problem it solves

Complex forms need focus to move in a specific sequence (not DOM order) based on validation or business rules – e.g., after filling a field, focus jumps to the next logical field, skipping optional ones, and staying on errors.

✅ Solution

SequentialFocusManager defines a custom focus order (array of selectors). It provides start(), moveNext(), movePrevious(), and respects conditions to skip steps. This demo uses a manual "Next" button to demonstrate the sequence.

🧩 Used by components

MultiPageForm, PaymentForm, AddressForm, OnboardingWizard

🎮 Interactive demo