# Grid

## Fieldtypes

You can use any fieldtypes inside a Grid. Just remember that because you can doesn't mean you should. Your UI experience will vary greatly. Make sure to compare the experience with the other meta-fields: [Replicator](/fieldtypes/replicator.md) and [Bard](/fieldtypes/bard.md).

## Data Structure

The Grid field creates a YAML collection (associative array).

## Templating

The example below would have the following data which can be looped through as a tag pair with access to the column data as variables.

```yaml
cast:
  -
    actor: Mark Hamill
    character: Luke Skywalker
  -
    actor: Harrison Ford
    character: Han Solo
```

::tabs

::tab antlers

```antlers
<h3>Star Wars Cast</h3>
<ul>
    {{ cast }}
        <li>{{ character }} played by {{ actor }}</li>
    {{ /cast }}
</ul>
```

::tab blade

```blade
<h3>Star Wars Cast</h3>
<ul>
	@foreach ($cast as $role)
	<li>{{ $role->character }} played by {{ $role->actor }}</li>
	@endforeach
</ul>
```

::

```html
<h3>Star Wars Cast</h3>
<ul>
    <li>Luke Skywalker played by Mark Hamill</li>
    <li>Han Solo played by Harrison Ford</li>
</ul>
```
