Skip to contentSkip to content

SuggestionItem API

API reference docs for the React SuggestionItem component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import { SuggestionItem } from '@mui/x-chat-headless/suggestions';
// or
import { SuggestionItem } from '@mui/x-chat-headless';
// or
import { SuggestionItem } from '@mui/x-chat';

Learn about the difference by reading this guide on minimizing bundle size.

Props

NameTypeDescription
value*string

The value to pre-fill into the composer when the suggestion is clicked.

indexnumber

The index of this item within the suggestions list.

labelstring

Display label. Falls back to value.

slotPropsSuggestionItemSlotProps
slotsPartial

See Slots API below for more details.

The component cannot hold a ref.

Slots

Slot nameClass nameDefault componentDescription
root

Source code

If you did not find the information in this page, consider having a look at the implementation of the component for more detail.