Chip
Soft inline status tags, category indicators, and metadata labels. Lighter-weight than Badge — uses a soft tinted background with coloured text instead of a solid filled pill. Ideal for tags, filters, and inline status labels that should blend into the content rather than stand out.
Variants
Eight colour variants plus a neutral default.
With Icons
Add a Font Awesome icon with ->icon().
Inline in Content
Chips sit naturally inline with text, making them ideal for tagging items inside tables, cards, and list rows.
Badge vs Chip
Badge uses a solid gradient fill and is eye-catching — good for counts, alerts, and prominent status calls. Chip uses a soft tinted background and is subtler — good for tags, categories, and inline metadata that should complement the content rather than dominate it.
PHP PHP Methods (Fluent)
| Method / Property | Parameters | Description |
|---|---|---|
$m->chip($id, $text) | string, string | Create a Chip component. |
->text($text) | string | Set chip text. |
->icon($faIcon) | string | Add a Font Awesome icon (e.g. 'fa-check'). |
->variant($variant) | string | Set colour variant directly: default|primary|success|warning|danger|purple|secondary|info. |
->primary() | | Blue tint. |
->success() | | Green tint. |
->warning() | | Orange tint. |
->danger() | | Red tint. |
->purple() | | Purple tint. |
->secondary() | | Grey tint. |
->info() | | Cyan tint. |
PHP CSS Classes
| Method / Property | Parameters | Description |
|---|---|---|
.m-chip | | Base chip styling (display:inline-flex, rounded corners, small padding). |
.m-chip-default | | Neutral grey tint — used when no variant is specified. |
.m-chip-primary | | Blue tint. |
.m-chip-success | | Green tint. |
.m-chip-warning | | Orange tint. |
.m-chip-danger | | Red tint. |
.m-chip-purple | | Purple tint. |
.m-chip-secondary | | Cool grey tint. |
.m-chip-info | | Cyan tint. |