An options object for initializing an image renderer.

interface IOptions {
    backgroundColor?: CellRenderer.ConfigOption<string>;
    height?: CellRenderer.ConfigOption<string>;
    placeholder?: CellRenderer.ConfigOption<string>;
    textColor?: CellRenderer.ConfigOption<string>;
    width?: CellRenderer.ConfigOption<string>;
}

Properties

backgroundColor?: CellRenderer.ConfigOption<string>

The background color for the cells.

The default is ''.

height?: CellRenderer.ConfigOption<string>

The height of the image. Can be a percentage of the available space (e.g. '50%'), a number of pixels (e.g. '123px') or an empty string. If it's an empty string, it will respect the image size ratio depending on the width value Examples:

  • if height='100%' and width='', it will take the available height in the cell and compute the width so that the image is not malformed.
  • if height='' and width='50%', it will take half of the available width in the cell and compute the height so that the image is not malformed.
  • if height='' and width='', the image will keep its original size.

The default is '100%'.

placeholder?: CellRenderer.ConfigOption<string>

The placeholder text while the cell is loading.

The default is '...'.

textColor?: CellRenderer.ConfigOption<string>

The color for the drawing the placeholder text.

The default is '#000000'.

width?: CellRenderer.ConfigOption<string>

The width of the image. Can be a percentage of the available space (e.g. '50%'), a number of pixels (e.g. '123px') or an empty string. If it's an empty string, it will respect the image size ratio depending on the height value Examples:

  • if height='100%' and width='', it will take the available height in the cell and compute the width so that the image is not malformed.
  • if height='' and width='50%', it will take half of the available width in the cell and compute the height so that the image is not malformed.
  • if height='' and width='', the image will keep its original size.

The default is ''.