




in nicegui, you can hide the table header (the `
To remove the header row (e.g., “Name” and “Age” labels) from a ui.table, you don’t need to modify column definitions or subclass components — NiceGUI leverages Quasar’s underlying table API, which supports styling headers via the table-header-class property.
The simplest and most reliable approach is to chain .props('table-header-class=hidden') onto your ui.table() call:
from nicegui import ui
columns = [
{'name': 'name', 'label': 'Name', 'field': 'name', 'required': True, 'align': 'left'},
{'name': 'age', 'label'
: 'Age', 'field': 'age', 'sortable': True},
]
rows = [
{'name': 'Alice', 'age': 18},
{'name': 'Bob', 'age': 21},
{'name': 'Carol'},
]
# Hide the header row entirely
ui.table(columns=columns, rows=rows, row_key='name').props('table-header-class=hidden')
ui.run()✅ Why this works:
⚠️ Important notes:
This method is lightweight, framework-native, and requires no custom CSS — making it ideal for clean, maintainable UIs in NiceGUI applications.