[ { "name": "IconButton", "entryPoint": "twenty-ui/components", "slug": "input/icon-button", "props": [ { "name": "aria-label", "type": "string", "required": true, "defaultValue": null, "description": "Required accessible name describing the action." }, { "name": "children", "type": "ReactNode", "required": true, "defaultValue": null, "description": "Icon content. Decorative and hidden from assistive technology." }, { "name": "className", "type": "string | ((state: ButtonState) => string | undefined)", "required": false, "defaultValue": null, "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state." }, { "name": "color", "type": "\"neutral\" | \"accent\" | \"danger\" | \"success\"", "required": false, "defaultValue": null, "description": "Semantic color of the button." }, { "name": "elevated", "type": "boolean", "required": false, "defaultValue": null, "description": "Adds a shadow to the button." }, { "name": "focusableWhenDisabled", "type": "boolean", "required": false, "defaultValue": "false", "description": "Whether the button should be focusable when disabled." }, { "name": "loading", "type": "boolean", "required": false, "defaultValue": null, "description": "Shows a loading indicator and disables activation while preserving the button width." }, { "name": "render", "type": "ReactElement> | ComponentRenderFn", "required": false, "defaultValue": null, "description": "Caller-supplied root element or renderer. Preserve a native button, or an anchor when `href` is set. Router integration belongs to the caller." }, { "name": "size", "type": "\"sm\" | \"md\"", "required": false, "defaultValue": null, "description": "Square button size: `sm` (24px) or `md` (32px)." }, { "name": "style", "type": "CSSProperties | ((state: ButtonState) => CSSProperties | undefined)", "required": false, "defaultValue": null, "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state." }, { "name": "tooltip", "type": "string", "required": false, "defaultValue": null, "description": "Text displayed when hovering or focusing the button." }, { "name": "tooltipDelay", "type": "number", "required": false, "defaultValue": "1000", "description": "Delay before showing the tooltip." }, { "name": "tooltipOffset", "type": "number", "required": false, "defaultValue": "5", "description": "Distance in pixels between the button and the tooltip." }, { "name": "tooltipPlace", "type": "\"top\" | \"right\" | \"bottom\" | \"left\"", "required": false, "defaultValue": "bottom", "description": "Preferred placement of the tooltip relative to the button." }, { "name": "variant", "type": "\"solid\" | \"outline\" | \"ghost\" | \"soft\"", "required": false, "defaultValue": null, "description": "Visual treatment of the button surface." } ] }, { "name": "MainButton", "entryPoint": "twenty-ui/components", "slug": "input/main-button", "props": [ { "name": "className", "type": "string | ((state: ButtonState) => string | undefined)", "required": false, "defaultValue": null, "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state." }, { "name": "color", "type": "\"neutral\" | \"accent\" | \"danger\" | \"success\"", "required": false, "defaultValue": null, "description": "Semantic color of the button." }, { "name": "elevated", "type": "boolean", "required": false, "defaultValue": "true", "description": "Adds a shadow to the button." }, { "name": "endIcon", "type": "ReactNode", "required": false, "defaultValue": null, "description": "Decorative content displayed after the label." }, { "name": "focusableWhenDisabled", "type": "boolean", "required": false, "defaultValue": "false", "description": "Whether the button should be focusable when disabled." }, { "name": "fullWidth", "type": "boolean", "required": false, "defaultValue": null, "description": "Expands the button to fill its container width." }, { "name": "hotkeys", "type": "string[]", "required": false, "defaultValue": null, "description": "Keyboard shortcut hints displayed on non-mobile screens." }, { "name": "loading", "type": "boolean", "required": false, "defaultValue": null, "description": "Shows a loading indicator and disables activation while preserving the button width." }, { "name": "render", "type": "ReactElement> | ComponentRenderFn", "required": false, "defaultValue": null, "description": "Caller-supplied root element or renderer. Preserve a native button, or an anchor when `href` is set. Router integration belongs to the caller." }, { "name": "size", "type": "\"sm\" | \"md\"", "required": false, "defaultValue": null, "description": "Button height: `sm` (24px) or `md` (32px)." }, { "name": "soon", "type": "boolean", "required": false, "defaultValue": null, "description": "Displays a coming-soon label and disables activation." }, { "name": "soonLabel", "type": "string", "required": false, "defaultValue": null, "description": "Text for the coming-soon label." }, { "name": "startIcon", "type": "ReactNode", "required": false, "defaultValue": null, "description": "Decorative content displayed before the label." }, { "name": "style", "type": "CSSProperties | ((state: ButtonState) => CSSProperties | undefined)", "required": false, "defaultValue": null, "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state." }, { "name": "variant", "type": "\"solid\" | \"outline\" | \"ghost\" | \"soft\"", "required": false, "defaultValue": "solid", "description": "Visual treatment of the button surface." } ] }, { "name": "LightButton", "entryPoint": "twenty-ui/components", "slug": "input/light-button", "props": [ { "name": "className", "type": "string | ((state: ButtonState) => string | undefined)", "required": false, "defaultValue": null, "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state." }, { "name": "color", "type": "\"neutral\" | \"accent\" | \"danger\" | \"success\"", "required": false, "defaultValue": null, "description": "Semantic color of the button." }, { "name": "elevated", "type": "boolean", "required": false, "defaultValue": null, "description": "Adds a shadow to the button." }, { "name": "emphasis", "type": "\"standard\" | \"subtle\"", "required": false, "defaultValue": "standard", "description": "Uses secondary or tertiary text for neutral buttons. Semantic colors and solid surfaces retain their contrast treatment." }, { "name": "endIcon", "type": "ReactNode", "required": false, "defaultValue": null, "description": "Decorative content displayed after the label." }, { "name": "focusableWhenDisabled", "type": "boolean", "required": false, "defaultValue": "false", "description": "Whether the button should be focusable when disabled." }, { "name": "fullWidth", "type": "boolean", "required": false, "defaultValue": null, "description": "Expands the button to fill its container width." }, { "name": "hotkeys", "type": "string[]", "required": false, "defaultValue": null, "description": "Keyboard shortcut hints displayed on non-mobile screens." }, { "name": "loading", "type": "boolean", "required": false, "defaultValue": null, "description": "Shows a loading indicator and disables activation while preserving the button width." }, { "name": "render", "type": "ReactElement> | ComponentRenderFn", "required": false, "defaultValue": null, "description": "Caller-supplied root element or renderer. Preserve a native button, or an anchor when `href` is set. Router integration belongs to the caller." }, { "name": "size", "type": "\"sm\" | \"md\"", "required": false, "defaultValue": "sm", "description": "Button height: `sm` (24px) or `md` (32px)." }, { "name": "soon", "type": "boolean", "required": false, "defaultValue": null, "description": "Displays a coming-soon label and disables activation." }, { "name": "soonLabel", "type": "string", "required": false, "defaultValue": null, "description": "Text for the coming-soon label." }, { "name": "startIcon", "type": "ReactNode", "required": false, "defaultValue": null, "description": "Decorative content displayed before the label." }, { "name": "style", "type": "CSSProperties | ((state: ButtonState) => CSSProperties | undefined)", "required": false, "defaultValue": null, "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state." }, { "name": "variant", "type": "\"solid\" | \"outline\" | \"ghost\" | \"soft\"", "required": false, "defaultValue": "ghost", "description": "Visual treatment of the button surface." } ] }, { "name": "Button", "entryPoint": "twenty-ui/primitives/input", "slug": "input/button", "props": [ { "name": "className", "type": "string | ((state: ButtonState) => string | undefined)", "required": false, "defaultValue": null, "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state." }, { "name": "color", "type": "\"neutral\" | \"accent\" | \"danger\" | \"success\"", "required": false, "defaultValue": "neutral", "description": "Semantic color of the button." }, { "name": "elevated", "type": "boolean", "required": false, "defaultValue": "false", "description": "Adds a shadow to the button." }, { "name": "endIcon", "type": "ReactNode", "required": false, "defaultValue": null, "description": "Decorative content displayed after the label." }, { "name": "focusableWhenDisabled", "type": "boolean", "required": false, "defaultValue": "false", "description": "Whether the button should be focusable when disabled." }, { "name": "fullWidth", "type": "boolean", "required": false, "defaultValue": "false", "description": "Expands the button to fill its container width." }, { "name": "hotkeys", "type": "string[]", "required": false, "defaultValue": null, "description": "Keyboard shortcut hints displayed on non-mobile screens." }, { "name": "loading", "type": "boolean", "required": false, "defaultValue": "false", "description": "Shows a loading indicator and disables activation while preserving the button width." }, { "name": "render", "type": "ReactElement> | ComponentRenderFn", "required": false, "defaultValue": null, "description": "Caller-supplied root element or renderer. Preserve a native button, or an anchor when `href` is set. Router integration belongs to the caller." }, { "name": "size", "type": "\"sm\" | \"md\"", "required": false, "defaultValue": "md", "description": "Button height: `sm` (24px) or `md` (32px)." }, { "name": "soon", "type": "boolean", "required": false, "defaultValue": "false", "description": "Displays a coming-soon label and disables activation." }, { "name": "soonLabel", "type": "string", "required": false, "defaultValue": null, "description": "Text for the coming-soon label." }, { "name": "startIcon", "type": "ReactNode", "required": false, "defaultValue": null, "description": "Decorative content displayed before the label." }, { "name": "style", "type": "CSSProperties | ((state: ButtonState) => CSSProperties | undefined)", "required": false, "defaultValue": null, "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state." }, { "name": "variant", "type": "\"solid\" | \"outline\" | \"ghost\" | \"soft\"", "required": false, "defaultValue": "outline", "description": "Visual treatment of the button surface." } ] }, { "name": "ButtonGroup", "entryPoint": "twenty-ui/primitives/input", "slug": "input/button-group", "props": [ { "name": "color", "type": "\"neutral\" | \"accent\" | \"danger\" | \"success\"", "required": false, "defaultValue": null, "description": "Shared semantic color that overrides the color of buttons in the group." }, { "name": "render", "type": "ReactElement> | ComponentRenderFn", "required": false, "defaultValue": null, "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, { "name": "size", "type": "\"sm\" | \"md\"", "required": false, "defaultValue": null, "description": "Shared button height that overrides the size of buttons in the group." }, { "name": "variant", "type": "\"solid\" | \"outline\" | \"ghost\" | \"soft\"", "required": false, "defaultValue": null, "description": "Shared surface treatment that overrides the variant of buttons in the group." } ] }, { "name": "Field", "entryPoint": "twenty-ui/primitives/input", "slug": "input/field", "props": [], "parts": [ { "name": "Root", "props": [ { "name": "actionsRef", "type": "RefObject", "required": false, "defaultValue": null, "description": "A ref to imperative actions.\n- `validate`: Validates the field when called." }, { "name": "className", "type": "string | ((state: FieldRootState) => string | undefined)", "required": false, "defaultValue": null, "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state." }, { "name": "dirty", "type": "boolean", "required": false, "defaultValue": null, "description": "Whether the field's value has been changed from its initial value.\nUseful when the field state is controlled by an external library." }, { "name": "disabled", "type": "boolean", "required": false, "defaultValue": "false", "description": "Whether the component should ignore user interaction.\nTakes precedence over the `disabled` prop on the `` component." }, { "name": "invalid", "type": "boolean", "required": false, "defaultValue": null, "description": "Whether the field is invalid.\nUseful when the field state is controlled by an external library." }, { "name": "name", "type": "string", "required": false, "defaultValue": null, "description": "Identifies the field when a form is submitted.\nTakes precedence over the `name` prop on the `` component." }, { "name": "render", "type": "ReactElement> | ComponentRenderFn", "required": false, "defaultValue": null, "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render." }, { "name": "style", "type": "CSSProperties | ((state: FieldRootState) => CSSProperties | undefined)", "required": false, "defaultValue": null, "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state." }, { "name": "touched", "type": "boolean", "required": false, "defaultValue": null, "description": "Whether the field has been touched.\nUseful when the field state is controlled by an external library." }, { "name": "validate", "type": "((value: unknown, formValues: Record) => string | void | string[] | Promise | null)", "required": false, "defaultValue": null, "description": "A function for custom validation. Return a string or an array of strings with\nthe error message(s) if the value is invalid. Returning nothing, `null`, an empty\nstring, or an empty array means the value is valid.\nAsynchronous functions are supported, but they do not prevent form submission\nwhen using `validationMode=\"onSubmit\"`." }, { "name": "validationDebounceTime", "type": "number", "required": false, "defaultValue": "0", "description": "How long to wait between `validate` callbacks if\n`validationMode=\"onChange\"` is used. Specified in milliseconds." }, { "name": "validationMode", "type": "\"onBlur\" | \"onChange\" | \"onSubmit\"", "required": false, "defaultValue": "onSubmit", "description": "Determines when the field should be validated.\nThis takes precedence over the `validationMode` prop on `
`.\n\n- `onSubmit`: triggers validation when the form is submitted, and re-validates on change after submission.\n- `onBlur`: triggers validation when the control loses focus.\n- `onChange`: triggers validation on every change to the control value." } ] }, { "name": "Label", "props": [ { "name": "className", "type": "string | ((state: FieldLabelState) => string | undefined)", "required": false, "defaultValue": null, "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state." }, { "name": "nativeLabel", "type": "boolean", "required": false, "defaultValue": "true", "description": "Whether the component renders a native `