> ## 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.

# ApprovalCard

> Card that asks a person to approve or skip an action, with the decision buttons in its footer.

## Overview

`ApprovalCard` is the card the AI chat shows when an action waits for a person's approval. The chat also uses it to ask a question or show a form. It has a header with a title and an optional icon, a content area showing what the person reviews, and a footer with an optional hint and the buttons that answer. Front components that draw a tool's approval card use it so their card matches the built-in ones.

> [tab] Light
>
> [ApprovalCard example (light)](https://storybook.twenty.com/iframe.html?id=ui-feedback-approvalcard--display\&viewMode=story\&globals=colorScheme:light)

> [tab] Dark
>
> [ApprovalCard example (dark)](https://storybook.twenty.com/iframe.html?id=ui-feedback-approvalcard--display\&viewMode=story\&globals=colorScheme:dark)

[Open in Storybook](https://storybook.twenty.com/?path=/story/ui-feedback-approvalcard--display)

## Usage

```tsx theme={null}
import { ApprovalCard } from 'twenty-ui/components/feedback';
import { IconCalendarEvent } from 'twenty-ui/icon';
import { Button } from 'twenty-ui/primitives/input';

export const DeclineBookingCard = ({
  onKeep,
  onDecline,
}: {
  onKeep: () => void;
  onDecline: () => void;
}) => (
  <ApprovalCard
    title="Decline booking"
    icon={<IconCalendarEvent size={16} />}
    hint="The guest gets a cancellation email"
    actions={
      <>
        <Button size="sm" onClick={onKeep}>
          Keep it
        </Button>
        <Button size="sm" variant="solid" color="danger" onClick={onDecline}>
          Decline
        </Button>
      </>
    }
  >
    Intro call with Ada Lovelace, Tuesday 10:00
  </ApprovalCard>
);
```

That covers most cards. The only other component-specific prop is `contentVariant`, for content that is not a simple block.

## Header

The header shows `icon` and `title`. A long title wraps instead of being cut, so a question reads in full. `title` takes any node: to show the record an action changes, pass the text and a chip together in a row. Leave both empty for a card without a header.

```tsx theme={null}
import { useState } from 'react';
import { ApprovalCard } from 'twenty-ui/components/feedback';
import { CountPager } from 'twenty-ui/components/navigation';
import { IconHelpCircle } from 'twenty-ui/icon';
import { Button } from 'twenty-ui/primitives/input';

const QUESTIONS = [
  'Which team should own the follow-up with Ada?',
  'When should we call her back?',
];

export const FollowUpQuestions = ({ onSend }: { onSend: () => void }) => {
  const [questionIndex, setQuestionIndex] = useState(0);

  return (
    <ApprovalCard
      title={QUESTIONS[questionIndex]}
      icon={<IconHelpCircle size={16} />}
      hint={
        <CountPager
          aria-label="Questions"
          index={questionIndex}
          count={QUESTIONS.length}
          onIndexChange={setQuestionIndex}
          positionText={`${questionIndex + 1}/${QUESTIONS.length}`}
          previousLabel="Previous question"
          nextLabel="Next question"
        />
      }
      actions={
        <Button size="sm" variant="solid" color="accent" onClick={onSend}>
          Send
        </Button>
      }
    >
      Pick an answer or write your own.
    </ApprovalCard>
  );
};
```

## Content

The content sits in a bordered box on the primary background, with inner spacing, by default. Use `contentVariant="list"` for a list that draws its own rows edge to edge inside the box, and `contentVariant="plain"` for content that draws its own surface, such as an email editor. Several plain children are spaced like sections.

## Footer

The footer appears only when you pass `hint` or `actions`. `hint` sits at the start of the row: supporting text, the outcome of a decision, or a small control such as the pager above. Name the primary button after the action it runs and put it last. Your application owns the labels, their translations and the loading and disabled states.

In a front component, answer the approval with `useToolCallApproval()` from `twenty-sdk/front-component`. See [logic functions](https://docs.twenty.com/developers/extend/apps/logic/logic-functions.md).

## Docking

`ApprovalCard` is built on [Card](https://docs.twenty.com/ui/primitives/surfaces/card.md), so a host docks it onto the surface below by setting `--dock-bottom-border-width` and `--dock-bottom-radius` on an ancestor. The AI chat does this above its composer. Cards nested in an `ApprovalCard` never dock.

## Native integration

Native attributes, `className`, `style`, and `ref` target the root `div`, a `Card.Root`. Use `render` to compose a different root element. Unlike a plain `Card.Root`, the root inherits its text color and does not clip its content. The icon is decorative and hidden from assistive technology.

## Props

**actions** `ReactNode`

Footer controls that answer the request, usually small Buttons with the primary action last. Omit them and hint for a card without a footer.

**children** `ReactNode`

What the person reviews or fills in before answering.

**className** `string`

Additional class names merged onto the root.

**contentVariant** `"boxed" | "list" | "plain"` (default: boxed)

How the content is framed: 'boxed' is a bordered box on the primary background with inner spacing, 'list' the same box without inner spacing for lists that draw their own rows, 'plain' no box. Defaults to 'boxed'.

**hint** `ReactNode`

Optional node at the start of the footer, such as supporting text, the outcome of a decision or a pager.

**icon** `ReactNode`

Optional decorative icon node shown before the title.

**ref** `Ref\<HTMLDivElement\>`

Ref to the root div, or the element supplied through render.

**render** `ReactElement\<unknown, string | JSXElementConstructor\<any\>\> | ComponentRenderFn\<HTMLProps, \{\}\>`

Element or callback composition for the root.

**style** `CSSProperties`

Inline styles forwarded to the root.

**title** `ReactNode`

What the card asks about. It wraps when it is long and can hold other nodes, such as a record chip. Leave it and icon empty for a card without a header.


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