button
Expanding button from icon to label
Expanding button from icon to label
Загрузка превью…
src/button/c-button-51.vue
<script setup lang="ts">
import { Button } from "@/components/ui/button"
</script>
<template>
<Button class="group/fab relative flex h-10 w-10 items-center overflow-hidden rounded-full px-3 transition-[width] duration-300 ease-in-out hover:w-32">
<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-plus absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 transition-transform duration-300 group-hover/fab:left-3 group-hover/fab:translate-x-0"
>
<path d="M5 12h14" />
<path d="M12 5v14" />
</svg>
<span class="ml-8 pr-2 whitespace-nowrap opacity-0 transition-opacity duration-300 group-hover/fab:opacity-100">
Create New
</span>
</Button>
</template>
Установка
npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-button-51.jsonЗависимости реестра
Источник: порт из ReUI (Keenthemes, MIT)