livetable

Teach correct LiveTable usage patterns for Phoenix apps with Ecto schemas or custom providers.

209|19|Updated Jan 2, 2025
One-click install
npx skills add https://github.com/gurujada/live_table --skill livetable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: livetable
Source: https://github.com/gurujada/live_table/tree/main
Command: npx skills add https://github.com/gurujada/live_table --skill livetable

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers implement correct LiveTable usage in Phoenix applications, preventing hallucinated or unsafe API usage by providing canonical patterns and best practices for integrating LiveTable UI components with public APIs.

Core Features & Use Cases

  • Schema-backed and custom data providers: Covers both single-schema tables and complex queries with joins, including transformer-based filtering and advanced table options.
  • Card and table display modes: Guides on switching between table and card views, including custom headers and content customization.
  • Actions, headers, and transformers: Demonstrates how to configure per-row actions, custom headers, and transformer-driven query modifications to handle complex scenarios.
  • Real-world examples: Provides usage patterns for admin dashboards, analytics, and data-heavy interfaces with URL-persisted state.

Quick Start

Provide a minimal example that demonstrates a LiveTable-powered index using a single schema, including fields, filters, and options, and describe how to adapt it to a custom provider if needed.

Frequently Asked Questions about livetable

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a data table with a single Ecto schema in Phoenix LiveView?

To build a data table with a single Ecto schema in Phoenix LiveView, you define fields, filters, and options in your LiveTable configuration. This approach provides a canonical, schema-backed index without exposing internal APIs.

What is the correct way to apply transformers for filtering data in Phoenix LiveTable?

Transformers in Phoenix LiveTable are applied to modify queries dynamically, enabling advanced filtering and custom data provider integration. They allow complex query modifications while maintaining safe, public API boundaries.

Can I switch between card and table display modes for UI components in Phoenix LiveView?

Yes, you can switch between card and table display modes in Phoenix LiveView. LiveTable guides configuring both views, including custom headers and content customization, to handle various data presentation needs.

How do I configure per-row actions and custom headers in a Phoenix LiveTable?

Configuring per-row actions and custom headers in a Phoenix LiveTable involves defining action controls and header layouts within your table setup. This ensures discoverable usage and correct URL-persisted state management.

Does Phoenix LiveTable support custom data providers for complex queries with joins?

Yes, Phoenix LiveTable supports custom data providers for complex queries with joins. You can adapt a single-schema table to a custom provider, utilizing transformer-based filtering for advanced data scenarios.

How do I persist table state in the URL for admin dashboards using Phoenix LiveView?

To persist table state in the URL for admin dashboards using Phoenix LiveView, LiveTable manages URL-based state directly. This ensures filters and options remain accessible and shareable without internal API exposure.