Tiles
The <Tiles>
is a layout component which is based on CSS grid system.
Usage
<Tiles>
serves as a versatile container, ideal for constructing panels, cards, lists, and other content components that organize and group information. They automatically wraps children to a new line if the space given is not enough to show the <Tiles>
in one row.
It's possible to display the items with some spacing through space
prop or set a minimum width for all items inside <Tiles>
with tilesWidth
prop.

Belly Laugh Ballroom

Snicker Sanctuary

The Jester's Junction

Punning Pavilion

Guffaw Gardens
Equal heights
If you need to have the items in the <Tiles>
take the same height, you can use the equalHeight
property, which is a boolean value that can be used to size the items of the <Tiles>
. In this case, all items adopt the size of the largest card, making it essential when you want all items to match the largest child’s dimensions.
Stretch width
Using the stretch
property will make the tiles fully responsive. Meaning, they will distribute available width between them while not getting smaller then the given tilesWidth
.
Props
aria-describedby?
string;
aria-details?
string;
aria-label?
string;
aria-labelledby?
string;
aria-live?
"off" | "polite" | "assertive";
- 'off': Updates are not announced unless focused.
- 'polite': Updates are announced when the user is idle.
- 'assertive': Updates are announced immediately, interrupting other announcements.
children
ReactNode;
equalHeight?
boolean;
"false"
id?
string;
role?
"region" | (string & {});
region
is used as a role, an aria-label
or aria-labelledby
must be provided.
See MDN.space?
GapSpaceProp;
0
stretch?
boolean;
"false"
tilesWidth?
string;
250px
Alternative components
Columns: It should be noted that
<Tiles>
is used for children with the same width. If you want to set different widths for the children use<Columns>
instead.Grid: If you need more custom controll over the layout, you should use
<Grid>
component instead.