Skip to content
Skillpedia
Websites & UI (frontend)29k · #9805

getting-started

What it does

This skill shows how to create and display a table of data in a web page built with Alpine.js, using the TanStack Table library. It is for web developers who want a headless table they style themselves.

When to use it

  • ✓When you are building an Alpine.js page that needs a structured table of records.
  • ✓When your table data changes over time and the table must update on screen.
  • ✓When you want to render table headers and cells with the FlexRender helper.

Skill link

https://github.com/TanStack/table/blob/main/packages/alpine-table/skills/getting-started/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/TanStack/table/blob/main/packages/alpine-table/skills/getting-started/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“I am building an Alpine.js page with a list of customers in a table. How do I set that up with TanStack Table?”

5 new skills a week. 1 minute to read.

How it works

It gives code patterns for creating the table from column definitions and data, then shows how to render headers and rows in the page with Alpine template loops.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Load intent load @tanstack/table-core#core first for the headless model, stable inputs, and column inference.

Setup

import Alpine from 'alpinejs'
import {
  FlexRender,
  createTable,
  tableFeatures,
  type ColumnDef,
} from '@tanstack/alpine-table'

type Person = { id: string; name: string }
const features = tableFeatures({})
const columns: Array<ColumnDef<typeof features, Person>> = [
  { accessorKey: 'name', header: 'Name' },
]

Alpine.data('peopleTable', () => {
  const local = Alpine.reactive({
    data: [{ id: '1', name: 'Ada' }] as Array<Person>,
  })
  const table = createTable({
    features,
    columns,
    get data() {
      return local.data
    },
    getRowId: (row) => row.id,
  })

  return { table, FlexRender }
})

window.Alpine = Alpine
Alpine.start()

Render real table structure with x-for; use x-html="FlexRender({ header })" or x-html="FlexRender({ cell })" only for renderer output.

Construction and rendering

Wrap changing data in Alpine.reactive and expose it with get data(). The adapter tracks option getters; data: local.data captures a snapshot and does not follow later array replacements. Keep static columns and features outside getters.

The returned table is a reactive proxy. Read Table APIs directly in x-text, x-for, x-if, or bound attributes; no Subscribe component is needed.

Build table structure and interactive controls as real Alpine markup. Use x-html="FlexRender({ header })" or x-html="FlexRender({ cell })" for renderer output. Alpine does not initialize directives inside x-html strings; use templates or Alpine.bind bundles for buttons and inputs.

Read for the task

  • When adding or configuring optional features, load intent load @tanstack/table-core#table-features and read only references for the requested behavior.
  • For state ownership or reactive reads, read table-state.
  • When tables share features, defaults, or reusable UI, read create-table-hook.

API discovery

Inspect node_modules/@tanstack/alpine-table/dist/index.d.ts, createTable.d.ts, and reactivity.d.ts. Core feature APIs are in node_modules/@tanstack/table-core/dist/features/.

FAQ

Do I need to know TanStack Table already?

Not in depth. The skill points to the core guide for background and then covers the Alpine-specific setup.

How do I keep the table in sync with changing data?

The skill recommends wrapping the data in Alpine's reactive store and exposing it through a getter.

Is this only for Alpine.js?

Yes. It covers the Alpine version of Table v9, and other frameworks have their own guides.

Details

Original description by the author

Create and render Table v9 with the alpine adapter. Route reusable createTableHook defaults, and framework setup; use table-state for reactive ownership.

repo: TanStack/table

Popularity

GitHub stars
29k
Ranking position
#9805
License
MIT
Updated
10/21/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills