Selectable Tile
A Tile that is selectable. Tiles can contain logos, icons, or text only.
Example
Live Editor
Result
Loading...
Variants
Selection Mode
Selectable Tiles allow two different modes: checkbox-like multi selection, and radio-like single selection. There must always be at least 2 tiles to be used within a grid.
- The component allows radio-like single selection by adding
type='checkbox'
as following example.
Live Editor
Result
Loading...
- The component allows radio-like single selection by adding
type='radio'
as following example.
Live Editor
Result
Loading...
Size
There are two sizes available for selectable tiles: small
and medium
(default).
info
Small tiles can not show a status badge.
Live Editor
Result
Loading...
Tooltip
You can display a tooltip for each SelectableTile item.
To display a tooltip you need to add to your item object tooltipProps
property with a content
.
The Tooltip position is set to auto
by default and can be customized by passing position
like below example.
Live Editor
Result
Loading...
Props
SelectableTile
Name | Type | Default |
---|---|---|
type * Type of radio or checkbox |
| — |
selectedItems * this support single and multiple selected items |
| — |
items * Array of SelectableTileItems |
| — |
size A tile size |
| "medium" |
spacing A number value to set spacing between tiles |
| 8 |
onChange Onchange function |
| — |
columnSpan equal space between tiles |
| 4 |
data-{foo} Data attributes can be used by testing libraries to retrieve components or assert their existence |
| — |
* - the prop is required. |