Tables API Reference

Name Age City
Alice 25 New York
Bob 30 San Francisco
Charlie 35 London
Total 90
Name Age City
Alice 25 New York
Bob 30 San Francisco
Charlie 35 London
Total 90
NAME AGE CITY
Alice 30 years New York
Bob 25 years London

Table

Source
Table(*c, cls=(<TableT.middle: 'uk-table-middle'>, <TableT.divider: 'uk-table-divider'>, <TableT.hover: 'uk-table-hover'>, <TableT.sm: 'uk-table-sm'>), **kwargs) -> fastcore.xml.FT

Creates a table

Params
  • c Components (typically Thead, Tbody, Tfoot)

  • cls Additional classes on the table

  • kwargs

Returns: Table component

TableFromLists

Source
TableFromLists(header_data: Sequence, body_data: Sequence[Sequence], footer_data=None, header_cell_render=<function Th at 0x7f31fe01d760>, body_cell_render=<function Td at 0x7f31fe01d6c0>, footer_cell_render=<function Td at 0x7f31fe01d6c0>, cls=(<TableT.middle: 'uk-table-middle'>, <TableT.divider: 'uk-table-divider'>, <TableT.hover: 'uk-table-hover'>, <TableT.sm: 'uk-table-sm'>), sortable=False, **kwargs) -> fastcore.xml.FT

Creates a Table from a list of header data and a list of lists of body data

Params
  • header_data List of header data

  • body_data List of lists of body data

  • footer_data List of footer data

  • header_cell_render Function(content) -> FT that renders header cells

  • body_cell_render Function(key, content) -> FT that renders body cells

  • footer_cell_render Function(key, content) -> FT that renders footer cells

  • cls Additional classes on the table

  • sortable Whether to use sortable table

  • kwargs

Returns: Table from lists

TableFromDicts

Source
TableFromDicts(header_data: Sequence, body_data: Sequence[dict], footer_data=None, header_cell_render=<function Th at 0x7f31fe01d760>, body_cell_render=<function <lambda> at 0x7f31fe01d8a0>, footer_cell_render=<function <lambda> at 0x7f31fe01d940>, cls=(<TableT.middle: 'uk-table-middle'>, <TableT.divider: 'uk-table-divider'>, <TableT.hover: 'uk-table-hover'>, <TableT.sm: 'uk-table-sm'>), sortable=False, **kwargs) -> fastcore.xml.FT

Creates a Table from a list of header data and a list of dicts of body data

Params
  • header_data List of header data

  • body_data List of dicts of body data

  • footer_data List of footer data

  • header_cell_render Function(content) -> FT that renders header cells

  • body_cell_render Function(key, content) -> FT that renders body cells

  • footer_cell_render Function(key, content) -> FT that renders footer cells

  • cls Additional classes on the table

  • sortable Whether to use sortable table

  • kwargs

Returns: Styled Table


TableT

Option Value Option Value Option Value
divider uk-table-divider striped uk-table-striped hover uk-table-hover
sm uk-table-sm lg uk-table-lg justify uk-table-justify
middle uk-table-middle responsive uk-table-responsive

Tbody

Source
Tbody(*rows, cls=(), sortable=False, **kwargs)
Params
  • rows

  • cls

  • sortable

  • kwargs

Th

Source
Th(*c, cls=(), shrink=False, expand=False, small=False)
Params
  • c Components that go in the cell

  • cls Additional classes on the cell container

  • shrink Whether to shrink the cell

  • expand Whether to expand the cell

  • small Whether to use a small table

Returns: Table cell

Td

Source
Td(*c, cls=(), shrink=False, expand=False, small=False)
Params
  • c Components that go in the cell

  • cls Additional classes on the cell container

  • shrink Whether to shrink the cell

  • expand Whether to expand the cell

  • small Whether to use a small table

Returns: Table cell