Skip to content

Conversation

@J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Jan 8, 2026

  • adds reveal prop, to make it possible to use lightweight VCircularProgress instead of VPie for stat cards

Markup:

<template>
  <v-app>
    <v-container
      :max-width="$vuetify.display.lg ? 676 : undefined"
      class="d-flex flex-wrap ga-4 px-0 justify-center"
    >
      <v-card v-for="(c, i) in cards" :key="i" elevation="6" width="330">
        <div class="d-flex align-start pa-3 justify-space-between">
          <div>
            <v-card-title v-text="c.title" />
            <v-card-subtitle class="mt-n1" v-text="c.subtitle" />
          </div>
          <v-progress-circular
            :model-value="c.value"
            :size="100"
            :width="12"
            class="ma-3"
            color="#048BA8"
            reveal
            rounded
          >
            <span
              :class="`text-${ $vuetify.theme.current.dark ? 'white' : 'black' }`"
            >{{ c.value }}%</span>
          </v-progress-circular>
        </div>
      </v-card>
    </v-container>
  </v-app>
</template>

<script setup>
  import { useTheme } from 'vuetify'
  const { change } = useTheme()
  change('system')

  const cards = [
    { title: 'CPU Usage', subtitle: '0.23 / 2 units', value: 11.3 },
    { title: 'Memory Usage', subtitle: '3.03 / 7.32 GB', value: 41.3 },
    { title: 'Pods', subtitle: '15 / 15 Requested', value: 100 },
    { title: 'Nodes', subtitle: '1 / 1 Ready', value: 100 },
  ]
</script>

@J-Sek J-Sek self-assigned this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant