Tiles
Tiles are Radio buttons styled with icons or images.
- Like Radios, Tiles are for choices that can’t occur at the same time
How to use it
Default
The typical usage of a Tiles component.
Description
A description adds additional context to the Tile label.
Disabled
Disabled Tiles are not interactive and may not be perceived by a screen reader.
Layout
Content within a single Tile is vertically centered by default. The layout can
be adjusted by setting isCentered
to false.
Configuration
- Name9.1.0•View source•View on npm
- Installnpm install @zendeskgarden/react-forms
- Depsnpm install react react-dom styled-components @zendeskgarden/react-theming
- Importimport { Tiles } from '@zendeskgarden/react-forms'
API
Tiles
Extends HTMLAttributes<HTMLDivElement>
Prop name | Type | Default | Description |
---|---|---|---|
isCentered | boolean | true | Centers tile content |
name | string | Required | Sets the name used to reference the value of the control |
onChange | ChangeEventHandler<HTMLInputElement> | Handles selection change event | |
value | string | number | readonly string[] | Sets the selected value in a controlled tiles component |
Tiles.Description
Extends HTMLAttributes<HTMLSpanElement>
Tiles.Icon
Extends HTMLAttributes<HTMLSpanElement>
Tiles.Label
Extends HTMLAttributes<HTMLSpanElement>
Tiles.Tile
Extends HTMLAttributes<HTMLLabelElement>
Prop name | Type | Default | Description |
---|---|---|---|
disabled | boolean | Indicates that the element is not interactive | |
value | string | number | readonly string[] | Sets the value of the tile |