Overview

HuxCard provides a flexible container component for displaying content with optional headers, titles, and actions. HuxCard Examples

Component Variants

Basic Card

Simple card with title and content:
HuxCard(
  title: 'Card Title',
  child: Text('Card content goes here'),
)

Card with Subtitle

Card with additional subtitle text:
HuxCard(
  title: 'Card Title',
  subtitle: 'Optional subtitle',
  child: Text('Card content goes here'),
)

Card with Action

Card with action button in header:
HuxCard(
  title: 'Settings',
  action: IconButton(
    icon: Icon(FeatherIcons.settings),
    onPressed: () {},
  ),
  child: Text('Configure your preferences'),
)

Interactive Card

Card with tap handling:
HuxCard(
  title: 'Clickable Card',
  child: Text('Tap me!'),
  onTap: () => print('Card tapped'),
)

Nested Cards

Card containing other cards:
HuxCard(
  title: 'Parent Card',
  child: Column(
    children: [
      HuxCard(
        title: 'Child Card 1',
        child: Text('Nested content'),
      ),
      HuxCard(
        title: 'Child Card 2',
        child: Text('More nested content'),
      ),
    ],
  ),
)

Basic Usage

With Actions

HuxCard(
  title: 'Settings',
  action: IconButton(
    icon: Icon(FeatherIcons.settings),
    onPressed: () {},
  ),
  child: Text('Configure your preferences'),
  onTap: () => print('Card tapped'),
)

Properties

  • title - Card title text
  • subtitle - Optional subtitle text
  • action - Optional action widget (usually IconButton)
  • child - Main content widget
  • onTap - Tap handler for the entire card
Complete HuxCard documentation is coming soon. See the example app for more usage patterns.