# Focus Guard Form

https://fieldbook.lizardi.mx/components/focus-guard-form

Category: Forms
![Still of the Focus Guard Form component, a Fieldbook UI component in Forms.](https://fieldbook.lizardi.mx/thumbs/focus-guard-form.webp)
Preview video: https://ejpqcxcjbiyabxkx.public.blob.vercel-storage.com/previews/focus-guard-form-98ff5da1f4.mp4 (5 s, silent)

Focus Guard Form: A form that, on a failed submit, cancels the submission, moves keyboard focus straight to the first invalid field, and announces the problem for screen reader users.

## Frameworks

react, vue, svelte, astro, html

## Preview controls

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

| Name | Type | Default | Options or constraints |
| --- | --- | --- | --- |
| submitLabel | text | Create account | Up to 24 characters |
| accentColor | color | #7C5CFF | No additional limit in the metadata. |
| requireAll | boolean | true | No additional limit in the metadata. |

## Usage notes

Focus Guard Form uses the card preview frame with a light/dark theme setting.

### Which frameworks are available for Focus Guard Form?

Focus Guard Form is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

### What does Focus Guard Form depend on?

The React metadata lists these npm dependencies beyond React: motion, clsx, tailwind-merge.

### What accessibility details are visible in Focus Guard Form?

The React source for Focus Guard Form includes: native elements (button, label); attributes and handlers (aria-describedby, aria-hidden, aria-invalid, aria-live); explicit roles (status). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

### How does Focus Guard Form handle reduced motion?

Focus Guard Form reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: reduced ? \{ duration: 0 \} : \{ duration: 0.16 \}; reduced ? \{ duration: 0 \} : \{ duration: 0.18 \}; reduced ? \{ duration: 0 \} : \{ duration: 0.22, ease: \[0.2, 0.8, 0.2, 1\] \}. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

## Install through MCP

Connect your client, call get_component to retrieve the implementation, then get_install_command for installation instructions. Choose a listed framework, integrate the returned source and verify it in your application.

```json
{
  "tool": "get_component",
  "arguments": {
    "slug": "focus-guard-form",
    "framework": "react"
  }
}
```

[For agents](https://fieldbook.lizardi.mx/docs/agents)
[MCP](https://fieldbook.lizardi.mx/api/mcp)

## Related open components

- [Tall Code Keypad](https://fieldbook.lizardi.mx/components/tall-code-keypad)
- [Verification Code Card](https://fieldbook.lizardi.mx/components/verification-code-card)
- [Notification preferences](https://fieldbook.lizardi.mx/components/notification-preferences)
- [Release notification form](https://fieldbook.lizardi.mx/components/release-notification-form)
- [Scribble strike checklist](https://fieldbook.lizardi.mx/components/scribble-strike-checklist)
- [Scrub Number Input](https://fieldbook.lizardi.mx/components/scrub-number-input)
