Skip to content

Form

@sectile/form is the renderer-neutral form model shared by the Vue and DOM integrations. It coordinates field identity, validation, errors, submission, reset, and the baseline behind dirty. Your inputs still own their values and markup.

Connect Form to your application

  • Vue

    sh
    pnpm add @sectile/core @sectile/form @sectile/dom @sectile/vue vue
  • Direct DOM

    sh
    pnpm add @sectile/core @sectile/form @sectile/dom

Vue and DOM are connection methods, not separate Form products. Install @sectile/form only when using one of these Form entry points; other Sectile components do not require it.

What Form coordinates

CapabilityResponsibility
FieldsNames, metadata, interaction state, and value baselines
ValidationNative, schema, application, and server issue lifecycles
SubmissionSubmission progress and failures, kept separate from invalid values
Reset and reinitializationRestore input defaults or adopt current values as the new baseline
Accessibility recoveryAssociate feedback with fields and recover focus after invalid submission

The Form domain owns these states and transitions. Vue renders components and applies framework lifecycle effects. DOM connects the same model to existing HTML. Styling, input values, data persistence, and product-specific rules remain in your application.

Learn by task

TaskGuide
Build a form in a Vue templateVue forms
Connect an existing HTML formDOM forms
Understand native inputs, Sectile controls, groups, and field identityFields and controls
Combine browser, schema, application, and server errorsValidation and errors
Handle files, async saves, reset, and a new dirty baselineSubmission and reinitialization
Connect an application-owned controlCustom controls
Render a Vue form on the server without hydration surprisesSSR and hydration

The guides explain the shared behavior first and point to host-specific code where it differs. For exact exports, use the API reference chooser, Vue API, or DOM API.

Released under the MIT License.