본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)29k · #9831

getting-started

하는 일

이 스킬은 TanStack Table을 사용해 Svelte 앱에서 데이터 테이블을 만들고 표시하는 방법을 보여줍니다. Svelte 5를 쓰고 테이블 스타일을 자유롭게 정하고 싶은 Svelte 개발자를 위한 것입니다.

사용하는 경우

  • ✓레코드를 표로 보여주는 Svelte 컴포넌트를 만들 때.
  • ✓Svelte 테이블의 데이터가 룬에 담겨 있고 화면에서 바로 바뀌어야 할 때.
  • ✓Svelte 테이블에 쿼리나 가상화 기능을 추가하고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/TanStack/table/blob/main/packages/svelte-table/skills/getting-started/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“사용자 목록을 표로 보여주는 Svelte 5 페이지를 만들고 있어요. 어떻게 설정하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

열을 정의하고 createTable로 테이블을 만든 뒤, 템플릿에서 헤더, 행, 셀을 반복하는 컴포넌트를 제공합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Svelte Table setup and integration

Before starting, run intent load @tanstack/table-core#core for the shared headless model and stable-input rules.

Setup

Keep features and columns outside reactive work; expose changing rune values through getters.

<script lang="ts">
  import {
    createTable,
    FlexRender,
    tableFeatures,
  } from '@tanstack/svelte-table'

  type Person = { firstName: string; age: number }
  const features = tableFeatures({})
  const columns = [
    { accessorKey: 'firstName', header: 'First name' },
    { accessorKey: 'age', header: 'Age' },
  ]
  let data = $state<Person[]>([{ firstName: 'Ada', age: 36 }])

  const table = createTable({
    features,
    columns,
    get data() {
      return data
    },
  })
</script>

<table>
  <thead>
    {#each table.getHeaderGroups() as group (group.id)}
      <tr
        >{#each group.headers as header (header.id)}<th
            >{#if !header.isPlaceholder}<FlexRender {header} />{/if}</th
          >{/each}</tr
      >
    {/each}
  </thead>
  <tbody>
    {#each table.getRowModel().rows as row (row.id)}
      <tr
        >{#each row.getAllCells() as cell (cell.id)}<td
            ><FlexRender {cell} /></td
          >{/each}</tr
      >
    {/each}
  </tbody>
</table>

Essential constraints

V9 requires Svelte 5 and createTable. Expose changing runes through getters; data captured once cannot follow reassignment. Keep features and columns outside reactive work and use $derived for transformed arrays.

Table owns models and state. The application owns markup, CSS, interactions, and accessibility. Core-only tables use row.getAllCells(); visibility-aware methods need columnVisibilityFeature. Optional state and APIs require their features. Put row-model slots after their prerequisite features in tableFeatures().

Load by task

  • For repeated features, defaults, typed contexts, or component registries, read reusable app hooks.
  • For Query-backed data, server pages, sorting, filtering, or request keys, read TanStack Query integration.
  • For virtual rows, columns, dynamic measurement, or infinite scrolling, read TanStack Virtual integration.
  • For controlled state, tracked reads, or render subscriptions, read table state.
  • For feature registration, missing feature APIs, or processing ownership, run intent load @tanstack/table-core#table-features and read only references needed by the task.
  • For v8 code, read the migration checklist.

API discovery

Inspect node_modules/@tanstack/svelte-table/dist/index.d.ts, then the exported adapter declarations for the installed version. Inspect optional core APIs under node_modules/@tanstack/table-core/dist/features/.

자주 묻는 질문

이 스킬에는 어떤 Svelte 버전이 필요한가요?

이 스킬은 Table v9에 Svelte 5가 필요하다고 설명합니다.

데이터가 바뀌면 테이블에 어떻게 반영되나요?

룬 값을 getter로 노출하라고 권장하므로, 테이블은 항상 현재 값을 읽습니다.

테이블의 셀은 무엇이 그리나요?

FlexRender 컴포넌트가 헤더와 셀을 그립니다.

상세 정보

작성자의 원본 설명

Create and render Table v9 with the svelte adapter. Route reusable createTableHook components, Query and Virtual integration, and framework setup; use table-state for reactive ownership.

repo: TanStack/table

인기도

GitHub 스타
29k
순위
#9831
라이선스
MIT
업데이트
2026. 10. 21.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬