collapsible

Collapsible animated card

Collapsible animated card

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

src/collapsible/c-collapsible-3.vue

<!--
  Расхождение с апстримом: `IconPlaceholder` заменена инлайновым `<svg>`
  (lucide-react v0.545.0 "chevron-down") — см. docs/PORTING.md §5.
-->
<script setup lang="ts">
import { Card, CardContent } from "@/components/ui/card"
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible"
</script>

<template>
  <div class="h-40 w-full max-w-xs">
    <Card class="py-3">
      <CardContent class="px-3">
        <Collapsible>
          <CollapsibleTrigger class="flex w-full cursor-pointer items-center justify-between text-sm">
            <span>How do I reset my password?</span>
            <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="text-muted-foreground size-4 shrink-0 transition-transform in-data-[state=open]:rotate-180"
            >
              <path d="m6 9 6 6 6-6" />
            </svg>
          </CollapsibleTrigger>
          <CollapsibleContent class="data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down">
            <div class="text-muted-foreground pt-3 text-sm">
              You can reset your password by clicking the "Forgot Password" link on the login page. We'll send you
              an email with instructions to create a new password.
            </div>
          </CollapsibleContent>
        </Collapsible>
      </CardContent>
    </Card>
  </div>
</template>

Установка

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

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

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