Form Controls

Labeled native inputs, selects and textareas with inline validation.

Preview

Installation

npx shadcn@latest add checkfu/uicontext/form-controls

Usage

import { FormField, Input } from "./ui/uicontext/components/FormControls.ts"

FormField(h, { id: "project", label: "Project name" }, (attrs) => [
  Input(h).attrs({ ...attrs, name: "project", required: "" }),
])

Source