Layout.aspect_ratio
Server-rendered
Maintains a fixed aspect ratio for content.
Aspect ratio example 1
<.aspect_ratio ratio="16 / 9">
<img src="https://picsum.photos/id/191/800/800" class="h-full w-full object-cover" />
</.aspect_ratio>
Attributes
| Name | Type | Default | Values | Global Includes |
|---|---|---|---|---|
class
|
:string |
— | — | — |
ratio
|
:string |
"16 / 9"
|
— | — |
rest
|
:global |
— | — | — |
Slots
| Slot | Slot Attributes |
|---|---|
inner_block
Required
|
— |