Vitepress Theme Akari Docsv1.0.0GitHubSettingsMore

Cards: API ​

The content below comes from the component metadata of @m3e/web 2.10.3.

m3e-card ​

AttributeValuesDefaultDescription
variantelevated, filled, outlinedfilledAppearance
orientationvertical, horizontalverticalDirection the content is laid out in
inlineBooleanfalseLays the card out as an inline element
actionableBooleanfalseMakes the whole card one interactive area
href, target, rel, downloadSame as the buttonSame as the buttonMakes the card a link when actionable
disabled, disabled-interactiveBooleanfalseDisables the card when actionable
type, name, valueSame as the buttonbuttonBehavior in a form when actionable
SlotContent
(default)No padding; suits full-bleed images or custom layouts
headerTitle, icon or media, with no extra padding
contentBody, with padding
actionsAction buttons, aligned to the start edge by default; add the end attribute to the element to align them to the end edge
footerMetadata, copyright or secondary notes
EventWhen
clickAn actionable card is clicked

m3e-dialog ​

AttributeValuesDefaultDescription
openBooleanfalseWhether the dialog is open
dismissibleBooleanfalseShows a close button
disable-closeBooleanfalsePrevents closing by clicking the scrim or pressing Esc
alertBooleanfalseActs as an alert dialog
close-labelString"Close"Accessible name of the close button
no-focus-trapBooleanfalseDoes not keep Tab focus inside the dialog
SlotContent
(default)Body
headerTitle
actionsAction buttons
close-iconIcon of the close button
EventWhen
opening, openedOpening starts, opening finishes
closing, closedClosing starts, closing finishes
cancelCanceled by the scrim or Esc

m3e-dialog-trigger (attribute for: the dialog's id) goes inside a button and opens the dialog when the button is clicked. m3e-dialog-action (attribute return-value) goes inside a button in the dialog; clicking it closes the dialog and returns that value.

Customizing the look ​

The --m3e-card-* variables control the card's corner radius, color and padding. For example, --m3e-card-shape is the corner radius:

html
<m3e-card variant="outlined" style="--m3e-card-shape: 28px;">…</m3e-card>

The theme's m3e.ts registers the components (@m3e/web/card, @m3e/web/dialog).

GitHub Settings

Search the docs

Type a page title, a component name or words from the text.

Press ⌘/Ctrl + K to open it anytime

Choose a language

EnglishEnglish (United States)العربيةArabic (Saudi Arabia)FrançaisFrench (France)日本語Japanese (Japan)한국어Korean (South Korea)简体中文Chinese (China)

Settings

Color
VariantTonal SpotVibrantFidelityExpressiveMonochromeNeutralRainbowFruit Salad
ContrastDefaultMediumHigh
MotionStandardExpressive
Text directionFollow languageLeft to rightRight to left
Text size100%150%200%