← catalogo / lists/feeds
TW-LI-FE-01
Tailwind Plus
tailwind/application-ui/lists/feeds/01-simple-with-icons
html: questa e' vue, sotto c'e' il sorgente.
@heroicons/vue<template>
<div class="flow-root">
<ul role="list" class="-mb-8">
<li v-for="(event, eventIdx) in timeline" :key="event.id">
<div class="relative pb-8">
<span v-if="eventIdx !== timeline.length - 1" class="absolute top-4 left-4 -ml-px h-full w-0.5 bg-gray-200 dark:bg-white/10" aria-hidden="true"></span>
<div class="relative flex space-x-3">
<div>
<span :class="[event.iconBackground, 'flex size-8 items-center justify-center rounded-full ring-8 ring-white dark:ring-gray-900']">
<component :is="event.icon" class="size-5 text-white" aria-hidden="true" />
</span>
</div>
<div class="flex min-w-0 flex-1 justify-between space-x-4 pt-1.5">
<div>
<p class="text-sm text-gray-500 dark:text-gray-400">
{{ event.content }} <a :href="event.href" class="font-medium text-gray-900 dark:text-white">{{ event.target }}</a>
</p>
</div>
<div class="text-right text-sm whitespace-nowrap text-gray-500 dark:text-gray-400">
<time :datetime="event.datetime">{{ event.date }}</time>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</template>
<script setup>
import { CheckIcon, HandThumbUpIcon, UserIcon } from '@heroicons/vue/20/solid'
const timeline = [
{
id: 1,
content: 'Applied to',
target: 'Front End Developer',
href: '#',
date: 'Sep 20',
datetime: '2020-09-20',
icon: UserIcon,
iconBackground: 'bg-gray-400 dark:bg-gray-600',
},
{
id: 2,
content: 'Advanced to phone screening by',
target: 'Bethany Blake',
href: '#',
date: 'Sep 22',
datetime: '2020-09-22',
icon: HandThumbUpIcon,
iconBackground: 'bg-blue-500',
},
{
id: 3,
content: 'Completed phone screening with',
target: 'Martha Gardner',
href: '#',
date: 'Sep 28',
datetime: '2020-09-28',
icon: CheckIcon,
iconBackground: 'bg-green-500',
},
{
id: 4,
content: 'Advanced to interview by',
target: 'Bethany Blake',
href: '#',
date: 'Sep 30',
datetime: '2020-09-30',
icon: HandThumbUpIcon,
iconBackground: 'bg-blue-500',
},
{
id: 5,
content: 'Completed interview with',
target: 'Katherine Snyder',
href: '#',
date: 'Oct 4',
datetime: '2020-10-04',
icon: CheckIcon,
iconBackground: 'bg-green-500',
},
]
</script>