Cards

The @jumbo framework ships three card components that handle common dashboard card patterns with consistent spacing, background color support, and header layout options.

Import

typescript
import {
  JumboCard,
  JumboCardQuick,
  JumboCardFeatured,
} from '@jumbo/components';
import type { JumboBgStyleProps, JumboHeaderProps } from '@jumbo/types';

Shared prop types

JumboHeaderProps

Used by all three card components to configure the card header region:

PropTypeDescription
titleReactNodeCard title
subheaderReactNodeSecondary line below the title
avatarReactNodeAvatar or icon in the header leading slot
actionReactNodeContent placed in the header trailing slot (e.g. a menu button)
headerSxSxProps<Theme>Additional MUI sx styles for the header
reversebooleanSwaps the avatar and title positions

JumboBgStyleProps

Controls card background appearance:

PropTypeDescription
bgColorstring | string[]Single color or gradient color array (e.g. ['#7352C7', '#4E2F9E'])
bgImagestringBackground image URL
bgGradientDirstringGradient direction, e.g. '135deg'

JumboCard

A general-purpose card with an optional styled header and background support.

Props

PropTypeDescription
...JumboHeaderPropsCard header configuration
...JumboBgStylePropsBackground configuration
contentWrapperbooleanWraps children in a padded content area
contentSxSxProps<Theme>sx overrides for the content wrapper
childrenReactNodeCard body

Usage

tsx
<JumboCard
  title='Monthly Revenue'
  subheader='Compared to last month'
  action={<IconButton><MoreVertIcon /></IconButton>}
  bgColor={['#7352C7', '#4E2F9E']}
  bgGradientDir='135deg'
  contentWrapper
>
  <RevenueChart />
</JumboCard>

JumboCardQuick

A compact card pre-styled for metrics and KPI tiles. Renders an icon, a value, and a label in a single horizontal layout.

Props

PropTypeDescription
titleReactNodePrimary metric value
subTitleReactNodeMetric label
iconReactNodeLeading icon
colorstringIcon accent color
...JumboBgStylePropsBackground configuration
childrenReactNodeOptional additional content

Usage

tsx
<JumboCardQuick
  title='$48,295'
  subTitle='Total Revenue'
  icon={<AttachMoneyIcon />}
  color='#7352C7'
  bgColor='#FFFFFF'
/>

JumboCardFeatured

A card that visually promotes a single feature or call-to-action, with a large background and prominent text layout.

Props

PropTypeDescription
...JumboHeaderPropsCard header configuration
...JumboBgStylePropsBackground configuration (typically bgImage)
childrenReactNodeCard body content

Usage

tsx
<JumboCardFeatured
  title='Upgrade to Pro'
  subheader='Unlock all premium features'
  bgImage='/assets/images/widgets/upgrade-bg.png'
>
  <Button variant='contained'>Upgrade now</Button>
</JumboCardFeatured>