Tables - Quick Start Guide

Create responsive, mobile-friendly tables in minutes

Back to Examples

3 Responsive Table Patterns

RSL includes three table styles optimized for different use cases:

3-Minute Setup

1 Include Files

Required Files • HTML


    
                

2 Choose Your Table Type

Pattern 1: Scrollable Table

Best for: Data tables with many columns

Maintains table structure, adds horizontal scrolling on mobile

Code • HTML

Name Email Phone Status
John Doe john@example.com 555-1234 Active

Pattern 2: Responsive Table

Best for: Tables that need to stack on mobile

Stacks rows vertically, shows labels inline with data

⚠ Important: You MUST add data-label="Column Name" to each <td> for this to work!
Code • HTML

Name Email Status
John Doe john@example.com Active

Pattern 3: Responsive-Card Table

Best for: Product lists, user profiles

Transforms into card-style layout on mobile devices

⚠ Important: Requires data-label on each <td> like responsive tables.
Code • HTML

Product Price Stock
Widget A $19.99 In Stock

Quick Reference

Class/AttributePurpose
.scrollableHorizontal scroll on mobile
.responsiveStacks rows vertically on mobile
.responsive-cardCard-style layout on mobile
.sortableVisual sort indicators (requires custom JS)
data-label="..."Column label for mobile view (required for responsive/card tables)
.table-scroll-wrapperWrapper for scrollable tables

Pro Tips

✨ Tip 1: Use .scrollable for data-heavy tables with 6+ columns
✨ Tip 2: Use .responsive for simple tables with 3-5 columns
✨ Tip 3: Use .responsive-card for product/user lists that look better as cards
✨ Tip 4: Always include data-label attributes—they're required for mobile views!
✨ Tip 5: Test on mobile devices to ensure data-label text makes sense

ADA Compliance

RSL Tables are accessibility-friendly:

  • ✅ Semantic <table>, <thead>, <tbody> structure
  • data-label provides context for screen readers on mobile
  • ✅ Keyboard navigable
  • ✅ High contrast styling
Back to Examples