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
classes
No
{}
A classname hash
hasFocus
No
false
Set to true if the browser is currently focused on the item
isSelected
No
false
Set to true if the item is currently selected
item
Yes
A data object. If this is a string, it is rendered as a child
render
Yes
'div'
A render prop or HTML tagname string, such as "div".

Example

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