{% extends "base.html" %} {% import "components/macros.html" as ui %} {% block title %}Tables & Scroll Sync - Design System Wiki{% endblock %} {% block content %}
A standardized container macro for horizontal scroll synchronization and scrollbar-fitting layout. It resolves the common usability issue of unreachable scrollbars on wide tables.
The macro standardizes the background styling, shadows, rounded borders, vertical height bounds, sticky headers, and outputs a synced scrollbar clone that rests at the top of the table.
| ID Code | Full Name | Position Title | Base Office | Current Shift Status | Actions & Config |
|---|---|---|---|---|---|
| #001_a9f | Arthur Dent | Sandwich Maker | Space Station 4 | ACTIVE | |
| #002_c3d | Tricia McMillan | Reporter / Anchor | Sector 12 Office | ON DUTY | |
| #003_e5f | Ford Prefect | Researcher | Betelgeuse V | TRAVELING | |
| #004_g7h | Zaphod Beeblebrox | Ex-President | Heart of Gold | SUSPENDED |
Since HTML natively positions horizontal scrollbars only at the bottom of overflow elements, the component generates a custom dummy scroll container at the top of the table. A Javascript listener observes layout resizing and syncs the horizontal offsets of both the top scroll track and the main table scroll track dynamically.
To prevent scrollbars from clipping at the corners of high-radius panels (like Shadcn's rounded-3xl panels), the border and shadow styling are kept on the outer wrapper, while the overflow scroll boundary is restricted to an inner container with slightly smaller radius adjustments (rounded-[22px]).