Card

A content container with an optional header and footer. Cards automatically receive the m-card-default style class, giving them a white background, border, rounded corners, and a subtle shadow — no extra class needed.

Basic Card

A card with just body content.

This is the card body. Any HTML can go here.

PHP

Card with Title

Use ->title() to add a styled header section.

Card Title

Card body with a title above it.

PHP

Card with Title, Subtitle & Footer

Combine ->title(), ->subtitle(), and ->footer() for a fully-structured card.

Full Card Example
A supporting subtitle line

Main content area. Add any HTML here — forms, lists, text, components.

PHP

Title with Icon

->title() accepts trusted HTML, so you can embed FA icons directly.

Analytics

Body content here.

PHP

Section Headers

Use ->sectionHeader() to add divider rows with an optional "View all" link before the card body. Call multiple times to add multiple sections.

Recent ActivityView all

Section content goes here.

PHP

Custom Classes

Extra classes can be added via ->addClass(). The m-card-default style is always present; your class adds on top of it.

Custom Styled Card

Body with a custom accent class applied.

PHP

PHP PHP Methods (Fluent)

Method / PropertyParametersDescription
$m->card($id)stringCreate a card component. Automatically applies m-card and m-card-default.
->title($html)stringSet the card header title (trusted HTML, renders inside .m-card-header).
->subtitle($html)stringSet a subtitle shown below the title.
->content($html)stringSet the card body HTML.
->footer($html)stringSet the card footer HTML.
->sectionHeader($title, $linkUrl, $linkText)string, ?string, stringAdd a section-header divider before the body, with an optional link. $linkText defaults to 'View all'. Call multiple times.
->addClass($class)stringAppend additional CSS class(es) to the card element.
->attr($name, $value)string, stringSet an arbitrary HTML attribute on the card element.