Next.js Forms prompt
Rules that make your coding agent build Next.js 16 forms that post without JavaScript, validate on the server with Zod 4, keep the user's input and announce every error.
What it makes your agent good at
Agents still wire forms with onSubmit and fetch to an API route, call Zod 3's error.flatten(), wipe the user's input when the server says no, and leave errors next to inputs a screen reader never connects. This prompt gives them the Next.js 16 model: a form action backed by an authorized Server Function, errors returned as state, the right cache update after the write, and a form library only when the form earns it.
- Forms that work before JavaScriptA form action backed by a Server Function, pending state from useFormStatus, and no onSubmit plus fetch to an API route.
- Zod 4, not Zod 3One schema shared by form and server, z.flattenError and z.treeifyError, the error param, FormData coercion that handles empty strings.
- Errors as valuesExpected failures returned as typed state with the submitted values, so the form keeps the user's input after React resets it.
- Errors everyone can findaria-invalid and aria-describedby on every control, form messages in a live region, focus on the first invalid field.
- The right refresh after a writeupdateTag for read-your-own-writes, revalidateTag with a profile, redirect last and outside try and catch.
- A form library only when it paysReact Hook Form with zodResolver or TanStack Form with a Standard Schema for field arrays and wizards, wired to shadcn/ui Field.
The Next.js Forms rules
114 lines, current to Next.js 16.4, React 19.3, Zod 4.6, React Hook Form 7 and TanStack Form 1. Last reviewed October 23, 2026. Plain Markdown, no front matter: each agent's is below.
nextjs-forms.md
# Next.js Forms
You are building forms in a Next.js 16 App Router project with React 19, TypeScript and Zod 4. Write code for the versions in `package.json`, not the ones in your training data: Server Functions, `useActionState` and Zod 4's error helpers replace most of the form code you remember.
## Before you write code
Read `node_modules/next/dist/docs/01-app/02-guides/forms.md`, `01-getting-started/07-mutating-data.md` and `02-guides/server-actions.md`. Their Zod snippets still use Zod 3 calls (`error.flatten()`, `invalid_type_error`): translate them as below.
Check `package.json` for `zod` (4.x), `react-hook-form` with `@hookform/resolvers` (5.x reads Zod 4), `@tanstack/react-form`, and the UI kit's field parts (`components/ui/field.tsx`: `Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldSet`, `FieldLegend`). Use what the project has.
Find the project's session and permission helpers (a data access layer, `lib/auth`): every Server Function calls them.
Check `next.config.ts` for `experimental.serverActions` (`bodySizeLimit`, `allowedOrigins`) before adding uploads or a proxy domain.
## Server Functions that validate and return state
Keep the schema in a plain shared module (`lib/schemas/post.ts`) that both the form and the Server Function import. Never export it from the `"use server"` file: such a file may only export async functions (and types).
A Server Function is a public POST endpoint. In each one, in this order: check the session, parse the input, authorize this user for this record, write. Never trust hidden inputs or bound IDs without checking ownership.
Build the input from `FormData` field by field. `Object.fromEntries(formData)` adds `$ACTION_` keys and keeps only the last value of repeated names; use `formData.getAll("tags")` for those.
Return expected failures (validation, a taken email, a failed write) as a typed state. Throw only for bugs; they reach `error.tsx`.
Return the submitted text values with the errors: React resets an uncontrolled form after its action finishes, so the form must re-fill itself from state. Never echo passwords or files back.
// app/posts/actions.ts
"use server";
import { updateTag } from "next/cache";
import { redirect } from "next/navigation";
import { z } from "zod";
import { PostSchema } from "@/lib/schemas/post";
type Fields = keyof z.input<typeof PostSchema>;
export type PostState = {
errors?: Partial<Record<Fields, string[]>>;
message?: string;
values?: Partial<Record<Fields, string>>;
};
export async function createPost(_prev: PostState, formData: FormData): Promise<PostState> {
const user = await requireUser(); // the project's session check
const values = {
body: String(formData.get("body") ?? ""),
title: String(formData.get("title") ?? ""),
};
const parsed = PostSchema.safeParse(values);
if (!parsed.success) {
return { errors: z.flattenError(parsed.error).fieldErrors, values };
}
const post = await db.post.create({ data: { ...parsed.data, authorId: user.id } }).catch(() => null);
if (!post) return { message: "The post could not be saved. Try again.", values };
updateTag("posts");
redirect(`/posts/${post.id}`);
}
## Validation with Zod 4
Use the top-level formats: `z.email()`, `z.url()`, `z.uuid()`; `z.string().email()` is deprecated.
Set messages with `error` or the string shorthand: `z.string().trim().min(1, "Enter a title.")`, `z.string({ error: "Enter a title." })`. `message` is deprecated; `invalid_type_error`, `required_error` and `errorMap` no longer exist.
FormData holds strings, `File`s or `null`. Use `z.coerce.number()` for numbers but guard the empty string, which coerces to 0: `z.string().min(1, "Enter an amount.").pipe(z.coerce.number<string>().positive())` (the type argument lets `pipe` accept it). Checkboxes send `"on"` when checked and nothing otherwise: read `formData.has("terms")`, or parse the string with `z.stringbool()`.
Read errors with `z.flattenError(error).fieldErrors` for flat forms and `z.treeifyError(error)` for nested objects and arrays; `z.prettifyError(error)` is for logs. `error.flatten()` and `error.format()` are deprecated.
Use `safeParseAsync` when a refinement is async (a uniqueness check). Type form values with `z.input<typeof Schema>` and parsed data with `z.output<typeof Schema>` when coercion or defaults make them differ.
Client-side checks are a courtesy; the server parse is the only one that counts. Keep native constraints (`required`, `type="email"`, `minLength`) that match the schema.
## The form component
Render `<form action={formAction}>` with a `name` on every control. It submits before hydration and without JavaScript; do not swap it for `onSubmit` plus `fetch`.
`const [state, formAction, isPending] = useActionState(createPost, initialState)` with `initialState` declared outside the component. With extra arguments, `createPost.bind(null, id)` makes the signature `(id, prevState, formData)`.
Put the submit button in its own component that calls `useFormStatus()` from `react-dom`: it reads the parent form only, so it must render inside the `<form>`. Disable it while `pending` and keep its label.
Re-fill fields with `defaultValue={state.values?.title}`. Use controlled inputs only when the UI needs the value while typing.
Wire each error to its control: `aria-invalid` on the input, `aria-describedby` pointing at the error's id (with `useId()`), the error text in `FieldError`. Mark the wrapper `data-invalid` (or the kit's `invalid` prop) for styles. Show form-level messages (`state.message`) in an element with `role="status"` or `aria-live="polite"`.
After a failed submit, move focus to the first invalid field from an effect on `state`, so keyboard and screen reader users land on the problem.
With Base UI, pass `fieldErrors` to `<Form errors={…}>` and name each `Field.Root`; with React Aria, to `<Form validationErrors={…}>`. Both wire the ARIA for you.
A form that needs no returned state can stay in a Server Component with an inline `"use server"` function; add a client component only for errors and pending UI.
## After a write
`updateTag(tag)` when the user must see their own change on the next screen (Server Functions only). `revalidateTag(tag, "max")` for stale-while-revalidate elsewhere: the second argument is required. `revalidatePath("/posts")` when the data is not tagged, `refresh()` to re-render the current route without invalidating cached data.
`redirect()` last, outside any `try`/`catch`: it throws a control-flow error. If a `catch` must wrap it, call `unstable_rethrow(error)` (from `next/navigation`) first in the `catch`.
Show success that stays on the page (a toast, an inline status) from the returned state, not from a client-side guess.
## Optimistic updates
`useOptimistic(serverItems, reducer)` for lists and toggles that should change at once. Call its setter inside the form action or a `startTransition`; React warns when it runs outside one.
Keep the server's data as the source: the optimistic value drops when the action settles and the refreshed props arrive. Return an error in state and show it when the write fails, so the revert is explained.
## Files and search forms
Uploads use `<input type="file" name="avatar" accept="image/*">` in a normal `<form action>`; React sets the encoding. On the server, validate the `File` with `z.file().max(5_000_000).mime(["image/png", "image/jpeg"])`. An empty file input still sends a `File` with `size` 0: treat that as no file.
Server Action bodies are capped at 1 MB. Raise `experimental.serverActions.bodySizeLimit` (for example `"6mb"`, leaving room for multipart overhead) only as far as needed. For large or many files, upload straight to storage with a presigned URL and send only the key to the Server Function.
A search or filter form is a GET navigation, not a mutation: use `next/form`'s `<Form action="/search">` with `<input name="q">`. It prefetches the target and navigates on the client. Read the query from `searchParams` (a promise) on the page.
## When a client form library earns its place
Reach for one only for field arrays, fields that depend on each other, validation on every keystroke across many fields, multi-step wizards, or controlled third-party inputs. The Server Function still parses with the same schema and returns errors.
React Hook Form 7: `useForm({ resolver: zodResolver(Schema), defaultValues })` from `@hookform/resolvers/zod` infers input and output types; don't pass generics that fight it. Use `register` for native inputs and `<Controller render={({ field, fieldState }) => …}>` for the kit's Select, Checkbox or Combobox. In `handleSubmit`, call the Server Function inside `startTransition`, then map its errors back with `form.setError(name, { message })`.
TanStack Form 1: `useForm({ defaultValues, validators: { onChange: Schema }, onSubmit: async ({ value }) => … })` takes a Zod schema directly (Standard Schema), no adapter. Render `<form.Field name="email">{(field) => …}</form.Field>` with `field.state.value`, `field.handleChange` and `field.handleBlur`; pass `field.state.meta.errors` to `<FieldError errors={…}>` and treat the field as invalid when `isTouched && !isValid`. Submit with `e.preventDefault(); form.handleSubmit()`.
These forms need JavaScript. Say so when you choose one for a public form.
## Do not
Do not use `useFormState` from `react-dom` (renamed `useActionState`, in `react`), Zod 3 error APIs, or `z.string().email()`.
Do not create an API route for your own form, or post with `fetch` from `onSubmit` when a `<form action>` works.
Do not call `redirect()` inside `try`, or return `undefined` from an action whose state the form reads.
Do not validate only on the client, skip the auth check because the page is protected, or trust a hidden `userId`.
Do not put `useFormStatus` in the component that renders the `<form>`, or mark a field `disabled` when its value must be sent (disabled controls are left out of FormData; use `readOnly`).
Do not show errors by color alone, or render them without linking them to the input.
Do not call `revalidateTag` with one argument, or call `updateTag` from a Route Handler.
## Before you finish
Run the type checker and linter, and fix what they report.
Submit each form with JavaScript disabled once: it must still post, show server errors and keep the typed values.
Submit invalid input and check that every error is announced, linked by `aria-describedby`, and that focus lands on the first invalid field.
Call the Server Function as another user (or signed out) and confirm it refuses.
Confirm the page shows the new data after the write without a manual reload, and that uploads over the limit fail with a message, not a crash.
10,833 characters, 1,561 words. Under Windsurf's 12,000-character limit for a rule, as every prompt here is.
Use it in your agent
The same rules, where your agent reads them. Each file has the front matter its agent needs, set to load when the task fits.
Claude Code
A rule it loads every session
- Save it as
.claude/rules/nextjs-forms.mdin your project, front matter included, or run the install command. - Claude Code loads every file in
.claude/ruleswith yourCLAUDE.mdwhen a session starts. - Prefer one file? Paste it into
CLAUDE.mdunder its own heading instead.
.claude/rules/nextjs-forms.md
# Next.js FormsYou are building forms in a Next.js 16 App Router project with React 19, TypeScript and Zod 4. Write code for the versions in `package.json`, not the ones in your training data: Server Functions, `useActionState` and Zod 4's error helpers replace most of the form code you remember.## Before you write code- Read `node_modules/next/dist/docs/01-app/02-guides/forms.md`, `01-getting-started/07-mutating-data.md` and `02-guides/server-actions.md`. Their Zod snippets still use Zod 3 calls (`error.flatten()`, `invalid_type_error`): translate them as below.- Check `package.json` for `zod` (4.x), `react-hook-form` with `@hookform/resolvers` (5.x reads Zod 4), `@tanstack/react-form`, and the UI kit's field parts (`components/ui/field.tsx`: `Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldSet`, `FieldLegend`). Use what the project has.- Find the project's session and permission helpers (a data access layer, `lib/auth`): every Server Function calls them.- Check `next.config.ts` for `experimental.serverActions` (`bodySizeLimit`, `allowedOrigins`) before adding uploads or a proxy domain.## Server Functions that validate and return state…
Or let the shadcn CLI write this file: sign in (free) for your command.
Cursor
A project rule with front matter
- Save it as
.cursor/rules/nextjs-forms.mdc, front matter included, or run the install command. - Cursor attaches it when you work on matching files, or when the task fits its description.
- Check it under Cursor Settings, Rules, then commit the folder for your team.
.cursor/rules/nextjs-forms.mdc
---description: "Building or changing forms in Next.js 16: Server Functions, useActionState, Zod 4 validation, field errors, uploads and form libraries."alwaysApply: false---# Next.js FormsYou are building forms in a Next.js 16 App Router project with React 19, TypeScript and Zod 4. Write code for the versions in `package.json`, not the ones in your training data: Server Functions, `useActionState` and Zod 4's error helpers replace most of the form code you remember.## Before you write code- Read `node_modules/next/dist/docs/01-app/02-guides/forms.md`, `01-getting-started/07-mutating-data.md` and `02-guides/server-actions.md`. Their Zod snippets still use Zod 3 calls (`error.flatten()`, `invalid_type_error`): translate them as below.- Check `package.json` for `zod` (4.x), `react-hook-form` with `@hookform/resolvers` (5.x reads Zod 4), `@tanstack/react-form`, and the UI kit's field parts (`components/ui/field.tsx`: `Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldSet`, `FieldLegend`). Use what the project has.- Find the project's session and permission helpers (a data access layer, `lib/auth`): every Server Function calls them.- Check `next.config.ts` for `experimental.serverActions` (`bodySizeLimit`, `allowedOrigins`) before adding uploads or a proxy domain.## Server Functions that validate and return state…
Or let the shadcn CLI write this file: sign in (free) for your command.
Windsurf
A workspace rule for Cascade
- Save it as
.windsurf/rules/nextjs-forms.md, or run the install command. trigger: model_decisionlets Cascade pull it in when the task fits its description.- Windsurf reads up to 12,000 characters per rule; this one is 10,833.
.windsurf/rules/nextjs-forms.md
---trigger: model_decisiondescription: "Building or changing forms in Next.js 16: Server Functions, useActionState, Zod 4 validation, field errors, uploads and form libraries."---# Next.js FormsYou are building forms in a Next.js 16 App Router project with React 19, TypeScript and Zod 4. Write code for the versions in `package.json`, not the ones in your training data: Server Functions, `useActionState` and Zod 4's error helpers replace most of the form code you remember.## Before you write code- Read `node_modules/next/dist/docs/01-app/02-guides/forms.md`, `01-getting-started/07-mutating-data.md` and `02-guides/server-actions.md`. Their Zod snippets still use Zod 3 calls (`error.flatten()`, `invalid_type_error`): translate them as below.- Check `package.json` for `zod` (4.x), `react-hook-form` with `@hookform/resolvers` (5.x reads Zod 4), `@tanstack/react-form`, and the UI kit's field parts (`components/ui/field.tsx`: `Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldSet`, `FieldLegend`). Use what the project has.- Find the project's session and permission helpers (a data access layer, `lib/auth`): every Server Function calls them.- Check `next.config.ts` for `experimental.serverActions` (`bodySizeLimit`, `allowedOrigins`) before adding uploads or a proxy domain.## Server Functions that validate and return state…
Or let the shadcn CLI write this file: sign in (free) for your command.
GitHub Copilot
Instructions for the repository
- Save it as
.github/instructions/nextjs-forms.instructions.md, or run the install command. applyTo: "**"applies it to every request in this repository.- Or paste it into
.github/copilot-instructions.md, which Copilot reads for every request.
.github/instructions/nextjs-forms.instructions.md
---description: "Building or changing forms in Next.js 16: Server Functions, useActionState, Zod 4 validation, field errors, uploads and form libraries."applyTo: "**"---# Next.js FormsYou are building forms in a Next.js 16 App Router project with React 19, TypeScript and Zod 4. Write code for the versions in `package.json`, not the ones in your training data: Server Functions, `useActionState` and Zod 4's error helpers replace most of the form code you remember.## Before you write code- Read `node_modules/next/dist/docs/01-app/02-guides/forms.md`, `01-getting-started/07-mutating-data.md` and `02-guides/server-actions.md`. Their Zod snippets still use Zod 3 calls (`error.flatten()`, `invalid_type_error`): translate them as below.- Check `package.json` for `zod` (4.x), `react-hook-form` with `@hookform/resolvers` (5.x reads Zod 4), `@tanstack/react-form`, and the UI kit's field parts (`components/ui/field.tsx`: `Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldSet`, `FieldLegend`). Use what the project has.- Find the project's session and permission helpers (a data access layer, `lib/auth`): every Server Function calls them.- Check `next.config.ts` for `experimental.serverActions` (`bodySizeLimit`, `allowedOrigins`) before adding uploads or a proxy domain.## Server Functions that validate and return state…
Or let the shadcn CLI write this file: sign in (free) for your command.
Codex & AGENTS.md
The file most agents read
- Paste it into
AGENTS.mdat your project's root, under its own heading. - Codex reads
AGENTS.mdbefore it starts work, and so do Cursor, Zed, Jules, Amp and Copilot's coding agent. - A folder can have its own
AGENTS.md: the one closest to the file being edited wins.
AGENTS.md
## Next.js FormsYou are building forms in a Next.js 16 App Router project with React 19, TypeScript and Zod 4. Write code for the versions in `package.json`, not the ones in your training data: Server Functions, `useActionState` and Zod 4's error helpers replace most of the form code you remember.### Before you write code- Read `node_modules/next/dist/docs/01-app/02-guides/forms.md`, `01-getting-started/07-mutating-data.md` and `02-guides/server-actions.md`. Their Zod snippets still use Zod 3 calls (`error.flatten()`, `invalid_type_error`): translate them as below.- Check `package.json` for `zod` (4.x), `react-hook-form` with `@hookform/resolvers` (5.x reads Zod 4), `@tanstack/react-form`, and the UI kit's field parts (`components/ui/field.tsx`: `Field`, `FieldLabel`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldSet`, `FieldLegend`). Use what the project has.- Find the project's session and permission helpers (a data access layer, `lib/auth`): every Server Function calls them.- Check `next.config.ts` for `experimental.serverActions` (`bodySizeLimit`, `allowedOrigins`) before adding uploads or a proxy domain.### Server Functions that validate and return state…
AGENTS.md is shared with your own instructions, so paste the rules in: the copy sets their headings a level down.
Rules teach it. The MCP equips it. With Pro, your agent installs every component, block and icon it needs, from a prompt.
Get ProMore prompts
Prompts that pair with this one. Each is short enough to sit beside the others.
Pricing
Give your agent the parts, with Pro
The prompts are free. Every Pro plan adds the MCP server, so your agent installs the components, blocks and icons it writes code around.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
Billing
Billed once a year in USD. Cancel anytime.
- How many people can use the license.
- Client work, SaaS products and anything you charge for.
- Page sections in 56 categories, from heroes and pricing tables to dashboards and settings, on every framework and UI library, in your theme.
- Complete Next.js sites for startups, SaaS, agencies and portfolios, every page designed, ready to ship.
- Your AI agent searches, previews and installs any component, block, icon or DESIGN.md from a prompt: 22 tools in Claude Code, Cursor, VS Code and 35 more clients.
- Buttons with motion and states of their own, from an arrow that slides in to a burst of confetti.
- Typewriters, scrambles, counters and more, for headlines, labels and numbers.
- Animated backgrounds for heroes, sections and cards, from a soft aurora to a flock that flees the cursor. Most are pure CSS.
- WebGPU shaders, from a slow aurora to a black hole, each drawing only while it's on screen.
- One design and one theme on all four: the components, blocks and effects are built for each framework.
- React on Base UI, Radix UI, React Aria or Ark UI: install the version for the library your project already uses. Vue, Svelte and Solid run on Ark UI.
- From a button to a date picker, a color picker or a guided tour: accessible, typed in TypeScript, each with live demos.
- Real-world patterns built from the components, in 53 galleries: forms, tables, menus, dialogs and more.
- Area, bar, line, pie, radar and radial charts on TanStack Charts, on every framework. React also gets the Recharts originals.
- Debounce, local storage, media queries and more: each hook is one typed file you own.
- From 222 libraries, Lucide, Heroicons, Tabler and Material Symbols among them, as SVG or a React component in one command.
- Stripe, Linear, Apple and 497 more: a brand's colors, typography and components in one file your AI agent builds from.
- Restyle every component and block at once: 8 styles, 7 grays, 18 colors and 5 radii, shared as a shadcn preset code.
- Priority requests are answered first.
Individual
For personal projects & open source
$32instead of $49/mo
$389 billed yearly
- Seats: 1 seat
- Commercial use: Personal & open source only
- Blocks: All 6,181 blocks
- Templates: All 14 templates
- MCP server: 38 AI clients
- Animated buttons: All 35 buttons
- Text effects: All 97 effects
- Backgrounds: All 100 backgrounds
- Shaders: All 100 shaders
- Frameworks: React, Vue, Svelte, Solid
- UI libraries: Base UI, Radix, Aria, Ark
- Components: All 174 components
- Examples: All 1,103 examples
- Charts: All 70 charts
- React hooks: All 35 hooks
- Icons: 294k+ icons
- DESIGN.md files: All 500 brands
- Theme builder: 8 styles × 18 colors
- Support: Standard
Team
Most popularFor freelancers, agencies & startups
$66instead of $99/mo
$789 billed yearly · ≈ $13/dev/mo
- Seats: Up to 5 seats
- Commercial use: Included
- Blocks: All 6,181 blocks
- Templates: All 14 templates
- MCP server: 38 AI clients
- Animated buttons: All 35 buttons
- Text effects: All 97 effects
- Backgrounds: All 100 backgrounds
- Shaders: All 100 shaders
- Frameworks: React, Vue, Svelte, Solid
- UI libraries: Base UI, Radix, Aria, Ark
- Components: All 174 components
- Examples: All 1,103 examples
- Charts: All 70 charts
- React hooks: All 35 hooks
- Icons: 294k+ icons
- DESIGN.md files: All 500 brands
- Theme builder: 8 styles × 18 colors
- Support: Priority
Organization
For companies with larger teams
$132instead of $199/mo
$1,589 billed yearly
- Seats: Unlimited seats
- Commercial use: Included
- Blocks: All 6,181 blocks
- Templates: All 14 templates
- MCP server: 38 AI clients
- Animated buttons: All 35 buttons
- Text effects: All 97 effects
- Backgrounds: All 100 backgrounds
- Shaders: All 100 shaders
- Frameworks: React, Vue, Svelte, Solid
- UI libraries: Base UI, Radix, Aria, Ark
- Components: All 174 components
- Examples: All 1,103 examples
- Charts: All 70 charts
- React hooks: All 35 hooks
- Icons: 294k+ icons
- DESIGN.md files: All 500 brands
- Theme builder: 8 styles × 18 colors
- Support: Priority
Billed once a year in USD. Cancel anytime.
Individual
For personal projects & open source
$32instead of $49/mo
$389 billed yearly
- How many people can use the license.Seats: 1 seat
- Client work, SaaS products and anything you charge for.Commercial use: Personal & open source only
- Page sections in 56 categories, from heroes and pricing tables to dashboards and settings, on every framework and UI library, in your theme.Blocks: All 6,181 blocks
- Complete Next.js sites for startups, SaaS, agencies and portfolios, every page designed, ready to ship.Templates: All 14 templates
- Your AI agent searches, previews and installs any component, block, icon or DESIGN.md from a prompt: 22 tools in Claude Code, Cursor, VS Code and 35 more clients.MCP server: 38 AI clients
- Buttons with motion and states of their own, from an arrow that slides in to a burst of confetti.Animated buttons: All 35 buttons
- Typewriters, scrambles, counters and more, for headlines, labels and numbers.Text effects: All 97 effects
- Animated backgrounds for heroes, sections and cards, from a soft aurora to a flock that flees the cursor. Most are pure CSS.Backgrounds: All 100 backgrounds
- WebGPU shaders, from a slow aurora to a black hole, each drawing only while it's on screen.Shaders: All 100 shaders
- One design and one theme on all four: the components, blocks and effects are built for each framework.Frameworks: React, Vue, Svelte, Solid
- React on Base UI, Radix UI, React Aria or Ark UI: install the version for the library your project already uses. Vue, Svelte and Solid run on Ark UI.UI libraries: Base UI, Radix, Aria, Ark
- From a button to a date picker, a color picker or a guided tour: accessible, typed in TypeScript, each with live demos.Components: All 174 components
- Real-world patterns built from the components, in 53 galleries: forms, tables, menus, dialogs and more.Examples: All 1,103 examples
- Area, bar, line, pie, radar and radial charts on TanStack Charts, on every framework. React also gets the Recharts originals.Charts: All 70 charts
- Debounce, local storage, media queries and more: each hook is one typed file you own.React hooks: All 35 hooks
- From 222 libraries, Lucide, Heroicons, Tabler and Material Symbols among them, as SVG or a React component in one command.Icons: 294k+ icons
- Stripe, Linear, Apple and 497 more: a brand's colors, typography and components in one file your AI agent builds from.DESIGN.md files: All 500 brands
- Restyle every component and block at once: 8 styles, 7 grays, 18 colors and 5 radii, shared as a shadcn preset code.Theme builder: 8 styles × 18 colors
- Priority requests are answered first.Support: Standard
Team
Most popularFor freelancers, agencies & startups
$66instead of $99/mo
$789 billed yearly · ≈ $13/dev/mo
Everything in Individual, plus
- How many people can use the license.Seats: Up to 5 seats
- Client work, SaaS products and anything you charge for.Commercial use: Included
- Priority requests are answered first.Support: Priority
Organization
For companies with larger teams
$132instead of $199/mo
$1,589 billed yearly
Everything in Team, plus
- How many people can use the license.Seats: Unlimited seats
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
Next.js Forms prompt FAQ
What the Next.js Forms prompt covers and how to use it in your agent.
When does the prompt use React Hook Form instead of Server Actions alone?
Does the Next.js Forms prompt support TanStack Form?
Do the Next.js Forms rules work with shadcn/ui Field components?
Does the Next.js Forms prompt use useActionState or useFormState?
How does the agent refresh data after a form submits in Next.js 16?
How does the Next.js Forms prompt handle file uploads?
Does the Next.js Forms prompt cover optimistic updates?
What does the agent use for search forms in Next.js?
How does the Next.js Forms prompt validate with Zod 4?
Should Next.js form validation run on the client, the server or both?
Why does a Next.js form lose what the user typed after a server error?
How does the Next.js Forms prompt make field errors accessible?
How do I add the Next.js Forms prompt to Claude Code?
How do I use the Next.js Forms prompt as a Cursor rule?
Does the Next.js Forms prompt fit in a Windsurf rule?
Can GitHub Copilot and Codex use the Next.js Forms prompt?
Can I edit the Next.js Forms prompt for my project?
4.9 out of 5 from 150+ developers
Rules teach it. The MCP equips it.
Every component, block and icon, installed by your AI agent on your stack. The prompts stay free.
- Cancel anytime
- Keep what you've shipped