sandstone/ Icon Item
Provides Sandstone styled icon item components and behaviors.
import IconItem from '@enact/sandstone/IconItem';
Members
IconItemComponent
A sandstone-styled icon item, Marquee and Spottable applied.
Usage:
<IconItem
background="#1b1b1b"
bordered
icon="usb"
/>
import IconItem from '@enact/sandstone/IconItem';
IconItemBaseComponent
A Sandstone styled base component for IconItem.
import {IconItemBase} from '@enact/sandstone/IconItem';
Properties
The background color, gradient, or image of this item. Accepts any format of color, gradient type value, and image url.
Example: '#ff0000', 'radial-gradient(crimson, skyblue)', 'url(http://example.com/image.png) center / cover'
Specifies bordered or borderless.
The custom component rendred as the content of this IconItem.
Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
iconItem
- The icon item component classcontent
- The class for the content area except titlebordered
- The border classicon
- The icon component classimage
- The image component classlabelContainer
- The label container classlabel
- The label component classtitle
- The title component class
The voice control intent.
Default: 'Select'Disable IconItem and becomes non-interactive.
The icon content. If this is specified, Icon will be shown as the content.
Source and size for the image. See the datails in ImageShape
A label displayed in the content.
The color of label.
Default: 'light'Determines what triggers the label to show.
Default: 'render'Title text showing below the icon.
Determines what triggers the title to show.
Default: 'render'
IconItemDecoratorHigher-Order Component
Sandstone-specific IconItem behaviors to apply to IconItem.
import {IconItemDecorator} from '@enact/sandstone/IconItem';
Type Definitions
ImageShapeObject
The shape for image of IconItem.
- size •
- Object
Size for the image. The following properties should be provided:
height
- The height of the imagewidth
- The width of the image
- src •
- StringObject
Source for the image. String value or Object of values used to determine which image will appear on a specific screenSize.