Skip to content

The open alternative to Salesforce, designed for AI.

4.3 KB
Raw Blame
{/*
 * _____                    _
 *|_   _|_      _____ _ __ | |_ _   _
 *  | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file
 *  | |  \ V  V /  __/ | | | |_| |_| | DO NOT EDIT - changes will be overwritten
 *  |_|   \_/\_/ \___|_| |_|\__|\__, | Generated by: npx nx generate:ui twenty-docs
 *                              |___/
 *
 * This file is generated from the documentation data in packages/twenty-ui/generated.
 * To update it, edit the component prop types or design tokens in twenty-ui and run:
 *   npx nx generate:ui twenty-docs
 */}

<ParamField body="allowOutOfRange" type="boolean" default="false">
  Allows onValueChange to receive typed and pasted numbers outside the bounds. Native range validation still applies; buttons and keyboard adjustments remain bounded.
</ParamField>

<ParamField body="aria-roledescription" type="string" default="Number field">
  A user-friendly description of the input's role for assistive tech. This is a role
  description, not an accessible name — use `Field.Label` or `aria-label` to name the control.
</ParamField>

<ParamField body="className" type="string | ((state: NumberFieldInputState) =&gt; string | undefined)">
  Class applied to the visible input.
</ParamField>

<ParamField body="decrementLabel" type="string" default="Decrease value">
  Accessible name for the decrement button.
</ParamField>

<ParamField body="defaultValue" type="number">
  Initial number when the field owns its value.
</ParamField>

<ParamField body="disabled" type="boolean" default="false">
  Disables the input and both buttons, and omits the form value.
</ParamField>

<ParamField body="form" type="string">
  ID of the form that owns the submitted numeric value.
</ParamField>

<ParamField body="id" type="string">
  ID of the visible input. Generated when omitted.
</ParamField>

<ParamField body="incrementLabel" type="string" default="Increase value">
  Accessible name for the increment button.
</ParamField>

<ParamField body="max" type="number">
  Inclusive maximum. By default, onValueChange reports bounded numbers and out-of-range drafts normalize on blur.
</ParamField>

<ParamField body="min" type="number">
  Inclusive minimum. By default, onValueChange reports bounded numbers and out-of-range drafts normalize on blur.
</ParamField>

<ParamField body="name" type="string">
  Name of the numeric value submitted with a form.
</ParamField>

<ParamField body="onValueChange" type="((value: number | null, eventDetails: NumberFieldRootChangeEventDetails) =&gt; void)">
  Called with the next number or null and event details when the numeric value changes. Clearing reports null; incomplete text does not report a number.
</ParamField>

<ParamField body="onValueCommitted" type="((value: number | null, eventDetails: NumberFieldRootCommitEventDetails) =&gt; void)">
  Called with the committed number or null and generic event details after an edit is committed. Details contain the native event and reason, without change cancellation methods.
</ParamField>

<ParamField body="readOnly" type="boolean" default="false">
  Prevents numeric changes while keeping the input focusable.
</ParamField>

<ParamField body="ref" type="Ref&lt;HTMLInputElement&gt;">
  Ref to the visible input element.
</ParamField>

<ParamField body="render" type="ReactElement&lt;unknown, string | JSXElementConstructor&lt;any&gt;&gt; | ComponentRenderFn&lt;DetailedHTMLProps&lt;InputHTMLAttributes&lt;HTMLInputElement&gt;, HTMLInputElement&gt;, NumberFieldInputState&gt;">
  Composes the visible text input with an element or render callback. Forward the supplied props and ref to an input. Use a separate element to customize the surrounding layout.
</ParamField>

<ParamField body="required" type="boolean" default="false">
  Requires a numeric value for native form submission.
</ParamField>

<ParamField body="showButtons" type="boolean" default="true">
  Shows the decrement and increment buttons.
</ParamField>

<ParamField body="step" type="number" default="1">
  Amount added or subtracted by the buttons and arrow keys.
</ParamField>

<ParamField body="style" type="CSSProperties | ((state: NumberFieldInputState) =&gt; CSSProperties | undefined)">
  Inline styles applied to the visible input.
</ParamField>

<ParamField body="value" type="number | null">
  Controlled numeric value. Use null for an empty field.
</ParamField>