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

# ListItemButton

> Butoane de acțiune native cu aspectul partajat al rândurilor de listă.

## Prezentare generală

Utilizați `ListItemButton` pentru rânduri de acțiune și butoane de selectare independente. Combină aspectul [ListItem](https://docs.twenty.com/ro/ui/primitives/navigation/list-item.md) cu un buton nativ, inclusiv activarea cu Enter și Spațiu, focalizarea și comportamentul dezactivat. Implicit, are `type="button"`.

**Light**

[Exemplu ListItemButton (light)](https://storybook.twenty.com/iframe.html?id=ui-components-listitembutton--display\&viewMode=story\&globals=colorScheme:light)

**Dark**

[Exemplu ListItemButton (dark)](https://storybook.twenty.com/iframe.html?id=ui-components-listitembutton--display\&viewMode=story\&globals=colorScheme:dark)

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

## Utilizare

```tsx theme={null}
import { ListItemButton } from 'twenty-ui/components/navigation';
import { IconCopy } from 'twenty-ui/icon';

export const DuplicateAction = ({
  onDuplicate,
}: {
  onDuplicate: () => void;
}) => (
  <ListItemButton
    startIcon={<IconCopy />}
    description="Create a copy"
    onClick={onDuplicate}
  >
    Duplicate
  </ListItemButton>
);
```

## Acțiuni și stare dezactivată

Transmiteți direct `onClick` și `disabled`. Butoanele dezactivate folosesc aspectul corespunzător al rândului, împiedică activarea și ies din ordinea de tabulare.

```tsx theme={null}
import { ListItemButton } from 'twenty-ui/components/navigation';
import { IconCopy } from 'twenty-ui/icon';

type DuplicateActionProps = {
  onDuplicate: () => void;
  disabled?: boolean;
};

export const DuplicateAction = ({
  onDuplicate,
  disabled = false,
}: DuplicateActionProps) => (
  <ListItemButton
    disabled={disabled}
    onClick={onDuplicate}
    startIcon={<IconCopy />}
    description="Create a copy"
  >
    Duplicate
  </ListItemButton>
);
```

**Light**

[Rând de acțiune dezactivat (light)](https://storybook.twenty.com/iframe.html?id=ui-components-listitembutton--disabled\&viewMode=story\&globals=colorScheme:light)

**Dark**

[Rând de acțiune dezactivat (dark)](https://storybook.twenty.com/iframe.html?id=ui-components-listitembutton--disabled\&viewMode=story\&globals=colorScheme:dark)

[Open in Storybook](https://storybook.twenty.com/?path=/story/ui-components-listitembutton--disabled)

Setați `focusableWhenDisabled` pentru a menține focalizabil un buton dezactivat. Folosește `aria-disabled` și continuă să blocheze activarea. Atributele, evenimentele, stilurile, numele de clase ale butonului nativ și o referință `HTMLButtonElement` ajung la buton. Evenimentele se propagă normal; apelanții furnizează orice politică pentru `stopPropagation()` sau `preventDefault()`.

## Selectare și sloturi vizuale

Aplicația dvs. gestionează independent stările `active`, `selected` și `focused`. Utilizați `active` pentru rândul deschis sau curent. Asociați `selected` cu starea accesibilă corespunzătoare, precum `aria-pressed` pentru un buton de comutare. `focused` evidențiază rândul fără a muta focalizarea DOM. Indicatorii și sugestiile pentru scurtături sunt decorative; aplicația dvs. înregistrează scurtăturile și gestionează navigarea.

```tsx theme={null}
import { useState } from 'react';
import { ListItemButton } from 'twenty-ui/components/navigation';

export const ShowArchivedToggle = () => {
  const [selected, setSelected] = useState(false);

  return (
    <ListItemButton
      aria-pressed={selected}
      selected={selected}
      indicator="check"
      onClick={() => setSelected(!selected)}
    >
      Show archived records
    </ListItemButton>
  );
};
```

**Light**

[Rând de acțiune selectat (light)](https://storybook.twenty.com/iframe.html?id=ui-components-listitembutton--selected\&viewMode=story\&globals=colorScheme:light)

**Dark**

[Rând de acțiune selectat (dark)](https://storybook.twenty.com/iframe.html?id=ui-components-listitembutton--selected\&viewMode=story\&globals=colorScheme:dark)

[Open in Storybook](https://storybook.twenty.com/?path=/story/ui-components-listitembutton--selected)

Utilizați `startIcon`, `endIcon`, `description` și `descriptionPlacement` pentru conținut suplimentar. `color="danger"` marchează o acțiune distructivă. `shortcutJoinLabel` controlează textul dintre scurtăturile secvențiale, iar `hasSubmenu` afișează un indicator de submeniu.

## Conținut de suport pe mai multe rânduri

Setați `descriptionPlacement="below"` pentru a încadra textul de suport sub etichetă. Eticheta își păstrează comportamentul de trunchiere. Transmiteți [Text](https://docs.twenty.com/ro/ui/primitives/typography/text.md) cu `truncate` sau `lineClamp` ca `description` atunci când aveți nevoie de o previzualizare mai scurtă. Poziționările `inline` și `end` își păstrează aspectul existent.

```tsx theme={null}
import { ListItemButton } from 'twenty-ui/components/navigation';
import { Avatar } from 'twenty-ui/primitives/data-display';

type PlanningActionProps = {
  active?: boolean;
  disabled?: boolean;
  onOpen: () => void;
};

export const PlanningAction = ({
  active = false,
  disabled = false,
  onOpen,
}: PlanningActionProps) => (
  <ListItemButton
    active={active}
    disabled={disabled}
    descriptionPlacement="below"
    description="Review the proposed timeline and confirm the next steps with the team."
    startIcon={<Avatar name="Alex Morgan" size="md" imageProps={{ alt: '' }} />}
    onClick={onOpen}
  >
    Quarterly planning
  </ListItemButton>
);
```

`active` aplică fundalul rândului curent. Setați `selectionAppearance="accent"` pentru o umplere de accent pe rândurile selectate, cu orice poziționare a descrierii; opțiunea implicită păstrează stilul existent de selecție bazat pe indicator. `focused` aplică fundalul evidențiat partajat; conturul vizibil la focalizare urmează focalizarea reală de la tastatură. Aceste proprietăți nu adaugă stare accesibilă și nu mută focalizarea. Activarea nativă a butonului și comportamentul dezactivat rămân neschimbate.

## Comenzi independente

Păstrați butoanele și casetele de selectare independente lângă `ListItemButton`, astfel încât fiecare să își păstreze propria focalizare și activare. Nu le imbricați în sloturile sale de conținut sau de pictogramă. Componenta nu are un slot `actions`. Utilizați un `ListItem` cu rădăcina sa implicită `div` pentru [un rând cu controale independente](https://docs.twenty.com/ro/ui/primitives/navigation/list-item.md#independent-controls) și asigurați comportamentul dezactivat și propagarea evenimentelor pentru fiecare control.

```tsx theme={null}
import { ListItemButton } from 'twenty-ui/components/navigation';
import { Button } from 'twenty-ui/primitives/input';

type ContactActionsProps = {
  onOpen: () => void;
  onDetails: () => void;
};

export const ContactActions = ({ onOpen, onDetails }: ContactActionsProps) => (
  <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
    <ListItemButton onClick={onOpen} description="Account owner">
      Alex Morgan
    </ListItemButton>
    <Button onClick={onDetails} aria-label="Open Alex Morgan's details">
      Details
    </Button>
  </div>
);
```

**Light**

[Comenzi de acțiune adiacente (light)](https://storybook.twenty.com/iframe.html?id=ui-components-listitembutton--independent-action\&viewMode=story\&globals=colorScheme:light)

**Dark**

[Comenzi de acțiune adiacente (dark)](https://storybook.twenty.com/iframe.html?id=ui-components-listitembutton--independent-action\&viewMode=story\&globals=colorScheme:dark)

[Open in Storybook](https://storybook.twenty.com/?path=/story/ui-components-listitembutton--independent-action)

Utilizați `ListItem` pentru conținut pasiv, linkuri sau proprietari semantici personalizați. Folosește părțile de element existente [Dropdown](https://docs.twenty.com/ro/ui/components/navigation/dropdown.md) și [Select](https://docs.twenty.com/ro/ui/primitives/input/select.md) în cadrul containerelor lor pop-up, care oferă roluri și navigare cu tastatura.

## Proprietăți

**active** `boolean`

Marks the open or current item independently of selection and focus. The caller supplies accessible state.

**color** `"danger" | "neutral"`

Color of the text and icons. `danger` marks a destructive action.

**description** `ReactNode`

Supporting text, placed according to `descriptionPlacement`.

**descriptionPlacement** `"below" | "end" | "inline"`

Places supporting content inline after the label, at the end, or below it with wrapping. Inline is the default.

**disabled** `boolean` (default: false)

Disables activation and applies the matching row appearance.

**endIcon** `ReactNode`

Icon rendered after the content.

**focusableWhenDisabled** `boolean` (default: false)

Keeps a disabled button focusable with aria-disabled while preventing activation.

**focused** `boolean`

Highlights the row without moving DOM focus.

**hasSubmenu** `boolean`

Displays a decorative submenu indicator.

**indicator** `"check" | "checkbox" | "none"`

Selection indicator: a check icon after the content or a checkbox before
it.

**ref** `Ref\<HTMLButtonElement\>`

Ref to the native HTMLButtonElement.

**selected** `boolean`

Applies selected styling and a decorative indicator. The caller supplies selection state and accessible semantics.

**selectionAppearance** `"accent" | "default"`

Selection styling independent of description placement. `default` preserves indicator-based styling; `accent` fills selected rows with the accent background.

**shortcut** `ShortcutDefinition`

Displays decorative shortcut hints. The caller registers the shortcuts.

**shortcutJoinLabel** `string`

Text between sequential shortcut steps. Defaults to `then`; pass an empty string to omit it.

**startIcon** `ReactNode`

Icon rendered before the content.


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