Skip to content

The open alternative to Salesforce, designed for AI.

5.6 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="action" type="ReactNode">
  Optional trailing ReactNode. Banner.Action supplies a small outline action that inherits the resolved banner color; arbitrary controls are also accepted.
</ParamField>

<ParamField body="children" type="ReactNode">
  Caller-provided content, including text, links and controls.
</ParamField>

<ParamField body="className" type="string">
  Class merged onto the root div or composed element.
</ParamField>

<ParamField body="closeLabel" type="string" default="Close">
  Accessible label for the close control. Defaults to Close; supply localized text when needed.
</ParamField>

<ParamField body="color" type="&quot;blue&quot; | &quot;gray&quot; | &quot;green&quot; | &quot;orange&quot; | &quot;red&quot;" default="status palette">
  Palette override: gray, blue, green, orange or red. When omitted, status selects the corresponding palette.
</ParamField>

<ParamField body="icon" type="ReactNode">
  Optional leading ReactNode. The caller supplies decorative or accessible icon semantics.
</ParamField>

<ParamField body="onDismiss" type="(() =&gt; void)">
  Renders a 24px ghost close control and calls this callback when activated. The caller owns visibility.
</ParamField>

<ParamField body="ref" type="Ref&lt;HTMLDivElement&gt;">
  Ref to the root div, or to the DOM element supplied through render.
</ParamField>

<ParamField body="render" type="ReactElement&lt;unknown, string | JSXElementConstructor&lt;any&gt;&gt; | ComponentRenderFn&lt;HTMLProps, BannerState&gt;">
  Base UI element or render callback. The callback receives native props/ref and resolved status, variant and color state.
</ParamField>

<ParamField body="status" type="&quot;error&quot; | &quot;info&quot; | &quot;neutral&quot; | &quot;success&quot; | &quot;warning&quot;" default="info">
  Feedback meaning: neutral, info, success, warning or error. Defaults to info. Does not assign a role or live region.
</ParamField>

<ParamField body="style" type="CSSProperties">
  Inline styles applied to the root div or composed element.
</ParamField>

<ParamField body="variant" type="&quot;soft&quot; | &quot;solid&quot;" default="solid">
  Solid or soft appearance. Defaults to solid, independently of status.
</ParamField>

### Banner.Action

<ParamField body="Action.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="Action.elevated" type="boolean">
  Adds a shadow and backdrop blur. Neutral outline buttons also use elevated surface colors.
</ParamField>

<ParamField body="Action.endIcon" type="ReactNode">
  Decorative content displayed after the label.
</ParamField>

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

<ParamField body="Action.fullWidth" type="boolean">
  Expands the button to fill its container width.
</ParamField>

<ParamField body="Action.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="Action.loading" type="boolean">
  Shows a loading indicator and disables activation.
</ParamField>

<ParamField body="Action.loadingPosition" type="&quot;center&quot; | &quot;end&quot; | &quot;start&quot;">
  Where the loading indicator appears. `center` hides the content while preserving its layout space; `start` and `end` keep children and the opposite icon visible and replace the corresponding icon with the spinner.
</ParamField>

<ParamField body="Action.nativeButton" type="boolean" default="true">
  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="Action.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="Action.role" type="AriaRole">
  Role of the root element. Use `link` for custom navigation renderers.
</ParamField>

<ParamField body="Action.shortcut" type="ShortcutDefinition">
  Flat key array for simultaneous keys, or nested key arrays for an ordered sequence. Displayed on non-mobile screens.
</ParamField>

<ParamField body="Action.shortcutJoinLabel" type="string">
  Localized text between sequence steps. Defaults to then.
</ParamField>

<ParamField body="Action.startIcon" type="ReactNode">
  Decorative content displayed before the label.
</ParamField>

<ParamField body="Action.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>