Card
A versatile container component for grouping related content with customizable styling
A versatile container component for grouping related content.
When to use this
- Content grouping: Organize related information in a contained unit
- Product cards: Display product information in e-commerce interfaces
- Profile cards: Show user profiles or contact information
- Dashboard panels: Create panels for dashboard widgets
Basic implementation
Basic implementation
import 'package:flutter/material.dart';
import 'package:remix/remix.dart';
class CardExample extends StatelessWidget {
const CardExample({super.key});
@override
Widget build(BuildContext context) {
return RemixCard(
style: style,
);
}
RemixCardStyle get style {
return RemixCardStyle()
.size(300, 200)
.textColor(Colors.white)
.borderRadiusAll(const Radius.circular(4))
.borderAll(color: Colors.grey.shade300);
}
}
Fortal styles
Remix includes Fortal-themed style helpers for this component:
Fortal variants
import 'package:flutter/material.dart';
import 'package:remix/remix.dart';
class FortalCardExample extends StatelessWidget {
const FortalCardExample({super.key});
@override
Widget build(BuildContext context) {
return Column(
spacing: 16,
children: [
RemixCard(
style: FortalCardStyle.elevated(),
),
RemixCard(
style: FortalCardStyle.outlined(),
),
],
);
}
}
See the FortalCardStyle source code for all available options.
Constructor
Constructor
const RemixCard({
Key? key,
Widget? child,
RemixCardStyle style = const RemixCardStyle.create(),
RemixCardSpec? styleSpec,
})

