Standard

Structur of table components resembles structure of their HTML counterparts, with a main table component that serves as the container for the entire table.

Inside the table, there are two main sections: table_head and table_body. The table_head component is used to define the header row of the table, which typically contains column titles. The table_body component contains the data rows of the table, where each row is represented by a table_row, and each cell within a row is represented by a table_cell. This structure allows for clear separation of the table's header and body content, making it easier to organize and style tables effectively.

{%- call ui.util.call(show_example) -%} {%- raw %} {%- call ui.util.call(ui.table) -%} {%- call ui.util.call(ui.table_head) -%} {{ ui.table_row(ui.util.map(ui.table_cell, ["Key", "Value"], header=true)) }} {%- endcall %} {%- call ui.util.call(ui.table_body) -%} {%- for value in ["A", "B", "C"] -%} {%- call ui.util.call(ui.table_row) -%} {{ ui.table_cell(loop.index) }} {{ ui.table_cell(value) }} {%- endcall %} {%- endfor %} {%- endcall %} {%- endcall %} {%- endraw %} {%- endcall %}