Form composition·loomora/Form

Form

A form composition helper that renders a list of Input definitions and optional actions inside a configurable element.

Interactive live playground

Tweak props, change states, and see the live component respond in real time.

Live

How to call

Import directly from the Loomora package root. For projects without Tailwind CSS, ensure loomora/dist/index.css is imported once in your root layout.

import { Form } from 'loomora'

<Form inputs={[
  { type: 'text', label: 'Name', properties: { value, onChange } },
  { type: 'check', label: 'Accept terms', properties: { checked, onChange } },
]} actions={[{ children: 'Save', type: 'submit' }]} />

API reference

Important public props and how they affect rendering.

6 props
PropTypeDefaultDescription
inputsInputProps[][]Input definitions rendered by the dispatcher.
asElementType'form'Element used as the outer form container.
actionsButtonProps[][]Buttons rendered after the input collection.
inputsWrapperInputsWrapperProps—Grid wrapper configuration for inputs.
loadingbooleanfalsePropagated to action button loading states.
conditionbooleantrueReturns null when false.