Skip to content

Customizing Presenters ​

Field options, slots, styling, and direct component usage cover most changes. To change the markup of a field itself, you may copy its presenter. To render a shipped component as it is, use Standalone Components instead.

Copying a presenter takes three steps:

  1. Copy the presenter for your stack from the package source.
  2. Keep its imports pointed at the public package entrypoints.
  3. Change the markup, classes, and composition in your app.

The Vue composables and React hooks are public because copied presenters need them. They provide package-owned behavior, validation wiring, IDs, ARIA state, uploads, popovers, and keyboard handling. They're exposed for presenter copies, not as a general UI framework. Once you replace the behavior of a hook or composable, that behavior is yours to maintain.

See the installation guide for runtime setup and styles. The source and generated TypeScript declarations for your installed version are the detailed reference.

Import Paths ​

The package exposes these public entrypoints:

  • @inertiaui/form-vue and @inertiaui/form-react for the form shell, registry, core helpers, and shared types.
  • @inertiaui/form-vue/components and @inertiaui/form-react/components for cloneable presenter components.
  • @inertiaui/form-vue/composables and @inertiaui/form-react/hooks for the behavior imports used by copied presenters.
  • @inertiaui/form-vue/richtext and @inertiaui/form-react/richtext for RichText and editor helpers.
  • @inertiaui/form-vue/styling and @inertiaui/form-react/styling for the shared class helpers used by shipped presenters.
  • @inertiaui/form-vue/fields/{Name} and @inertiaui/form-react/fields/{Name} for one default field component.
  • @inertiaui/form-vue/vite and @inertiaui/form-react/vite for the Vite plugin.

Use import type for declarations. The ./style.css and ./theme.css exports are stylesheets, not JavaScript runtime values.

Copy From Source ​

The built-in presenters live in vue/src/components/inputs, vue/src/components/display, react/src/components/inputs, and react/src/components/display. Shared helper components live in the components/ui and components/editor folders of each stack.

The presenter you copy already imports the behavior hook or composable, shared helper components, styling helpers, and types it needs. Keep those imports public and make your markup changes around them:

ts
import { FieldWrapper } from '@inertiaui/form-vue/components'
import { useTextInput, type UseTextInputProps } from '@inertiaui/form-vue/composables'
ts
import { FieldWrapper } from '@inertiaui/form-react/components'
import { useTextInput } from '@inertiaui/form-react/hooks'
import type { TextInputField } from '@inertiaui/form-react'

Keep the lower-level helpers the copied presenter imports, unless you're deliberately replacing the behavior they provide.

Manual form rendering, direct component usage, slots, field registration, RichText configuration, and icon resolvers each have their own page. This page doesn't repeat those contracts.