card

Card with full image

Card with full image

Загрузка превью…

src/card/c-card-9.vue

<!--
  Расхождение с апстримом: `IconPlaceholder` заменена инлайновым `<svg>`
  (lucide-react v0.545.0 "bell"/"arrow-right") — см. docs/PORTING.md §5.

  `https://picsum.photos/...?random=N` заменён локальным 1x1 data-URI
  (`PIXEL`) — см. комментарий в `c-card-7.vue`.
-->
<script setup lang="ts">
import { Badge } from "@/components/reui/badge"
import { Button } from "@/components/ui/button"
import { Card, CardContent } from "@/components/ui/card"

const PIXEL =
  "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAUwAOw=="
</script>

<template>
  <Card class="w-full max-w-xs p-0">
    <CardContent class="flex flex-col gap-5 p-0">
      <div class="relative h-48 w-full overflow-hidden">
        <img
          :src="PIXEL"
          alt="16:9"
          width="1000"
          height="800"
          class="h-full w-full object-cover"
        />
      </div>

      <div class="flex flex-col items-center gap-4 p-6 pt-0">
        <Badge variant="outline">
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            stroke-width="2"
            stroke-linecap="round"
            stroke-linejoin="round"
            aria-hidden="true"
            class="lucide lucide-bell"
          ><path d="M10.268 21a2 2 0 0 0 3.464 0" /><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" /></svg>
          Trending
        </Badge>

        <p class="text-foreground text-center text-sm">
          Making your design process faster and easier. Design tools for your
          team.
        </p>

        <Button class="w-fit">
          Get Started
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            stroke-width="2"
            stroke-linecap="round"
            stroke-linejoin="round"
            aria-hidden="true"
            class="lucide lucide-arrow-right"
          ><path d="M5 12h14" /><path d="m12 5 7 7-7 7" /></svg>
        </Button>
      </div>
    </CardContent>
  </Card>
</template>

Установка

npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-card-9.json

Зависимости реестра

Источник: порт из ReUI (Keenthemes, MIT)