# @taylordb/forms-ui
Type: shared React runtime package (React 18+)

## Overview

Shared runtime, answer inputs, autosave helpers, locales, themes, testing
helpers, and Vite tooling for TaylorDB forms.

This package does not export a concrete renderer shell. Import `Form`,
`Question`, `Title`, `WelcomeScreen`, and other presentation components from a
renderer package:

- `@taylordb/forms-ui-typeform` - Typeform-style one-step renderer.
- `@taylordb/forms-ui-googleform` - Google Forms-style paged renderer.

Renderer packages re-export this package, so shared inputs and helpers are
available from the renderer import too.

For TaylorDB-backed apps, also use `@taylordb/forms-taylordb` to define the
shared schema and server actions, then pass `form.sharedSteps` into a renderer
`<Form>`. See `../taylordb/docs/api.md#client-ui`.

Validation comes from `form.sharedSteps`: `defineForm` in forms-core attaches
built-in defaults when no step/field `validate` is present, and custom
`validate` overrides those defaults. Handlers do not validate. For the exact
default list, read `../core/src/types.ts` (`defaultValidateByType`).

## Docs

- Overview & package split: ./docs/overview.md
- Shared form props, locale, and step contracts: ./docs/form-api.md
- Built-in answer inputs: ./docs/inputs.md
- Vite build-time form config check: ./docs/vite-plugin-form-check.md
- Composite fields & shared schema: ./docs/schema-composite.md
- Autosave (fetch, custom adapter, storage, status): ./docs/autosave.md
- Server-side rendering: ./docs/ssr.md
- Lazy session migration (upgrading existing apps): ./docs/migration.md
- Themes, hooks, exports, value cheat sheet: ./docs/hooks-theming-exports.md
- Recipes, HTTP contract, pitfalls, source map: ./docs/recipes-agents.md
- Stable data-testid selectors for tests and agents: ./docs/test-ids.md
- E2E test helpers: import `@taylordb/forms-ui/testing`

## Also In Package

- README.md - package overview and renderer quick start.
- example.md - shared runtime examples using renderer imports.
