Formula field preview
Compose a formula source with consumer-supplied field references and validation.
pro · Forms · composite
When to use
- Use it when a page needs compose a formula source with consumer-supplied field references and validation.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than formula field.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/formula-fieldImport components/ui/tidal.css, components/ui/formula-field.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/formula-field.css";
import{TidalFormulaField}from"./components/ui/formula-field";
export default()=><div className="tidal-scope"><TidalFormulaField label={"Demo"} name={"Demo"} onValueChange={() => {}} value={"value"}/></div>;API and props
TidalFormulaField.label (required)ReactNodeRequired label value accepted by this exported component.
TidalFormulaField.name (required)stringRequired name value accepted by this exported component.
TidalFormulaField.onValueChange (required)(value: string, source: "input" | "suggestion", event: FormulaEvent) => voidCallback invoked when the value change interaction is proposed.
TidalFormulaField.value (required)stringRequired value value accepted by this exported component.
TidalFormulaField.descriptionReactNodeOptional description value accepted by this exported component.
TidalFormulaField.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalFormulaField.issuesReadonlyArray<TidalFormulaIssue> | undefinedOptional issues value accepted by this exported component.
TidalFormulaField.labelsPartial<{ invalidConfiguration: string; suggestions: string; noSuggestions: string; instruction: string; }> | undefinedOptional labels value accepted by this exported component.
TidalFormulaField.onSuggestionSelect((suggestion: TidalFormulaSuggestion, event: KeyboardEvent<HTMLTextAreaElement> | MouseEvent<HTMLButtonElement>) => void) | undefinedCallback invoked when the suggestion select interaction is proposed.
TidalFormulaField.readOnlyboolean | undefinedOptional read only value accepted by this exported component.
TidalFormulaField.requiredboolean | undefinedOptional required value accepted by this exported component.
TidalFormulaField.suggestionsReadonlyArray<TidalFormulaSuggestion> | undefinedOptional suggestions value accepted by this exported component.
TidalFormulaField.textareaPropsFormulaTextareaProps | undefinedOptional textarea props value accepted by this exported component.
TidalFormulaField.textareaRefRef<HTMLTextAreaElement> | undefinedOptional textarea ref value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Keep field state, validation results, submission, and persistence in the host form workflow.