dashboard-design – skill Thiết kế & UI cho agent AI
Hướng dẫn triển khai Web và App cho Dashboard Design. Kích hoạt khi người dùng muốn bố cục tập trung phân tích, trực quan hóa dữ liệu và màn hình tổng quan dạng mô-đun.
Cài skill dashboard-design bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/dashboard-design-0bdcd.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /dashboard-design – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/dashboard-design-0bdcd.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $dashboard-design – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/dashboard-design-0bdcd.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /dashboard-design – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/dashboard-design-0bdcd.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /dashboard-design – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Dashboard Design
> "Data at a glance. Organized, scannable, and highly functional."
When to Use
Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the design-it skill and is not meant to be triggered directly.
Core Principles
1. Modular Grid: The screen is broken down into functional "widgets" or cards. Usually a sidebar on the left and a top nav.
2. Data Hierarchy: The most important numbers (KPIs) are large and usually at the top. Charts take up the middle, and lists/tables are at the bottom.
3. Muted Backgrounds: A soft grey or off-white background so the white data cards stand out clearly.
Visual DNA
- Colors: Minimalist Slate or Earth-Grounded Elegance. Avoid too many colors. Pair trend color with text, signs or icons. Define whether a rise or fall is favorable for each metric; lower churn may be favorable.
- Typography: Clean, tabular sans-serifs (
Inter,Roboto Monofor numbers). - Styling: Very subtle shadows or 1px borders to separate cards.
Web Implementation
- Use CSS Grid for the macro layout (Sidebar, Header, Main).
- CSS Example:
body {
background-color: #F8F9FA;
color: #212529;
font-family: 'Inter', sans-serif;
margin: 0;
}
.dashboard-layout {
display: grid;
grid-template-columns: 250px 1fr;
grid-template-rows: 70px 1fr;
height: 100vh;
}
.sidebar {
grid-row: 1 / 3;
background-color: #ffffff;
border-right: 1px solid #e9ecef;
padding: 20px;
}
.header {
background-color: #ffffff;
border-bottom: 1px solid #e9ecef;
padding: 0 30px;
display: flex;
align-items: center;
}
.main-content {
padding: 30px;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
overflow-y: auto;
}
/* KPI Card */
.kpi-card {
background: #fff;
border-radius: 8px;
padding: 24px;
border: 1px solid #e9ecef;
box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.kpi-title { font-size: 0.9rem; color: #6c757d; }
.kpi-value { font-size: 2rem; font-weight: 700; margin-top: 8px; }
.kpi-trend.positive { color: #28a745; }App Implementation
SwiftUI
struct DashboardView: View {
// For iPad/Mac, NavigationSplitView is ideal.
// For iPhone, we use a scrolling VGrid.
let columns = [
GridItem(.adaptive(minimum: 150), spacing: 16)
]
var body: some View {
NavigationView {
ScrollView {
LazyVGrid(columns: columns, spacing: 16) {
KPICard(title: "Revenue", value: "$45,231", trend: "+12.5%", isPositive: true)
KPICard(title: "Active Users", value: "2,405", trend: "+4.1%", isPositive: true)
KPICard(title: "Churn Rate", value: "1.2%", trend: "-0.4%", isPositive: true)
KPICard(title: "Avg. Session", value: "4m 12s", trend: "+0.1%", isPositive: true)
}
.padding()
// Placeholder for Chart
RoundedRectangle(cornerRadius: 12)
.fill(Color.white)
.frame(height: 250)
.overlay(Text("Chart Area").foregroundColor(.gray))
.padding(.horizontal)
}
.background(Color(UIColor.systemGroupedBackground))
.navigationTitle("Overview")
}
}
}
struct KPICard: View {
let title: String
let value: String
let trend: String
let isPositive: Bool
var body: some View {
VStack(alignment: .leading, spacing: 8) {
Text(title).font(.subheadline).foregroundColor(.secondary)
Text(value).font(.title2).fontWeight(.bold)
Text(trend)
.font(.caption)
.fontWeight(.semibold)
.foregroundColor(isPositive ? .green : .red)
}
.padding()
.frame(maxWidth: .infinity, alignment: .leading)
.background(Color.white)
.cornerRadius(12)
.shadow(color: Color.black.opacity(0.02), radius: 4, y: 2)
}
}- Dashboards require
.adaptivegrids.LazyVGridhandles rearranging 4 cards in a row on iPad down to 2 cards on iPhone automatically. - Use
Color(UIColor.systemGroupedBackground)to provide that subtle off-white contrast against stark white cards.
Flutter
class DashboardScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFFF8F9FA),
appBar: AppBar(
title: const Text('Overview', style: TextStyle(color: Colors.black)),
backgroundColor: Colors.white,
elevation: 1,
),
// On tablets, use a Row with NavigationRail. On mobile, use Drawer.
drawer: const Drawer(),
body: CustomScrollView(
slivers: [
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverGrid.extent(
maxCrossAxisExtent: 200, // Adapts layout based on width
mainAxisSpacing: 16,
crossAxisSpacing: 16,
childAspectRatio: 1.5,
children: [
_buildKPI('Revenue', '\$45,231', '+12.5%', true),
_buildKPI('Active Users', '2,405', '+4.1%', true),
_buildKPI('Churn Rate', '1.2%', '-0.4%', true),
_buildKPI('Avg. Session', '4m 12s', '+0.1%', true),
],
),
),
SliverPadding(
padding: const EdgeInsets.symmetric(horizontal: 16),
sliver: SliverToBoxAdapter(
child: Container(
height: 250,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(12)),
child: const Center(child: Text('Chart Area', style: TextStyle(color: Colors.grey))),
),
),
),
],
),
);
}
Widget _buildKPI(String title, String value, String trend, bool isPositive) {
return Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.grey[200]!),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(title, style: const TextStyle(color: Colors.grey, fontSize: 14)),
const SizedBox(height: 8),
Text(value, style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),
Text(trend, style: TextStyle(color: isPositive ? Colors.green : Colors.red, fontWeight: FontWeight.w600)),
],
),
);
}
}SliverGrid.extentadapts column count, but fixed aspect ratios can clip long labels or enlarged text. Test width and text scale and choose content-based heights where needed.fl_chartis one chart option; assess accessibility, maintenance and the required chart types.
React Native
const DashboardScreen = () => {
return (
<ScrollView style={{ flex: 1, backgroundColor: '#F8F9FA' }}>
<View style={{ padding: 16, flexDirection: 'row', flexWrap: 'wrap', gap: 16 }}>
<KPICard title="Revenue" value="$45,231" trend="+12.5%" isPositive={true} />
<KPICard title="Users" value="2,405" trend="+4.1%" isPositive={true} />
<KPICard title="Churn" value="1.2%" trend="-0.4%" isPositive={true} />
<KPICard title="Session" value="4m 12s" trend="+0.1%" isPositive={true} />
</View>
<View style={{ paddingHorizontal: 16, paddingBottom: 32 }}>
<View style={{ height: 250, backgroundColor: '#FFF', borderRadius: 12, justifyContent: 'center', alignItems: 'center' }}>
<Text style={{ color: '#999' }}>Chart Area</Text>
</View>
</View>
</ScrollView>
);
};
const KPICard = ({ title, value, trend, isPositive }) => (
<View style={{
backgroundColor: '#FFF',
padding: 16,
borderRadius: 8,
borderWidth: 1,
borderColor: '#E9ECEF',
flexBasis: '47%', // roughly half width minus gap
minWidth: 150
}}>
<Text style={{ color: '#6C757D', fontSize: 14, marginBottom: 4 }}>{title}</Text>
<Text style={{ fontSize: 22, fontWeight: '700', marginBottom: 4 }}>{value}</Text>
<Text style={{ color: isPositive ? '#28A745' : '#DC3545', fontWeight: '600', fontSize: 12 }}>{trend}</Text>
</View>
);- To make responsive flex grids in React Native, use
flexDirection: 'row',flexWrap: 'wrap', and set the children toflexBasis: '47%'. - For heavy data visualization, look into
victory-nativeor@shopify/react-native-skia.
Jetpack Compose
@Composable
fun DashboardScreen() {
Column(
modifier = Modifier
.fillMaxSize()
.background(Color(0xFFF8F9FA))
.verticalScroll(rememberScrollState())
) {
// To… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- data-dense-design – Hướng dẫn triển khai Web và App cho Data-Dense Design. Kích hoạt khi người dùng muốn…
- database-design – Nguyên tắc và ra quyết định thiết kế cơ sở dữ liệu. Thiết kế schema, chiến lược index…
- segment-anything-model – SAM: phân đoạn ảnh zero-shot qua điểm, hộp và mặt nạ.
- ddd-strategic-design – Thiết kế các artifact chiến lược DDD gồm subdomain, bounded context và ngôn ngữ chung…
- visual-recon – Chụp ảnh màn hình tất cả host đang hoạt động để phân loại trực quan nhanh và nhận diện…
- observability-designer – Thiết kế chiến lược observability sẵn sàng cho production, kết hợp metrics, logs và…
- design-it – Định tuyến các tác vụ thiết kế frontend đến 48 phong cách UI cụ thể. Kích hoạt khi yêu…
- design-md – Phân tích các dự án Stitch và tổng hợp hệ thống thiết kế ngữ nghĩa thành file DESIGN.md.