Skip to content

Reference

This section documents the complete public surface of @samline/forms. Start with the API for method signatures, then use the focused references for control behavior, types, entrypoints, browser globals, styling, and formatter integration.

  • Configuration — every FormControllerOptions field, with defaults and rationale.
  • API — method-by-method signatures, parameters, return shapes, and behaviour tables.
  • Form-control behavior — exact values and write semantics for text, select, checkbox, radio, file, repeated, and [] fields.
  • TypeScript — every exported type, callback signature, and helper return shape.
  • Entrypoints and module formats — ESM, CommonJS, browser module, and global IIFE differences.
  • Browser global — the window.Forms IIFE for no-bundler setups (Shopify, WordPress, classic templates).
  • CSS styling — recipes for the css-filled and css-error attributes.
  • regex integration — optional @samline/formatter patterns and messages.
  • Examples — task-oriented recipes for common real-world scenarios.