Make tabulator widget fit to viewport size

I’m trying to use pn.widgets.Tabulator to display large-ish table with large amount of columns.

How could I get the Tabulator widget to fit the width of the viewport? When I set its width to an explicit value, for example width=1000 (and height=500), everything works correctly - I see the horizontal scroll at the bottom of the widget.

However, if I set width_policy='min' or width_policy='min', the Tabulator widget (as opposed to JSONEditor widget, for example) tries to show everything… without any scrollbar, and with the pagination buttons not visible.

How should I configure it (what configuration options should I set, or what stylesheets should I provide) to fit its width to the viewport width, and if there are more columns than can be displayed, provide the horizontal scrollbar?

Did you try sizing_mode="stretch_both"?

import panel as pn

pn.extension()

import pandas as pd

# large df
large_df = pd.DataFrame({
    'AbcAbcAbcAbcAbcAbcAbcAbcAbcAbcAbcAbc': range(1000),
    'BdBdBdBdBdBdBdBdBdBdBdBdBd': range(1000),
    'Cd': range(1000),
    'Dh': range(1000),
    'Efdj': range(1000),
    'Fdfj': range(1000),
    'Gdfj': range(1000),
    'H': range(1000),
    'Idfj': range(1000),
    'Jdfj': range(1000),
    'Kdfj': range(1000),
    'Ldfj': range(1000),
    'dfjdfjdfM': range(1000),
    'dfjfdjN': range(1000),
    'Idfasdhj': range(1000),
    'Jdasdhfj': range(1000),
    'Kasdhdfj': range(1000),
    'Ldsadhfj': range(1000),
    'dfsadhjdfjdfM': range(1000),
    'dfjasdhfdjN': range(1000),
})
tab = pn.widgets.Tabulator(large_df, sizing_mode="stretch_both")
tab.show()