| title | ListItem Class definition | |||
|---|---|---|---|---|
| description | The ListItem class represents an item in a list. It is used to display items in the command palette. | |||
| ms.date | 2/25/2025 | |||
| ms.topic | reference | |||
| no-loc |
|
Namespace: Microsoft.CommandPalette.Extensions.Toolkit
Inherits CommandItem
Implements IListItem
The ListItem class represents an item in a list. It is used to display items in the command palette and provides properties and methods for managing the item's appearance and behavior.
| Constructor | Description |
|---|---|
| ListItem(ICommand) | Initializes a new instance of the ListItem class with the specified command. |
| ListItem(ICommandItem) | Initializes a new instance of the ListItem class with the specified command item. |
| Property | Type | Description |
|---|---|---|
| Details | IDetails | Provides additional details about the item. |
| Section | String | The section to which the item belongs. This property is used to group items in the list. |
| Tags | ITag[] | The tags associated with the item. Tags are used to categorize items and can be used for filtering. |
| TextToSuggest | String | The text to suggest for the item. This property is used to provide suggestions for the item when the user types in the command palette. |