Black Lives Matter. Please consider donating to Black Girls Code today.

Dash DataTable - Column width

it seems like every column in a datatable automatically has the same width.
Is there a way to change this behaviour?

1 Like

This isn’t possible right now but it looks like it would be an easy addition. We would just need to add a width property here:


I am definitely interested in this option as well. I tried doing what you said and made this alteration:

newState.columns = => ({
        key: c,
        name: c,
        editable: Boolean(props.editable),
        sortable: Boolean(props.sortable),
        filterable: Boolean(props.filterable),
		width: Boolean(props.width)

But when I reinstall the package just using python install, it complains and gives me:

Exception: Unexpected keyword argument width

Is there some step where I need to rebuild/reinstall the JS portions of the package? I am a total JS noob…

Fantastic package, by the way!

1 Like

Yeah, you need to rebuild with $ npm run prepublish. You’ll also need to add this prop to the propTypes at the bottom:
Also, we don’t need Boolean around Boolean(props.width) since it isn’t true or false, it’s just a number.

Okay, thanks so much. Trying these additional steps now. I was thinking Boolean for width because I was thinking of having it be width-adjustable rather than setting a width.

Can you think of a simple way to do this? JQuery UI has a simple resizable function. Is there something like this in React?

1 Like

This functionality is built-in to the undelrying datatable that dash is using, see for an example. We just need to expose this property in the Dash code.

1 Like


Any plan to release the complete datatable component as the adazzle table?

I am quite interested in this component! :grinning:

Thank you!

Column widths has been released as part of 0.5.2, upgrade with

pip install dash-table-experiments==0.5.2

Here is the PR:

Special thanks to a plotly customer who sponsored this work. If your company or organization would like to sponsor any Dash features, please reach out:


This has been added in, v0.5.3, upgrade with

pip install dash-table-experiments==0.5.3
1 Like

1 Like


Thanks to you and the customer for the adjustable column width!

Now testing out the table, I am having another height setting problem :/. The min-width seems to be respected and passed along but the min height is not. Do you have an example of how to control the min-height (really just want to set the number of rows the table is displaying).

For example in your example i just set the min_width and min_height to 777, and 555. I include that code fragment and how it ends up being rendered, with min-width making it into the style for the parent component as width but min-height seems to be ignored and react-grid-Grid min-height is still stuck at default 350px.

app.layout = html.Div([
    html.H4('Gapminder DataTable'),

        # optional - sets the order of columns
        min_width = 777,
        min_height = 555,
], className="container")

and the result is this:

By the way i tried some permutations of setting the parent style to have the height as a percentage of viewport height, similar to what worked with your help for dcc.Graph component before, but what I tried didn’t seem to work for the DataTable.

The columns of my table should have very different width values, is there a way to assign a different width to each column ?

I was thinking of doing the same thing as well.

The dash-table-experiment is deprecated but it is possible to set the width of individual columns in the new data-table. “Individual Column Widths”

1 Like

Thanks for the heads up! I can’t believe I missed that on the Data Tables sizing page.

FYI there are many new examples in the new width chapter: We recently updated this chapter 📣 New Documention on Setting DataTable & Column Widths & Heights

1 Like