> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twenty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Banner

> Feedback content with independent status, appearance, and palette.

export const StoryEmbed = ({storyId, title, height = 120}) => <>
    <Tabs>
      <Tab title="Light">
        <iframe title={`${title} (light)`} src={`https://storybook.twenty.com/iframe.html?id=${storyId}&viewMode=story&globals=colorScheme:light`} width="100%" height={height} loading="lazy" allow="clipboard-write" style={{
  border: 0
}} />
      </Tab>
      <Tab title="Dark">
        <iframe title={`${title} (dark)`} src={`https://storybook.twenty.com/iframe.html?id=${storyId}&viewMode=story&globals=colorScheme:dark`} width="100%" height={height} loading="lazy" allow="clipboard-write" style={{
  border: 0
}} />
      </Tab>
    </Tabs>
    <a href={`https://storybook.twenty.com/?path=/story/${storyId}`}>
      Open in Storybook
    </a>
  </>;

`Banner` lays out caller-provided content, an optional `icon` node and an optional `action` node. `status` describes feedback meaning: `neutral`, `info`, `success`, `warning` or `error`. `variant` selects `solid` or `soft` appearance. An explicit `color` overrides the status palette without changing its meaning.

Defaults are `status="info"` and `variant="solid"`. The default status palettes are gray, blue, green, orange and red, respectively.

<StoryEmbed storyId="ui-feedback-banner--display" title="Banner example" height={130} />

## Usage

```tsx theme={null}
import { Banner } from 'twenty-ui/primitives/feedback';

export const SyncBanner = () => (
  <Banner status="info" variant="solid">
    Contact sync is temporarily paused. Your saved records remain available.
  </Banner>
);
```

## Actions and appearance

<StoryEmbed storyId="ui-feedback-banner--catalog" title="Banner feedback palettes and variants" height={560} />

```tsx theme={null}
import { Banner } from 'twenty-ui/primitives/feedback';
import { IconInfoCircle } from 'twenty-ui/icon';

export const SyncBanner = ({ onRetry }: { onRetry: () => void }) => (
  <Banner
    status="error"
    variant="soft"
    color="blue"
    icon={<IconInfoCircle aria-hidden="true" />}
    action={<Banner.Action onClick={onRetry}>Retry sync</Banner.Action>}
  >
    Contact sync could not finish.
  </Banner>
);
```

`Banner.Action` provides a small outline button that inherits the banner’s displayed color, including explicit palette overrides and solid appearances. It supports Button interactions, links, refs and custom rendering. The `action` slot also accepts arbitrary controls.

The root target is a `div`. Native attributes, event handlers, `className`, `style` and `ref` apply to that root. `render` accepts a Base UI element or callback; the callback receives native props and ref plus resolved `status`, `variant` and `color` state. Preserve the supplied props and ref when composing another element.

```tsx theme={null}
import { Banner } from 'twenty-ui/primitives/feedback';

export const SyncResult = () => (
  <Banner
    status="success"
    variant="soft"
    role="status"
    aria-live="polite"
    aria-atomic="true"
    render={<section aria-label="Sync result" />}
  >
    Contacts are up to date.
  </Banner>
);
```

Status does not automatically assign `role`, `aria-live` or announcements. Choose them at the caller when updates should be announced. Supply accessible names for controls and mark decorative icon nodes with `aria-hidden`. The caller owns visibility and dismissal.

## Migration

Replace `variant="primary"` with `variant="solid"` and `variant="secondary"` with `variant="soft"`. Replace `color="danger"` with `status="error"`, or `color="red"` when only the palette should change. Blue information banners can use `status="info"`.

## Props

<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="color" type="&#x22;blue&#x22; | &#x22;gray&#x22; | &#x22;green&#x22; | &#x22;orange&#x22; | &#x22;red&#x22;" 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="ref" type="Ref<HTMLDivElement>">
  Ref to the root div, or to the DOM element supplied through render.
</ParamField>

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

<ParamField body="status" type="&#x22;error&#x22; | &#x22;info&#x22; | &#x22;neutral&#x22; | &#x22;success&#x22; | &#x22;warning&#x22;" 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="&#x22;soft&#x22; | &#x22;solid&#x22;" default="solid">
  Solid or soft appearance. Defaults to solid, independently of status.
</ParamField>

### Banner.Action

<ParamField body="Action.className" type="string | ((state: ButtonState) => 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="&#x22;center&#x22; | &#x22;end&#x22; | &#x22;start&#x22;">
  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<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState>">
  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) => CSSProperties | undefined)">
  Style applied to the element, or a function that
  returns a style object based on the component's state.
</ParamField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.