Edit in GitHubLog an issue

Item

The Item component takes a data object and renders it using a render prop or wraps it in an HTML element.

This component is used as a direct child of the Items fragment.

Props#

NameRequiredDefaultDescription
classesNo{}A classname hash
hasFocusNofalseSet to true if the browser is currently focused on the item
isSelectedNofalseSet to true if the item is currently selected
itemYesA data object. If this is a string, it is rendered as a child
renderYes'div'A render prop or HTML tagname string, such as "div".

Example#

Copied to your clipboard
1import Item from "@magento/peregrine";
2
3<Item
4 classes={{ root: "foo" }}
5 item={{ id: "s", value: "Small" }}
6 render="span"
7/>;
  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.