sandstone/ Image Item
Provides Sandstone styled image item components and behaviors.
import ImageItem from '@enact/sandstone/ImageItem';Members
ImageItemComponent
A sandstone-styled image item, Marquee and Spottable applied.
Usage:
<ImageItem
src="http://via.placeholder.com/100x100/9037ab/ffffff/png?text=Image0"
label="A secondary caption"
>
The primary caption for the image
</ImageItem>import ImageItem from '@enact/sandstone/ImageItem';ImageItemBaseComponent
A Sandstone styled base component for ImageItem.
import {ImageItemBase} from '@enact/sandstone/ImageItem';Properties
Centers the primary caption and label in vertical orientation.
The primary caption displayed with the image.
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:
caption- The caption component classfullImage- Applied whenorientationprop isverticalwithoutlabelandchildrenhorizontal- Applied whenorientationprop ishorizontalimage- The image component classimageIcon- The image icon component classimageItem- The image item component classlabel- The secondary caption component classselected- Applied whenselectedprop istrueselectionIcon- The icon component class for default selection componentvertical- Applied whenorientationprop isvertical
The voice control intent.
Default: 'Select'Disable ImageItem and becomes non-interactive.
Default: falseA secondary caption displayed with the image.
The layout orientation of the component.
Default: 'vertical'Placeholder image used while src is loaded.
Default: An imageApplies a selected visual effect to the image, but only if
showSelectionis alsotrue.The custom selection component to render. A component can be a stateless functional component,
kind()or React component. The following is an example with custom selection kind.Usage:
const SelectionComponent = kind({ render: () => <div>custom selection component</div> }); <ImageItem selectionComponent={SelectionComponent} />Shows a selection component with a centered icon. When
selectedis true, a check mark is shown.Source for the image. String value or Object of values used to determine which image will appear on a specific screenSize.
ImageItemDecoratorHigher-Order Component
Sandstone-specific ImageItem behaviors to apply to ImageItem.
import {ImageItemDecorator} from '@enact/sandstone/ImageItem';