Free Website Audit β€” Find what’s slowing your site down

0.1.0

Table to Cards

Responsive table that transforms to cards on mobile using ResizeObserver.

Responsive table that transforms to cards on mobile using ResizeObserver.

Features

  • βœ… Zero dependencies - Pure React implementation
  • βœ… Full accessibility - ARIA labels, keyboard navigation, screen reader support
  • βœ… Theme support - Light, dark, and auto modes
  • βœ… Reduced motion support - Respects user preferences

Props

columns(required)

  • Type: TableColumn[] | string
  • Table columns configuration (array or JSON string)

data(required)

  • Type: TableRow[] | string
  • Table data rows (array or JSON string)

breakpoint

  • Type: number - Default: 640
  • Breakpoint width (px) to switch to card view

theme

  • Type: 'light' | 'dark' | 'auto' - Default: 'auto'
  • Theme mode

radius

  • Type: number - Default: 8
  • Border radius in pixels

density

  • Type: 'comfortable' | 'compact' - Default: 'comfortable'
  • Layout density

animate

  • Type: boolean - Default: true
  • Enable animations

className

  • Type: string
  • Additional CSS class

a11yLabel

  • Type: string
  • Accessibility label for table

Customization

CSS Variables

Override these variables in your Webflow custom code or CSS:

--cc-radius: 8px; /* Border radius */

Webflow Classes

Target these classes in Webflow Designer for custom styles:

  • .cc-table-to-cards - Component wrapper