The component is able to break out of its aspect ratio in case content overflows to be accessibility compliant (see
first row in example).
Additionally, the component is able to align to the highest CSS Grid child independent of the aspect ratio when used in
CSS Grid context (see second row in example).
4/3
4/3
1/1
9/16
1/1
prev
next
Open in Stackblitz
<!doctype html>
<htmllang="en"class="auto"><head><title></title></head><bodyclass="bg-canvas"><divclass="grid grid-cols-2 gap-static-md"><p-button-tileaspect-ratio="4/3"label="Some Label"description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum."size="large"><p-tagslot="header"theme="dark"color="background-frosted"compact="true"> 4/3
</p-tag><imgsrc="assets/lights.jpg"alt="Some image description" /></p-button-tile><p-button-tileaspect-ratio="4/3"label="Some Label"description="Some description"><p-tagslot="header"theme="dark"color="background-frosted"compact="true"> 4/3
</p-tag><imgsrc="assets/lights.jpg"alt="Some image description" /></p-button-tile><p-button-tileaspect-ratio="1/1"label="Some Label"description="Some description"><p-tagslot="header"theme="dark"color="background-frosted"compact="true"> 1/1
</p-tag><imgsrc="assets/lights.jpg"alt="Some image description" /></p-button-tile><p-button-tileaspect-ratio="9/16"label="Some Label"description="Some description"><p-tagslot="header"theme="dark"color="background-frosted"compact="true"> 9/16
</p-tag><imgsrc="assets/lights.jpg"alt="Some image description" /></p-button-tile><p-button-tileaspect-ratio="1/1"label="Some Label"description="Some description"><p-tagslot="header"theme="dark"color="background-frosted"compact="true"> 1/1
</p-tag><imgsrc="assets/lights.jpg"alt="Some image description" /></p-button-tile></div><script></script></body></html>
It is possible to overwrite the hyphens style on the host element and use 'soft' hyphens. However, please note that
hyphenation behavior can vary depending on the browser and the language of the text. In some cases, it may be necessary
to set the appropriate lang attribute on your HTML element to ensure that hyphenation works correctly for the desired
language.
You can also use a footer slot to display additional text below the description, providing more flexibility for custom
content. The footer slot is intended for non-interactive content only, meaning it should not contain links, buttons,
or other interactive elements. It is designed to handle plain text, making it ideal for supplementary or secondary
information.
We recommend using short and concise text to avoid visual clutter.
Some tag
Some footer text
Some tag
Some footer text
prev
next
Open in Stackblitz
<!doctype html>
<htmllang="en"class="auto"><head><title></title></head><bodyclass="bg-canvas"><divclass="grid grid-cols-2 gap-static-md"><p-button-tilelabel="Some label"description="Some Description"><p-tagslot="header"theme="dark"color="background-frosted"compact="true"> Some tag
</p-tag><imgsrc="assets/lights.jpg"alt="Some image description" /><p-textslot="footer"theme="dark"> Some footer text
</p-text></p-button-tile><p-button-tilelabel="Some label"description="Some Description"compact="true"><p-tagslot="header"theme="dark"color="background-frosted"compact="true"> Some tag
</p-tag><imgsrc="assets/lights.jpg"alt="Some image description" /><p-textslot="footer"theme="dark"> Some footer text
</p-text></p-button-tile></div><script></script></body></html>