Skip to main content
Version: 1.0.2

Form

Overview

The Form component is a layout component that provides smart, responsive layouts for form fields with proper spacing and alignment. It handles multi-column layouts and label positioning automatically.

Preview

Installation

npx @mindfiredigital/ignix-ui add form

Usage

Import the components:

import { Form, FormField, InputWrapper } from './components/ui/form';

Basic Usage

function BasicForm() {
return (
<Form spacing="comfortable" maxWidth="readable">
<FormField>
<label htmlFor="username">Username</label>
<InputWrapper>
<input
id="username"
type="text"
placeholder="Enter username"
className="w-full px-3 py-2 border rounded-md"
/>
</InputWrapper>
</FormField>

<FormField>
<label htmlFor="password">Password</label>
<InputWrapper>
<input
id="password"
type="password"
placeholder="Enter password"
className="w-full px-3 py-2 border rounded-md"
/>
</InputWrapper>
</FormField>
</Form>
);
}

Examples