Komdes
Components

Form

Type-safe React Hook Form components integrated seamlessly with shadcn/ui primitives.

Overview

The komdes form components are powerful abstractions over shadcn/ui form primitives. They eliminate boilerplate while maintaining full type safety through rigorous TypeScript generics. This suite includes FormInput, FormInputGroup, FormRadioGroup, and FormSwitch.

Import


FormInput

FormInput is the standard text input element.

Prop

Type


FormInputGroup

FormInputGroup renders an input equipped with an optional right-side addon (text, currency, unit, or icon).

Prop

Type

Addon Examples

Text Addon:

Compound Addon:


FormRadioGroup

FormRadioGroup renders selectable options as clickable cards. It natively supports as const arrays and custom rendering.

Prop

Type

RadioOption Type

Prop

Type

Custom Render Slot

Override the default card using renderOption:


FormSwitch

FormSwitch is a toggle switch supporting two structural layouts.

Prop

Type

Layout Variants

Default Layout: (Stacked)

Inline Layout: (Card-like row)

How is this guide?

On this page