x

Open in Github Open in StackBlitz
@twicpics-components
Documentation

ratio property

The ratio property determines the value of the width/height ratio of the image display area.

Its value can be:

  • a ratio expression of the form width/height like 4/3, 16/9, or 1/1.
  • a number that is the result of such an expression like 1.85, 2, or 0.5.
  • "none" as in ratio="none". In this case the media displayed has a "free" ratio defined by the dimensions of its container. Particularly useful in the case of image or video hero.

A square area (ratio="1") will be created by default.

ratio="2.39" (mode is cover)
ratio="2.39" (mode is contain)