skills/vendix-frontend-stats-cards/SKILL.md
Responsive stats/KPI card pattern using StatsComponent and the global stats-container. Trigger: When implementing stats cards, dashboard metrics, KPI summaries, or sticky stats sections in admin modules.
npx skillsauth add rzyfront/vendix vendix-frontend-stats-cardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
apps/frontend/src/app/shared/components/stats/stats.component.tsapps/frontend/src/app/shared/components/stats/README.mdapps/frontend/src/styles.scssapps/frontend/src/app/private/modules/store/app-stats uses Angular signal inputs:
| Input | Type | Default |
| --- | --- | --- |
| title | string | required |
| value | string | number | '' |
| smallText | string | undefined | undefined |
| iconName | string | 'info' |
| iconBgColor | string | 'bg-primary/10' |
| iconColor | string | 'text-primary' |
| clickable | boolean | false |
| loading | boolean | false |
There are no outputs. smallText is optional in code, but current store modules commonly provide it for context. Prefer including it when the text is meaningful.
Use the global stats-container class instead of hand-written grid classes.
<div class="stats-container sticky top-0 z-20 bg-background md:static md:bg-transparent">
<app-stats
title="Orders"
[value]="stats().totalOrders"
smallText="Orders in the selected period"
iconName="shopping-cart"
iconBgColor="bg-blue-100"
iconColor="text-blue-500"
/>
</div>
Real global behavior:
1rem gap.<640px: horizontal flex scroll with fixed-width cards.Do not duplicate the global CSS in components.
sticky top-0 z-20 bg-background on the stats container.top-[99px] only when the stats strip height matches the current standard layout.md:static md:bg-transparent to restore normal desktop flow.| Meaning | Background | Icon Color | Common Icons |
| --- | --- | --- | --- |
| Total/primary | bg-blue-100 | text-blue-500 | shopping-cart, users, package |
| Pending/warning | bg-amber-100 | text-amber-500 | clock, alert-circle |
| Success/active | bg-emerald-100 | text-emerald-500 | check-circle, check |
| Money/revenue | bg-purple-100 | text-purple-500 | dollar-sign, credit-card |
| Critical | bg-red-100 | text-red-500 | x-circle, alert-triangle |
| Neutral | bg-gray-100 | text-gray-500 | info, help-circle |
Always verify icon names against icons.registry.ts before using them.
readonly stats = signal({
totalOrders: 0,
pendingOrders: 0,
completedOrders: 0,
totalRevenue: 0,
});
<app-stats
title="Revenue"
[value]="formatCurrency(stats().totalRevenue)"
smallText="Confirmed sales"
iconName="dollar-sign"
iconBgColor="bg-purple-100"
iconColor="text-purple-500"
/>
grid grid-cols-* classes for standard stats sections.clickable is enabled; set [clickable]="true" explicitly if needed.smallText is required by the component; it is a usage recommendation, not a type requirement.vendix-frontend-standard-module - Standard admin list layoutvendix-frontend-icons - Icon registry and app-iconvendix-zoneless-signals - Signal state for stats datadevelopment
Mobile app development rules for Vendix Expo/React Native project. Trigger: When editing, creating, or modifying any file under apps/mobile, or when developing mobile-specific features.
development
Feature gating by store subscription state: global store write guard, AI feature gate, Redis feature resolution, quota consumption, frontend paywall interceptor, banner, and subscription UI states. Trigger: When adding feature gates, paywalls, subscription-based access control, protecting store write operations, AI feature gates, or rollout flags.
testing
SaaS subscription billing for Vendix stores: plan pricing, invoices, Wompi platform payments, manual payments, partner commissions, payouts, proration, and dunning. Trigger: When creating SaaS invoices, working with partner rev-share, margin/surcharge pricing, invoice sequence allocation, partner payout batches, subscription payments, manual payments, or dunning flows.
development
Periodic quota counters with Redis, UTC period keys, Lua-based idempotent AI quota consumption, request-id deduplication, and post-success consumption. Trigger: When building quota counters, enforcing monthly/daily feature caps, or reusing AI quota patterns for uploads, emails, exports, or rate-limited features.