Home / Function/ CardsStats() — ui Function Reference

CardsStats() — ui Function Reference

Architecture documentation for the CardsStats() function in stats.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  5de3b087_d926_f335_c0ac_914e4f9a6324["CardsStats()"]
  44ca9ac0_506e_b5b4_4757_c060fe9c3c80["stats.tsx"]
  5de3b087_d926_f335_c0ac_914e4f9a6324 -->|defined in| 44ca9ac0_506e_b5b4_4757_c060fe9c3c80
  style 5de3b087_d926_f335_c0ac_914e4f9a6324 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/components/cards/stats.tsx lines 65–132

export function CardsStats() {
  return (
    <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2">
      <Card>
        <CardHeader>
          <CardDescription>Total Revenue</CardDescription>
          <CardTitle className="text-3xl">$15,231.89</CardTitle>
          <CardDescription>+20.1% from last month</CardDescription>
        </CardHeader>
        <CardContent className="pb-0">
          <ChartContainer config={chartConfig} className="h-[80px] w-full">
            <LineChart
              data={data}
              margin={{
                top: 5,
                right: 10,
                left: 10,
                bottom: 0,
              }}
            >
              <Line
                type="monotone"
                strokeWidth={2}
                dataKey="revenue"
                stroke="var(--color-revenue)"
                activeDot={{
                  r: 6,
                }}
              />
            </LineChart>
          </ChartContainer>
        </CardContent>
      </Card>
      <Card className="pb-0 lg:hidden xl:flex">
        <CardHeader>
          <CardDescription>Subscriptions</CardDescription>
          <CardTitle className="text-3xl">+2,350</CardTitle>
          <CardDescription>+180.1% from last month</CardDescription>
          <CardAction>
            <Button variant="ghost" size="sm">
              View More
            </Button>
          </CardAction>
        </CardHeader>
        <CardContent className="mt-auto max-h-[124px] flex-1 p-0">
          <ChartContainer config={chartConfig} className="size-full">
            <AreaChart
              data={data}
              margin={{
                left: 0,
                right: 0,
              }}
            >
              <Area
                dataKey="subscription"
                fill="var(--color-subscription)"
                fillOpacity={0.05}
                stroke="var(--color-subscription)"
                strokeWidth={2}
                type="monotone"
              />
            </AreaChart>
          </ChartContainer>
        </CardContent>
      </Card>
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does CardsStats() do?
CardsStats() is a function in the ui codebase, defined in apps/v4/components/cards/stats.tsx.
Where is CardsStats() defined?
CardsStats() is defined in apps/v4/components/cards/stats.tsx at line 65.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free