← catalogo / lists/grid-lists
TW-LI-GL-01
Tailwind Plus
tailwind/application-ui/lists/grid-lists/01-contact-cards-with-small-portrait
html: questa e' vue, sotto c'e' il sorgente.
@heroicons/vue<template>
<ul role="list" class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
<li v-for="person in people" :key="person.email" class="col-span-1 divide-y divide-gray-200 rounded-lg bg-white shadow-sm dark:divide-white/10 dark:bg-gray-800/50 dark:shadow-none dark:outline dark:-outline-offset-1 dark:outline-white/10">
<div class="flex w-full items-center justify-between space-x-6 p-6">
<div class="flex-1 truncate">
<div class="flex items-center space-x-3">
<h3 class="truncate text-sm font-medium text-gray-900 dark:text-white">{{ person.name }}</h3>
<span class="inline-flex shrink-0 items-center rounded-full bg-green-50 px-1.5 py-0.5 text-xs font-medium text-green-700 inset-ring inset-ring-green-600/20 dark:bg-green-500/10 dark:text-green-500 dark:inset-ring-green-500/10">{{ person.role }}</span>
</div>
<p class="mt-1 truncate text-sm text-gray-500 dark:text-gray-400">{{ person.title }}</p>
</div>
<img class="size-10 shrink-0 rounded-full bg-gray-300 outline -outline-offset-1 outline-black/5 dark:bg-gray-700 dark:outline-white/10" :src="person.imageUrl" alt="" />
</div>
<div>
<div class="-mt-px flex divide-x divide-gray-200 dark:divide-white/10">
<div class="flex w-0 flex-1">
<a :href="`mailto:${person.email}`" class="relative -mr-px inline-flex w-0 flex-1 items-center justify-center gap-x-3 rounded-bl-lg border border-transparent py-4 text-sm font-semibold text-gray-900 dark:text-white">
<EnvelopeIcon class="size-5 text-gray-400 dark:text-gray-500" aria-hidden="true" />
Email
</a>
</div>
<div class="-ml-px flex w-0 flex-1">
<a :href="`tel:${person.telephone}`" class="relative inline-flex w-0 flex-1 items-center justify-center gap-x-3 rounded-br-lg border border-transparent py-4 text-sm font-semibold text-gray-900 dark:text-white">
<PhoneIcon class="size-5 text-gray-400 dark:text-gray-500" aria-hidden="true" />
Call
</a>
</div>
</div>
</div>
</li>
</ul>
</template>
<script setup>
import { EnvelopeIcon, PhoneIcon } from '@heroicons/vue/20/solid'
const people = [
{
name: 'Jane Cooper',
title: 'Regional Paradigm Technician',
role: 'Admin',
email: 'janecooper@example.com',
telephone: '+1-202-555-0170',
imageUrl:
'https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60',
},
{
name: 'Cody Fisher',
title: 'Product Directives Officer',
role: 'Admin',
email: 'codyfisher@example.com',
telephone: '+1-202-555-0114',
imageUrl:
'https://images.unsplash.com/photo-1570295999919-56ceb5ecca61?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60',
},
{
name: 'Esther Howard',
title: 'Forward Response Developer',
email: 'estherhoward@example.com',
telephone: '+1-202-555-0143',
role: 'Admin',
imageUrl:
'https://images.unsplash.com/photo-1520813792240-56fc4a3765a7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60',
},
{
name: 'Jenny Wilson',
title: 'Central Security Manager',
role: 'Admin',
email: 'jennywilson@example.com',
telephone: '+1-202-555-0184',
imageUrl:
'https://images.unsplash.com/photo-1498551172505-8ee7ad69f235?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60',
},
{
name: 'Kristin Watson',
title: 'Lead Implementation Liaison',
role: 'Admin',
email: 'kristinwatson@example.com',
telephone: '+1-202-555-0191',
imageUrl:
'https://images.unsplash.com/photo-1532417344469-368f9ae6d187?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60',
},
{
name: 'Cameron Williamson',
title: 'Internal Applications Engineer',
role: 'Admin',
email: 'cameronwilliamson@example.com',
telephone: '+1-202-555-0108',
imageUrl:
'https://images.unsplash.com/photo-1566492031773-4f4e44671857?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60',
},
]
</script>