A container for displaying related text.
While the detail component works great out of the box for displaying plain text key-value pairs, you may want to use it to display things like currency, relative dates, and more. Doing this is quite easy by utilizing the slot within <q2-detail>.
<q2-detail
label="Current Balance"
alignment="left"
stacked
>
<q2-currency amount="12953.25"></q2-currency>
</q2-detail><q2-detail
label="Last Updated"
alignment="left"
stacked
>
<q2-relative-time
date="2024-12-10"
unit="day"
message-format="long"
></q2-relative-time>
</q2-detail>The q2-detail element has one slot that can be used to insert custom content into the component.
An optional slot to display a custom label.
The q2-detail element has one or more properties that support text localization. Those properties are indicated by the localizable badge in the description.
alignmentDefines the alignment of the label and description when stacked, or when only the label or description is present.
descriptionDefines the text content of the description.
labelDefines the text content of the label.
sizeDefines the text size of the label and description.
If not specified, the detail will display as inline text.
stackedDetermines if the description should appear beneath the label.
The following CSS variables are available to override the default theme styles of the q2-detail component.