Skip to content

Components Display

Aspect ratio

Keeps what it holds, a picture or a video, in a ratio.

$ pyblade ui:add aspect-ratio

16 / 9

Props

Written as attributes of <pb-ui.aspect-ratio>; put a colon before one to pass it a Python value, as in :items="items". A slot is written <pb-slot:name>.

NameTypeDefaultDescription
ratio str "16 / 9" Any CSS aspect-ratio
class str "" Added to the classes of the component. Every other attribute is spread on it too.