How to format inputs.table columns, columns width and word wrap?

I have some simple goals:

  • to define the width in percent of each column (in example 30, 20 and 50)
  • to have word wrap for cells with lots of text

I have seen some related examples and the documentation page, but I am in the first steps and can’t figure out how to do it.

Thanks for the help.


Here is an example (I’m using the Faker library to produce some dummy data):

faker = (await import("")).faker
data = Array.from({length: 100}, () => ({
Inputs.table(data, {
  width: {
    ID: "30%",
    AMOUNT: "20%",
    DESCRIPTION: "50%",
  format: {
    DESCRIPTION: d => htl.html`<span style="white-space:normal">${d}`,

Thank you very much @mootari

You were very didactic and kind

1 Like