Home / Function/ InputForm() — ui Function Reference

InputForm() — ui Function Reference

Architecture documentation for the InputForm() function in input-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  cfbbd146_1d94_0004_6254_fe559f789f1a["InputForm()"]
  87e902db_d09e_d63e_d96a_582b4eb4c286["input-example.tsx"]
  cfbbd146_1d94_0004_6254_fe559f789f1a -->|defined in| 87e902db_d09e_d63e_d96a_582b4eb4c286
  style cfbbd146_1d94_0004_6254_fe559f789f1a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/examples/input-example.tsx lines 209–268

function InputForm() {
  return (
    <Example title="Form">
      <form className="w-full">
        <FieldGroup>
          <Field>
            <FieldLabel htmlFor="form-name">Name</FieldLabel>
            <Input id="form-name" type="text" placeholder="John Doe" />
          </Field>
          <Field>
            <FieldLabel htmlFor="form-email">Email</FieldLabel>
            <Input
              id="form-email"
              type="email"
              placeholder="john@example.com"
            />
            <FieldDescription>
              We&apos;ll never share your email with anyone.
            </FieldDescription>
          </Field>
          <div className="grid grid-cols-2 gap-4">
            <Field>
              <FieldLabel htmlFor="form-phone">Phone</FieldLabel>
              <Input
                id="form-phone"
                type="tel"
                placeholder="+1 (555) 123-4567"
              />
            </Field>
            <Field>
              <FieldLabel htmlFor="form-country">Country</FieldLabel>
              <Select defaultValue="us">
                <SelectTrigger id="form-country">
                  <SelectValue />
                </SelectTrigger>
                <SelectContent>
                  <SelectGroup>
                    <SelectItem value="us">United States</SelectItem>
                    <SelectItem value="uk">United Kingdom</SelectItem>
                    <SelectItem value="ca">Canada</SelectItem>
                  </SelectGroup>
                </SelectContent>
              </Select>
            </Field>
          </div>
          <Field>
            <FieldLabel htmlFor="form-address">Address</FieldLabel>
            <Input id="form-address" type="text" placeholder="123 Main St" />
          </Field>
          <Field orientation="horizontal">
            <Button type="button" variant="outline">
              Cancel
            </Button>
            <Button type="submit">Submit</Button>
          </Field>
        </FieldGroup>
      </form>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does InputForm() do?
InputForm() is a function in the ui codebase, defined in apps/v4/registry/bases/base/examples/input-example.tsx.
Where is InputForm() defined?
InputForm() is defined in apps/v4/registry/bases/base/examples/input-example.tsx at line 209.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free