Catalogo design-system navigation/progress-bars

← catalogo / navigation/progress-bars

Navigation · Progress bars · Panels

TW-NA-PB-02 Tailwind Plus

tailwind/application-ui/navigation/progress-bars/02-panels

Anteprima disegnata disponibile solo per la versione html: questa e' vue, sotto c'e' il sorgente.

Pacchetti da installare

@heroicons/vue

Da toccare per il marchio

  • colore indigo: sostituisci col colore del marchio
  • collegamenti a vuoto: puntali alle rotte vere

Sorgente (vue)

<template>
  <nav aria-label="Progress">
    <ol role="list" class="divide-y divide-gray-300 rounded-md border border-gray-300 md:flex md:divide-y-0 dark:divide-white/15 dark:border-white/15">
      <li v-for="(step, stepIdx) in steps" :key="step.name" class="relative md:flex md:flex-1">
        <a v-if="step.status === 'complete'" :href="step.href" class="group flex w-full items-center">
          <span class="flex items-center px-6 py-4 text-sm font-medium">
            <span class="flex size-10 shrink-0 items-center justify-center rounded-full bg-indigo-600 group-hover:bg-indigo-800 dark:bg-indigo-500 dark:group-hover:bg-indigo-400">
              <CheckIcon class="size-6 text-white" aria-hidden="true" />
            </span>
            <span class="ml-4 text-sm font-medium text-gray-900 dark:text-white">{{ step.name }}</span>
          </span>
        </a>
        <a v-else-if="step.status === 'current'" :href="step.href" class="flex items-center px-6 py-4 text-sm font-medium" aria-current="step">
          <span class="flex size-10 shrink-0 items-center justify-center rounded-full border-2 border-indigo-600 dark:border-indigo-400">
            <span class="text-indigo-600 dark:text-indigo-400">{{ step.id }}</span>
          </span>
          <span class="ml-4 text-sm font-medium text-indigo-600 dark:text-indigo-400">{{ step.name }}</span>
        </a>
        <a v-else :href="step.href" class="group flex items-center">
          <span class="flex items-center px-6 py-4 text-sm font-medium">
            <span class="flex size-10 shrink-0 items-center justify-center rounded-full border-2 border-gray-300 group-hover:border-gray-400 dark:border-white/15 dark:group-hover:border-white/25">
              <span class="text-gray-500 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white">{{ step.id }}</span>
            </span>
            <span class="ml-4 text-sm font-medium text-gray-500 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white">{{ step.name }}</span>
          </span>
        </a>
        <template v-if="stepIdx !== steps.length - 1">
          <!-- Arrow separator for lg screens and up -->
          <div class="absolute top-0 right-0 hidden h-full w-5 md:block" aria-hidden="true">
            <svg class="size-full text-gray-300 dark:text-white/15" viewBox="0 0 22 80" fill="none" preserveAspectRatio="none">
              <path d="M0 -2L20 40L0 82" vector-effect="non-scaling-stroke" stroke="currentcolor" stroke-linejoin="round" />
            </svg>
          </div>
        </template>
      </li>
    </ol>
  </nav>
</template>

<script setup>
import { CheckIcon } from '@heroicons/vue/24/solid'

const steps = [
  { id: '01', name: 'Job details', href: '#', status: 'complete' },
  { id: '02', name: 'Application form', href: '#', status: 'current' },
  { id: '03', name: 'Preview', href: '#', status: 'upcoming' },
]
</script>