Components
Form: Search navigation
A string action submits named fields as URL search parameters and enables framework navigation. A function action is a mutation-oriented React form path in the App Router, with separate server authorization requirements. Use GET-style search for shareable non-sensitive filters, never secrets. Example context: Next.js 16.x documentation lane; illustrative snippet or file tree, not executed. Exact candidate patch 16.4.6 remains unverified. Expected behavior / verification: Submitting moss should navigate to /catalog?q=moss. Check keyboard submission, empty values and browser back; validate query fields on the target page.
Formal Syntax & Structure
nextjs syntaxnextjs
import Form from "next/form"; <Form action="/catalog">...</Form>Working Example
Example Snippetnextjs
import Form from 'next/form';export default function Search() { return <Form action="/catalog"><label htmlFor="q">Search books</label><input id="q" name="q"/><button>Search</button></Form>;}