# ItemTrait

> Provides the operations shared by the item value objects: the copy with one property replaced, and the readers of the array configuration accepted by fromArray().

[API reference](/docs/api/index.md) › [Bootstrap 6](/docs/extensions/bootstrap6/reference/index.md) › [item](/docs/extensions/bootstrap6/reference/item/index.md) › ItemTrait

| trait | `yii2\extensions\bootstrap6\item\ItemTrait` |
| --- | --- |
| Source | [`src/item/ItemTrait.php`](https://github.com/yii2-extensions/bootstrap6/blob/main/src/item/ItemTrait.php#L22) |

Used by 8 types:

- [`AccordionItem`](/docs/extensions/bootstrap6/reference/item/accordionitem/index.md)
- [`BreadcrumbLink`](/docs/extensions/bootstrap6/reference/item/breadcrumblink/index.md)
- [`CarouselItem`](/docs/extensions/bootstrap6/reference/item/carouselitem/index.md)
- [`MenuItem`](/docs/extensions/bootstrap6/reference/item/menuitem/index.md)
- [`NavItem`](/docs/extensions/bootstrap6/reference/item/navitem/index.md)
- [`ProgressBar`](/docs/extensions/bootstrap6/reference/item/progressbar/index.md)
- [`StepItem`](/docs/extensions/bootstrap6/reference/item/stepitem/index.md)
- [`TabItem`](/docs/extensions/bootstrap6/reference/item/tabitem/index.md)

Provides the operations shared by the item value objects: the copy with one property replaced, and the readers of
the array configuration accepted by `fromArray()`.

The using class declares a private constructor whose promoted parameters are its only properties, so the copy
spreads them as named arguments and the constructor validates the new value.