mbr/elm-chadcn/1.0.0

ChadCn.Field

Provides a field component.

The implementation follows the shadcn Base UI structure and Nova defaults.

type Config msg

Describes a field and its content.

= Vertical
| Horizontal
| Responsive

Describes the layout of a field.

new : List (Html msg) -> Config msg

Creates a vertical field with caller-owned content.

withAttributes : List (Attribute msg) -> Config msg -> Config msg

Adds native attributes to the field.

withInvalid : Bool -> Config msg -> Config msg

Sets whether the field is invalid.

Sets the field layout.

view : Config msg -> Html msg

Renders a configured field.