TableHeaders

Function TableHeaders 

Source
pub fn TableHeaders<C: Columns<R>, R: Row>(
    _: TableHeadersProps<C, R>,
) -> Element
Expand description

Renders table headers for all visible columns.

This component iterates through the columns and renders each header. It automatically handles column reordering and visibility.

§Props

  • data: The table data from use_tabular
  • Additional HTML attributes can be spread onto each <th> element

§Example

rsx! {
    table {
        thead {
            tr {
                // Renders all column headers
                TableHeaders { data }
            }
        }
    }
}

§With Custom Attributes

rsx! {
    tr {
        TableHeaders {
            data,
            class: "header-cell",
            style: "font-weight: bold;"
        }
    }
}

§Props

For details, see the props struct definition.