FormsFormStatus

Open in Create
Search
astronomic.dev

FormStatus

Free

For the line that says whether a form sent, read out by screen readers. Form uses it for you.

File
FormStatus.astro
Group
Forms
Kind
Static: no JavaScript
Examples
1
import FormStatus from "@astronomic-dev/ui/components/FormStatus.astro";

Examples

Drag the orange handle to set the width. Frames get real breakpoints.

  • Static
  • Interactive
  • Framed

Inside a Form

Form renders one FormStatus beside its button for you, with the texts from its own props. It is empty on load and takes no room; with enhance="fetch", Form's script writes the text and sets data-state (sending, success, error), which the colors read. This form posts to #, so the status stays empty.

The FormStatus sits beside the button. It is empty, and takes no room, until Form's script writes to it, so this plain form shows none.

Force state
main.astro
Minimal · Light

Waitlist

Be first in line

Join the waitlist and we'll email you the moment it's out.

You'll also get our newsletter: new themes, plugins and guides. Unsubscribe any time.