Skip to main content

Status Tags

Overview​

CmAdmin provides a set of Catalyst Tag classes used to display enum or state values with a colored badge. These are rendered via the :tag field type and are controlled using the tag_class option.

All tag classes use a cm-badge- prefix (Catalyst Tag) to avoid conflicts with generic CSS utility classes.

Available Tag Classes​

ClassPreviewUse Case Example
cm-badge-blueSampleActive, In Progress, Enabled
cm-badge-yellowSamplePending, Awaiting, Draft
cm-badge-orangeSampleOn Hold, Needs Review, Processing
cm-badge-purpleSampleScheduled, Queued, Resolved
cm-badge-cyanSampleInfo, Beta, Staging
cm-badge-greenSampleCompleted, Approved, Verified
cm-badge-graySampleInactive, Archived, Unknown
cm-badge-redSampleRejected, Failed, Blocked, Deleted

Deprecated Aliases​

The following old class names still work but are deprecated. Use the Catalyst equivalents for all new code:

DeprecatedUse Instead
active / active-onecm-badge-blue
active-twocm-badge-yellow
active-threecm-badge-orange
active-fourcm-badge-purple
active-fivecm-badge-cyan
completedcm-badge-green
neutralcm-badge-gray
dangercm-badge-red
warning

Bootstrap badge color classes (bg-success, bg-warning, bg-danger, bg-secondary) are not supported as tag classes. Always use cm-badge-* Catalyst Tags.

Best Practices​

  1. Use cm-badge-green for positive terminal states (approved, verified, done)
  2. Use cm-badge-red for negative terminal states (rejected, failed, blocked)
  3. Use cm-badge-gray for inactive or non-significant states (archived, unknown)
  4. Use cm-badge-blue for currently live or enabled items
  5. Use cm-badge-yellow for items awaiting action (pending, draft)
  6. Use cm-badge-orange through cm-badge-cyan to differentiate multiple intermediate states when two or more non-red/green statuses exist
  7. Never use Bootstrap badge color classes — they are not equivalent and will produce inconsistent styling