Navigation
Inputs & Forms
Selection
Containers & Overlays
Form Field
Lays out fields, groups, repeated entries and the actions of a form.
Overview
FormField provides label, hint, error message, prefix and suffix around an input. The inputs of Fusion UI use it internally; use it for custom inputs, so they look and behave like the others.
Formular Label*
Custom FormField content
This is a hint.
"use client";import React from "react";import {FormField,FormFieldProps,} from "@brynlabs/fusion-ui";export type FormFieldExampleProps = {disabled?: boolean;} & Omit<FormFieldProps, "children">;export const FormFieldExample: React.FC<FormFieldExampleProps> = ({disabled = false,...formFieldProps}) => {const [value, setValue] = React.useState("");return (<FormField{...formFieldProps}label={"Formular Label"}required={true}disabled={disabled}hint={"This is a hint."}errorMessage={"This is an error message."}><divstyle={{display: "flex",flexDirection: "column",gap: "1rem",background: "green",padding: "2rem",}}><span>Custom FormField content</span><inputstyle={{border: "1px solid"}}value={value}onChange={e => {setValue(e.target.value);}}></input></div></FormField>);};

