# <data-table>

A table of rows and columns with a header; the HTML table tags write the same table.

Category: Forms and input.

```ham
<data-table>
    <data-column>Item</data-column>
    <data-column>Price</data-column>
    <data-row>
        <data-cell>Flat white</data-cell>
        <data-cell>$4.20</data-cell>
    </data-row>
    <data-row>
        <data-cell>Almond croissant</data-cell>
        <data-cell>$3.80</data-cell>
    </data-row>
</data-table>
```

How Hype Apps draws it on a phone: [light](https://hypeapps.dev/img/tags/data-table-light.webp), [dark](https://hypeapps.dev/img/tags/data-table-dark.webp).

Any tag also takes gestures: `@on.tap`, `@on.longpress`, `@on.doubletap` and `@on.swipeleft` (and right, up and down). `@click` runs on a tap too.

## Related tags

- [`<data-column>`](https://hypeapps.dev/docs/reference/data-column.md): A column heading of a data table.
- [`<data-row>`](https://hypeapps.dev/docs/reference/data-row.md): One row of a data table, holding a data cell for each column.
- [`<data-cell>`](https://hypeapps.dev/docs/reference/data-cell.md): One cell of a data table row.
- [`<button>`](https://hypeapps.dev/docs/reference/button.md): A tappable button that runs an action: a fetch, a navigation or a statement.
- [`<checkbox>`](https://hypeapps.dev/docs/reference/checkbox.md): A checkbox with a label; its state goes into a variable by name.
- [`<chip>`](https://hypeapps.dev/docs/reference/chip.md): A compact chip: a label, a filter that toggles, a single choice in a set, or an action.
- [`<color-picker>`](https://hypeapps.dev/docs/reference/color-picker.md): A color picker: a hue ring round a disc, with swatches; the chosen color goes into a variable.
- [`<date-picker>`](https://hypeapps.dev/docs/reference/date-picker.md): A date field that opens the platform's date dialog; the picked date goes into a variable.

All tags: https://hypeapps.dev/docs/reference.md · The full reference: https://hypeapps.dev/llms.txt
