AdaptTable for Vue Unstyled

Mobile cards in Vue Unstyled

Below the mobile breakpoint every row becomes a card — same columns, same row content, same query state. Use Automatic, Phone cards or Scrollable table to compare the same data without remounting.

Per column, mobileLabel and hideOnMobile tune what a card shows, and on a phone the pager gives way to infinite scroll: the next rows load as the list reaches its end. There is no second layout to build.

The code

<script setup lang="ts">
import type { ColumnDef } from "@adapttable/vue";
import { DataTable } from "@adapttable/vue-unstyled";

defineProps<{ rows: readonly Person[] }>();

const columns: ColumnDef<Person>[] = [
  { key: "name", mobileLabel: "" },
  { key: "team", mobileLabel: "Team" },
  { key: "email", hideOnMobile: true },
];
const rowKey = (row: Person) => row.id;
</script>

<template>
  <DataTable :data="rows" :columns="columns" :row-key="rowKey" />
</template>

Install

pnpm add @adapttable/vue-unstyled @adapttable/vue @adapttable/core

The same feature in the other kits

More Vue Unstyled features

Reference: mobile. More of this kit: AdaptTable for Vue Unstyled, or the live demo.