DataTable - how to update style (specifically font family and size)

I’ve read the newly released documentation on DataTables but have not found any reference on how to change the font family or font size? Does anybody have an example or able to point me in the right direction?

2 Likes

You can change font family and size like this:

app = dash.Dash(__name__)

app.layout = dash_table.DataTable(
    id='table',
    columns=[{"name": i, "id": i} for i in df.columns],
    data=df.to_dict("rows"),
    style_cell={'fontSize':20, 'font-family':'sans-serif'}
)

if __name__ == '__main__':
    app.run_server(debug=True)
13 Likes

Thank you!! This worked perfectly!