mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
Create <TiltedCard /> component
This commit is contained in:
@@ -48,6 +48,7 @@ export const CATEGORIES = [
|
||||
'Flying Posters',
|
||||
'Card Swap',
|
||||
'Infinite Scroll',
|
||||
'Tilted Card',
|
||||
'Glass Icons',
|
||||
'Decay Card',
|
||||
'Flowing Menu',
|
||||
|
||||
@@ -40,6 +40,7 @@ const components = {
|
||||
'decay-card': () => import("../demo/Components/DecayCardDemo.vue"),
|
||||
'flowing-menu': () => import("../demo/Components/FlowingMenuDemo.vue"),
|
||||
'elastic-slider': () => import("../demo/Components/ElasticSliderDemo.vue"),
|
||||
'tilted-card': () => import("../demo/Components/TiltedCardDemo.vue"),
|
||||
};
|
||||
|
||||
const backgrounds = {
|
||||
|
||||
34
src/constants/code/Components/tiltedCardCode.ts
Normal file
34
src/constants/code/Components/tiltedCardCode.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user