Create <TiltedCard /> component

This commit is contained in:
David Haz
2025-07-10 16:03:36 +03:00
parent f7e1b51983
commit 77a588ea56
5 changed files with 356 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import code from '@content/Components/TiltedCard/TiltedCard.vue?raw'
import type { CodeObject } from '../../../types/code'
export const tiltedCard: CodeObject = {
cli: `npx jsrepo add https://vue-bits.dev/ui/Components/TiltedCard`,
installation: `npm install motion-v`,
usage: `<template>
<TiltedCard
image-src="https://example.com/image.jpg"
alt-text="Sample image"
caption-text="Hover to see tooltip"
container-height="400px"
container-width="400px"
image-height="300px"
image-width="300px"
:rotate-amplitude="14"
:scale-on-hover="1.1"
:show-mobile-warning="true"
:show-tooltip="true"
:display-overlay-content="false"
>
<template #overlay>
<div class="overlay-content">
Your overlay content here
</div>
</template>
</TiltedCard>
</template>
<script setup lang="ts">
import TiltedCard from "./TiltedCard.vue";
</script>`,
code
}