DescriptionCard | CoUI

DescriptionCard

Label/value metadata summary card

DescriptionCard#

CoDescriptionCard displays label/value pairs as a structured metadata summary — useful for order details, profiles, plant care notes, exam results, or any place that needs a tidy "card of facts".

Live Preview#

When to Use#

Use this component:

  • Listing detail facts as label/value pairs
  • Showing structured metadata (order, profile, vehicle history, …)
  • Emphasising a totals/score row (isEmphasized: true)
  • Adding a footer action area (bottomAction)

Use a different component:

  • Table for many records that need sorting/comparison
  • Stat for a single KPI value
  • Card for free-form layout

Props#

CoDescriptionCard#

PropTypeDefaultDescription
rows List<CoDescriptionRow> required Row data list
size CoreDescriptionCardSize md Card size scale (xs/sm/md/lg/xl)
layout CoreDescriptionCardLayout horizontal Row layout direction
variant CoreDescriptionCardVariant outlined Card style (filled/outlined/ghost)
title String? null Optional title text
titleLeading Widget? / Component? null Widget rendered before the title
titleTrailing Widget? / Component? null Widget rendered after the title
showDivider bool true Draw divider below the title
showRowDividers bool false Draw dividers between rows
bottomAction Widget? / Component? null Bottom action area
showBottomActionDivider bool true Draw divider above the bottom action
alignment CoreDescriptionCardAlignment fixed Horizontal alignment (fixed or spaceBetween)
valueOverflow CoreDescriptionCardOverflow wrap Long-value handling (wrap or ellipsis)
rowWeight CoreDescriptionCardRowWeight valueProminent Default emphasis direction
emptyValueBehavior CoreDescriptionCardEmptyBehavior hide Null-row handling (hide or placeholder)
emptyPlaceholder String '-' Placeholder text for null rows
emphasisStyle CoDescriptionEmphasisStyle? null Style applied to isEmphasized rows
onTap VoidCallback? null Card tap callback
padding EdgeInsetsGeometry? (Flutter) / double? (Web) null Padding override
borderRadius BorderRadiusGeometry? (Flutter) / double? (Web) null Border radius override
backgroundColor Color? (Flutter) / String? (Web) null Background color override
borderColor Color? (Flutter) / String? (Web) null Border color override
borderWidth double? null Border width override
boxShadow List<BoxShadow>? (Flutter) / String? (Web) null Shadow override

CoDescriptionRow#

PropTypeDefaultDescription
labelStringrequiredRow label
valueString?nullRow value
valueWidget Widget? / Component? null Custom value widget — wins over value
leading Widget? / Component? null Widget rendered before the label
trailing Widget? / Component? null Widget rendered after the value
onTap VoidCallback? null Row tap callback
style CoDescriptionRowStyle? null Per-row style override
isEmphasized bool false Apply emphasisStyle to this row

CoDescriptionEmphasisStyle#

PropTypeDescription
labelColor Color? (Flutter) / String? (Web) Emphasised label color
valueColor Color? (Flutter) / String? (Web) Emphasised value color
labelFontWeight FontWeight? (Flutter) / String? (Web) Emphasised label font weight
valueFontWeight FontWeight? (Flutter) / String? (Web) Emphasised value font weight

Customization Layers#

CoDescriptionCard overrides flow through three layers:

  1. Theme — register a CoreDescriptionCardTheme on CoreComponentTheme for project-wide defaults (padding, radius, label/value colors, …).
  2. Variant + size + layout — declarative knobs (filled/outlined/ghost, xs–xl, horizontal/vertical, etc.).
  3. InstancebackgroundColor, borderColor, borderRadius, boxShadow, etc. set on the widget.

Cross-platform Notes#

ConcernFlutterWeb
Row data classCoDescriptionRowCoDescriptionRow
Emphasis style class CoDescriptionEmphasisStyle CoDescriptionEmphasisStyle
Color override typeColorCSS color string (rgba/hex)
Padding/radius override EdgeInsetsGeometry / BorderRadiusGeometry double (px)
Box shadow override List<BoxShadow> CSS box-shadow string
Row onTap
Custom value widget