Marigold
v18.0.0-beta.4
Marigold
v18.0.0-beta.4

Application

MarigoldProvider
RouterProvider

Layout

AppShellbeta
Aside
Aspect
Center
Columns
Container
Grid
Inline
Inset
Pagebeta
Panelbeta
Scrollable
Split
Stack
Tiles

Actions

Buttonupdated
ButtonGroupbeta
Link
LinkButton
ToggleButtonbeta

Form

Autocomplete
Calendar
Checkbox
ComboBox
DateField
DatePicker
DateRangePickerbeta
FileField
Form
NumberField
Radio
RangeCalendaralpha
SearchField
SegmentedControlbeta
Select
SelectListupdated
Slider
Switchupdated
TagFieldbeta
TextArea
TextField
TimeField

Collection

Cardupdated
Table
Tag
ActionBaralpha

Navigation

Accordion
Breadcrumbs
Pagination
Sidebarbeta
Tabs
TopNavigationbeta

Overlay

ActionMenualpha
ContextualHelp
Dialog
Drawer
Menuupdated
Toastbeta
Tooltip

Content

Badge
Descriptionalpha
Divider
EmptyStatebeta
ErrorStatebeta
Headline
Keyboardbeta
List
Loader
SectionMessage
SVG
Text
TextValuealpha
Titlealpha

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
parseFormData
useAsyncListData
useLandmark
useListData
useTheme
VisuallyHidden
Components

Tiles

Organize the content in tiles of equal width.

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.

Grand Avenue Ballroom

Grand Avenue Ballroom

An elegant ballroom with crystal chandeliers and a full proscenium stage, ideal for gala dinners, award nights, and concerts.
Maple Court Theatre

Maple Court Theatre

A comfortable mid‑size theatre with raked seating and modern AV, designed for comedy, theatre, and lectures.
Broadway Community Center

Broadway Community Center

A multipurpose community center with flexible rooms and a small auditorium for talks, classes, and local performances.
Hillcrest Open Pavilion

Hillcrest Open Pavilion

An open‑air pavilion with a covered stage and movable seating, set in a hillside park for fairs and seasonal shows.
Bloomfield Garden Lawn

Bloomfield Garden Lawn

A landscaped garden lawn with power access and tent options, great for large outdoor receptions and summer series.
import { venues } from '@/lib/data/venues';import { Card, Headline, Stack, Text, Tiles } from '@marigold/components';export default () => (  <Tiles tilesWidth="200px" space={2}>    {venues.slice(5).map(venue => (      <Card key={crypto.randomUUID()}>        <Card.Media>          <img src={venue.image} alt={venue.name} width={200} height={200} />        </Card.Media>        <Card.Content>          <Stack space={2} alignX="center">            <Headline level={3}>{venue.name}</Headline>            <Text>{venue.description}</Text>          </Stack>        </Card.Content>      </Card>    ))}  </Tiles>);

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.

import { Card, Tiles } from '@marigold/components';import { Rectangle } from '@/ui/Rectangle';export default () => (  <Tiles space={1} tilesWidth="200px" equalHeight>    <Card>      <Card.Content>        <Rectangle height="100px" />      </Card.Content>    </Card>    <Card>      <Card.Content>        <Rectangle height="100px" />        <Rectangle height="100px" />      </Card.Content>    </Card>    <Card>      <Card.Content>        <Rectangle height="100px" />      </Card.Content>    </Card>  </Tiles>);

Stretch width

Using the stretch property will make the tiles fully responsive. Meaning, they will distribute available width between them while not getting smaller than the given tilesWidth.

import { useState } from 'react';import { Card, Stack, Switch, Tiles } from '@marigold/components';import { Rectangle } from '@/ui/Rectangle';export default () => {  const [stretch, setStretch] = useState(false);  return (    <Stack space={2}>      <Switch label="Toggle stretch" onChange={() => setStretch(!stretch)} />      <Tiles space={2} stretch={stretch} tilesWidth="100px">        <Card>          <Card.Content>            <Rectangle height="100px" />          </Card.Content>        </Card>        <Card>          <Card.Content>            <Rectangle height="100px" />          </Card.Content>        </Card>        <Card>          <Card.Content>            <Rectangle height="100px" />          </Card.Content>        </Card>        <Card>          <Card.Content>            <Rectangle height="100px" />          </Card.Content>        </Card>      </Tiles>    </Stack>  );};

Props

Did you know? You can explore, test, and customize props live in Marigold's storybook. Watch the effects they have in real-time!
View Tiles stories

Tiles

Prop

Type

Accessibility props (6)

Prop

Type

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 control over the layout, you should use <Grid> component instead.

Related

Building layouts

Learn how to build layouts.
Last update: 4 months ago

Stack

Display children vertically with giving space between.

Button

Buttons allow users to trigger actions.

On this page

UsageEqual heightsStretch widthPropsTilesAlternative componentsRelated