Skip to content

The open alternative to Salesforce, designed for AI.

4.5 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="aria-label" type="string">
  Accessible name describing the action. Required unless `aria-labelledby` supplies the name.
</ParamField>

<ParamField body="aria-labelledby" type="string">
  ID of the element supplying the accessible name. Can be used instead of `aria-label`.
</ParamField>

<ParamField body="children" type="ReactNode" required>
  Icon content. Decorative and hidden from assistive technology.
</ParamField>

<ParamField body="className" type="string | ((state: ButtonState) =&gt; string | undefined)">
  CSS class applied to the element, or a function that
  returns a class based on the component's state.
</ParamField>

<ParamField body="color" type="&quot;accent&quot; | &quot;danger&quot; | &quot;inherit&quot; | &quot;neutral&quot; | &quot;success&quot;" default="neutral">
  Semantic color of the button. `inherit` uses the surrounding text color for the label, icons, loader, and outline border, with translucent black interaction surfaces. It supports outline, ghost, soft, and link. Resolving solid with inherit throws, including appearance inherited from ButtonGroup and wrapper defaults.
</ParamField>

<ParamField body="elevated" type="boolean">
  Adds a shadow and backdrop blur. Neutral outline buttons also use elevated surface colors.
</ParamField>

<ParamField body="focusableWhenDisabled" type="boolean" default="false">
  Whether the button should be focusable when disabled.
</ParamField>

<ParamField body="href" type="string">
  Destination URL. Renders a native anchor when `render` is omitted unless `nativeButton` is explicitly true. Custom renderers retain their own element contract.
</ParamField>

<ParamField body="loading" type="boolean">
  Shows a loading indicator and disables activation.
</ParamField>

<ParamField body="nativeButton" type="boolean" default="true (false for the built-in href anchor)">
  Whether the rendered root is a native button. Defaults to true for custom renderers. The built-in `href` anchor defaults to false; an explicit value takes precedence.
</ParamField>

<ParamField body="render" type="ReactElement&lt;unknown, string | JSXElementConstructor&lt;any&gt;&gt; | ComponentRenderFn&lt;HTMLProps, ButtonState&gt;">
  Caller-supplied root element or renderer. Native attributes, handlers, event details, and refs reach the rendered root. Use `nativeButton={false}` and `role="link"` for a custom navigation anchor. Router integration belongs to the caller.
</ParamField>

<ParamField body="role" type="AriaRole">
  Role of the root element. Use `link` for custom navigation renderers.
</ParamField>

<ParamField body="shape" type="&quot;round&quot; | &quot;square&quot;" default="square">
  Square or round icon control.
</ParamField>

<ParamField body="size" type="&quot;md&quot; | &quot;sm&quot; | &quot;xs&quot;" default="md">
  Button size: `xs` (20px), `sm` (24px), or `md` (32px).
</ParamField>

<ParamField body="style" type="CSSProperties | ((state: ButtonState) =&gt; CSSProperties | undefined)">
  Style applied to the element, or a function that
  returns a style object based on the component's state.
</ParamField>

<ParamField body="tooltip" type="string">
  Text displayed when hovering or focusing the button.
</ParamField>

<ParamField body="tooltipDelay" type="number" default="1000">
  Delay before showing the tooltip.
</ParamField>

<ParamField body="tooltipOffset" type="number" default="5">
  Distance in pixels between the button and the tooltip.
</ParamField>

<ParamField body="tooltipPlace" type="&quot;bottom&quot; | &quot;inline-end&quot; | &quot;inline-start&quot; | &quot;left&quot; | &quot;right&quot; | &quot;top&quot;" default="bottom">
  Preferred placement of the tooltip relative to the button.
</ParamField>

<ParamField body="variant" type="&quot;ghost&quot; | &quot;link&quot; | &quot;outline&quot; | &quot;soft&quot; | &quot;solid&quot;" default="outline">
  Visual treatment of the button surface. `link` uses compact text styling without a filled surface or border; render composition determines native semantics.
</ParamField>