For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/table.md.
v0.0.57
  • English
  • Table

    Data Display@rockshin/tao-ui

    Displays structured row and column data with selection, sorting, filtering, and pagination hooks.

    When to use

    Use Table for dense, comparable records that benefit from aligned columns.

    Recommended

    • Keep columns focused on the task.
    • Use stable row keys.
    • Control sorting and pagination when data is remote.
    • Gate secondary columns with column.responsive (e.g. ['lg']) instead of hand-rolled media queries.

    Avoid

    • Do not use Table for card-like content where comparison is not important.

    Examples

    Basic usage

    Name
    Role
    Ada LovelaceEngineer
    Grace HopperScientist
    TSX

    Variants

    Name
    Role
    AdaEngineer
    GraceScientist
    Name
    Role
    AdaEngineer
    GraceScientist
    Name
    Role
    AdaEngineer
    GraceScientist
    Name
    Role
    AdaEngineer
    GraceScientist
    TSX

    Sizes and borders

    Name
    Status
    BuildPassing
    Name
    Status
    BuildPassing
    Name
    Status
    BuildPassing
    TSX

    Loading, empty, and pagination

    Name
    No Data
    Name
    No matching users.
    Name
    User 1
    User 2
    User 3
    User 4
    User 5
    TSX

    Fixed header, expandable rows, and summary

    scroll.y caps the body height and pins the header; expandable renders details under a row (the expand column sits before the selection column); summary returns Table.Summary.Row / Table.Summary.Cell footer rows — Cell.index counts from the expand/selection columns to sync fixed columns, and `` pins the footer while the body scrolls.

    Name
    Team
    Score
    User 1Design60
    User 2Engineering67
    User 3Sales74
    User 4Design81
    User 5Engineering88
    User 6Sales95
    User 7Design62
    User 8Engineering69
    User 9Sales76
    User 10Design83
    User 11Engineering90
    User 12Sales97
    User 13Design64
    User 14Engineering71
    User 15Sales78
    User 16Design85
    User 17Engineering92
    User 18Sales99
    User 19Design66
    User 20Engineering73
    User 21Sales80
    User 22Design87
    User 23Engineering94
    User 24Sales61
    User 25Design68
    User 26Engineering75
    User 27Sales82
    User 28Design89
    User 29Engineering96
    User 30Sales63
    Total2365
    TSX

    Sorting

    Configure sorting on columns and click a header to switch the sort direction.

    Role
    Alice22admin
    Eve22viewer
    Alice22editor
    Bob23editor
    Frank23admin
    Bob23viewer
    Charlie24viewer
    Grace24editor
    Charlie24admin
    Diana25admin
    TSX

    Column filtering

    Provide filter choices and a predicate, then select items in the column menu.

    Name
    Age
    Role
    Department
    Alice22adminEngineering
    Bob23editorDesign
    Charlie24viewerMarketing
    Diana25adminSales
    Eve26editorEngineering
    Frank27viewerDesign
    Grace28adminMarketing
    Hank29editorSales
    Alice30viewerEngineering
    Bob31adminDesign
    TSX

    Controlled row selection

    Use a stable record ID for rowKey, such as a database ID. Keep selected keys in rowSelection.selectedRowKeys and update them from rowSelection.onChange.

    Return { disabled: true } from rowSelection.getCheckboxProps(record) for rows that cannot be selected. The header checkbox applies to eligible rows on the current page and preserves selection on other pages. Since 0.0.49, Table also uses the current disabled state when rows change and the callback stays the same.

    Selected: none

    ID
    Name
    Age
    Email
    Role
    1Alice22user1@example.comadmin
    2Bob23user2@example.comeditor
    3Charlie24user3@example.comviewer
    4Diana25user4@example.comadmin
    5Eve26user5@example.comeditor
    6Frank27user6@example.comviewer
    7Grace28user7@example.comadmin
    8Hank29user8@example.comeditor
    9Alice30user9@example.comviewer
    10Bob31user10@example.comadmin
    TSX

    Horizontal scrolling and fixed columns

    Combine column widths with scroll.x; fixed columns preserve context while scrolling.

    ID
    Name
    Age
    Email
    Role
    Department
    Actions
    1Alice22user1@example.comadminEngineering
    2Bob23user2@example.comeditorDesign
    3Charlie24user3@example.comviewerMarketing
    4Diana25user4@example.comadminSales
    5Eve26user5@example.comeditorEngineering
    6Frank27user6@example.comviewerDesign
    7Grace28user7@example.comadminMarketing
    8Hank29user8@example.comeditorSales
    TSX

    Fixed header

    scroll.y creates a bounded scrolling body while retaining the table header.

    ID
    Name
    Age
    Email
    Role
    Department
    1Alice22user1@example.comadminEngineering
    2Bob23user2@example.comeditorDesign
    3Charlie24user3@example.comviewerMarketing
    4Diana25user4@example.comadminSales
    5Eve26user5@example.comeditorEngineering
    6Frank27user6@example.comviewerDesign
    7Grace28user7@example.comadminMarketing
    8Hank29user8@example.comeditorSales
    9Alice30user9@example.comviewerEngineering
    10Bob31user10@example.comadminDesign
    11Charlie32user11@example.comeditorMarketing
    12Diana33user12@example.comviewerSales
    13Eve34user13@example.comadminEngineering
    14Frank35user14@example.comeditorDesign
    15Grace36user15@example.comviewerMarketing
    16Hank37user16@example.comadminSales
    17Alice38user17@example.comeditorEngineering
    18Bob39user18@example.comviewerDesign
    19Charlie40user19@example.comadminMarketing
    20Diana41user20@example.comeditorSales
    21Eve22user21@example.comviewerEngineering
    22Frank23user22@example.comadminDesign
    23Grace24user23@example.comeditorMarketing
    24Hank25user24@example.comviewerSales
    25Alice26user25@example.comadminEngineering
    26Bob27user26@example.comeditorDesign
    27Charlie28user27@example.comviewerMarketing
    28Diana29user28@example.comadminSales
    29Eve30user29@example.comeditorEngineering
    30Frank31user30@example.comviewerDesign
    31Grace32user31@example.comadminMarketing
    32Hank33user32@example.comeditorSales
    33Alice34user33@example.comviewerEngineering
    34Bob35user34@example.comadminDesign
    35Charlie36user35@example.comeditorMarketing
    36Diana37user36@example.comviewerSales
    37Eve38user37@example.comadminEngineering
    38Frank39user38@example.comeditorDesign
    39Grace40user39@example.comviewerMarketing
    40Hank41user40@example.comadminSales
    41Alice22user41@example.comeditorEngineering
    42Bob23user42@example.comviewerDesign
    43Charlie24user43@example.comadminMarketing
    44Diana25user44@example.comeditorSales
    45Eve26user45@example.comviewerEngineering
    46Frank27user46@example.comadminDesign
    ID
    Name
    Age
    Email
    Role
    Department
    1Alice22user1@example.comadminEngineering
    2Bob23user2@example.comeditorDesign
    3Charlie24user3@example.comviewerMarketing
    4Diana25user4@example.comadminSales
    5Eve26user5@example.comeditorEngineering
    6Frank27user6@example.comviewerDesign
    7Grace28user7@example.comadminMarketing
    8Hank29user8@example.comeditorSales
    9Alice30user9@example.comviewerEngineering
    10Bob31user10@example.comadminDesign
    11Charlie32user11@example.comeditorMarketing
    12Diana33user12@example.comviewerSales
    13Eve34user13@example.comadminEngineering
    14Frank35user14@example.comeditorDesign
    15Grace36user15@example.comviewerMarketing
    16Hank37user16@example.comadminSales
    17Alice38user17@example.comeditorEngineering
    18Bob39user18@example.comviewerDesign
    19Charlie40user19@example.comadminMarketing
    20Diana41user20@example.comeditorSales
    21Eve22user21@example.comviewerEngineering
    22Frank23user22@example.comadminDesign
    23Grace24user23@example.comeditorMarketing
    24Hank25user24@example.comviewerSales
    25Alice26user25@example.comadminEngineering
    26Bob27user26@example.comeditorDesign
    27Charlie28user27@example.comviewerMarketing
    28Diana29user28@example.comadminSales
    29Eve30user29@example.comeditorEngineering
    30Frank31user30@example.comviewerDesign
    31Grace32user31@example.comadminMarketing
    32Hank33user32@example.comeditorSales
    33Alice34user33@example.comviewerEngineering
    34Bob35user34@example.comadminDesign
    35Charlie36user35@example.comeditorMarketing
    36Diana37user36@example.comviewerSales
    37Eve38user37@example.comadminEngineering
    38Frank39user38@example.comeditorDesign
    39Grace40user39@example.comviewerMarketing
    40Hank41user40@example.comadminSales
    41Alice22user41@example.comeditorEngineering
    42Bob23user42@example.comviewerDesign
    43Charlie24user43@example.comadminMarketing
    44Diana25user44@example.comeditorSales
    45Eve26user45@example.comviewerEngineering
    46Frank27user46@example.comadminDesign
    ID
    Name
    Age
    Email
    Role
    Department
    1Alice22user1@example.comadminEngineering
    2Bob23user2@example.comeditorDesign
    3Charlie24user3@example.comviewerMarketing
    4Diana25user4@example.comadminSales
    5Eve26user5@example.comeditorEngineering
    6Frank27user6@example.comviewerDesign
    7Grace28user7@example.comadminMarketing
    8Hank29user8@example.comeditorSales
    9Alice30user9@example.comviewerEngineering
    10Bob31user10@example.comadminDesign
    11Charlie32user11@example.comeditorMarketing
    12Diana33user12@example.comviewerSales
    13Eve34user13@example.comadminEngineering
    14Frank35user14@example.comeditorDesign
    15Grace36user15@example.comviewerMarketing
    16Hank37user16@example.comadminSales
    17Alice38user17@example.comeditorEngineering
    18Bob39user18@example.comviewerDesign
    19Charlie40user19@example.comadminMarketing
    20Diana41user20@example.comeditorSales
    21Eve22user21@example.comviewerEngineering
    22Frank23user22@example.comadminDesign
    23Grace24user23@example.comeditorMarketing
    24Hank25user24@example.comviewerSales
    25Alice26user25@example.comadminEngineering
    26Bob27user26@example.comeditorDesign
    27Charlie28user27@example.comviewerMarketing
    28Diana29user28@example.comadminSales
    29Eve30user29@example.comeditorEngineering
    30Frank31user30@example.comviewerDesign
    31Grace32user31@example.comadminMarketing
    32Hank33user32@example.comeditorSales
    33Alice34user33@example.comviewerEngineering
    34Bob35user34@example.comadminDesign
    35Charlie36user35@example.comeditorMarketing
    36Diana37user36@example.comviewerSales
    37Eve38user37@example.comadminEngineering
    38Frank39user38@example.comeditorDesign
    39Grace40user39@example.comviewerMarketing
    40Hank41user40@example.comadminSales
    41Alice22user41@example.comeditorEngineering
    42Bob23user42@example.comviewerDesign
    43Charlie24user43@example.comadminMarketing
    44Diana25user44@example.comeditorSales
    45Eve26user45@example.comviewerEngineering
    46Frank27user46@example.comadminDesign
    TSX

    Expandable rows

    Expand a record for additional details instead of placing everything in columns.

    ID
    Name
    Age
    Email
    Role
    1Alice22user1@example.comadmin
    Alice works in Engineering as admin.
    2Bob23user2@example.comeditor
    3Charlie24user3@example.comviewer
    4Diana25user4@example.comadmin
    5Eve26user5@example.comeditor
    6Frank27user6@example.comviewer
    TSX

    Expansion with scrolling

    Combine expandable detail with a fixed body height and inspect scrolling and alignment.

    Name
    Email
    Department
    Role
    Aliceuser1@example.comEngineeringadmin
    Bobuser2@example.comDesigneditor
    Bob works in Design as editor; this text stays inside the visible area while the table scrolls sideways.
    Charlieuser3@example.comMarketingviewer
    Dianauser4@example.comSalesadmin
    Eveuser5@example.comEngineeringeditor
    TSX

    Summary rows

    Render totals with Table.Summary and align summary cells with table columns.

    Name
    Department
    Email
    Age
    AliceEngineeringuser1@example.com22
    BobDesignuser2@example.com23
    CharlieMarketinguser3@example.com24
    DianaSalesuser4@example.com25
    EveEngineeringuser5@example.com26
    FrankDesignuser6@example.com27
    GraceMarketinguser7@example.com28
    HankSalesuser8@example.com29
    AliceEngineeringuser9@example.com30
    BobDesignuser10@example.com31
    CharlieMarketinguser11@example.com32
    DianaSalesuser12@example.com33
    EveEngineeringuser13@example.com34
    FrankDesignuser14@example.com35
    GraceMarketinguser15@example.com36
    HankSalesuser16@example.com37
    AliceEngineeringuser17@example.com38
    BobDesignuser18@example.com39
    CharlieMarketinguser19@example.com40
    DianaSalesuser20@example.com41
    Total20 people630
    TSX

    Custom pagination

    Control pagination in application state when working with server totals and page data.

    ID
    Name
    Age
    Email
    Role
    1Alice22user1@example.comadmin
    2Bob23user2@example.comeditor
    3Charlie24user3@example.comviewer
    4Diana25user4@example.comadmin
    5Eve26user5@example.comeditor
    TSX

    Combined features

    Combine sorting, filtering, and selection and observe how they affect the current data.

    ID
    Email
    Role
    Dept
    Actions
    1Alice22user1@example.comadminEngineering
    2Bob23user2@example.comeditorDesign
    3Charlie24user3@example.comviewerMarketing
    4Diana25user4@example.comadminSales
    5Eve26user5@example.comeditorEngineering
    6Frank27user6@example.comviewerDesign
    7Grace28user7@example.comadminMarketing
    8Hank29user8@example.comeditorSales
    9Alice30user9@example.comviewerEngineering
    10Bob31user10@example.comadminDesign
    TSX

    Responsive columns

    Use responsive column settings on smaller screens while retaining identifying fields.

    390 × 640
    TSX

    API

    Table

    PropertyDescriptionTypeDefault Value
    scrolly caps the body height and keeps the header pinned while it scrolls.{ x?: string | number | undefined; y?: string | number | undefined; } | undefined-
    summaryFooter rows built from Table.Summary.Row / Table.Summary.Cell.((pageData: T[]) => ReactNode) | undefined-
    classNameAdditional css classstring | undefined-
    styleAdditional styleCSSProperties | undefined-

    Table.Summary

    PropertyDescriptionTypeDefault Value
    fixedPin the summary to the bottom while the body scrolls (needs scroll.y).boolean | undefined-