Skip to content

Commit 53c5b5e

Browse files
authored
Merge pull request #55 from Utkarsh-Singhal-26/feat/sticker-peel
Added <StickerPeel /> animation
2 parents b5024c4 + 0b2321c commit 53c5b5e

File tree

5 files changed

+578
-1
lines changed

5 files changed

+578
-1
lines changed

src/constants/Categories.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Highlighted sidebar items
2-
export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Text Type', 'Glass Surface'];
2+
export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Text Type', 'Glass Surface', 'Sticker Peel'];
33
export const UPDATED = [];
44

55
// Used for main sidebar navigation
@@ -39,6 +39,7 @@ export const CATEGORIES = [
3939
'Splash Cursor',
4040
'Pixel Transition',
4141
'Target Cursor',
42+
'Sticker Peel',
4243
'Ribbons',
4344
'Glare Hover',
4445
'Magnet Lines',

src/constants/Components.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const animations = {
1919
'shape-blur': () => import('../demo/Animations/ShapeBlurDemo.vue'),
2020
'target-cursor': () => import('../demo/Animations/TargetCursorDemo.vue'),
2121
'crosshair': () => import('../demo/Animations/CrosshairDemo.vue'),
22+
'sticker-peel': () => import('../demo/Animations/StickerPeelDemo.vue'),
2223
};
2324

2425
const textAnimations = {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import code from '@/content/Animations/StickerPeel/StickerPeel.vue?raw';
2+
import { createCodeObject } from '@/types/code';
3+
4+
export const stickerPeel = createCodeObject(code, 'Animations/StickerPeel', {
5+
installation: `npm install gsap`,
6+
usage: `<template>
7+
<StickerPeel
8+
:image-src="logo"
9+
:width="200"
10+
:rotate="30"
11+
:peelBackHoverPct="20"
12+
:peelBackActivePct="40"
13+
:shadow-intensity="0.6"
14+
:lighting-intensity="0.1"
15+
:initial-position="{ x: -100, y: 100 }"
16+
/>
17+
</template>
18+
19+
<script setup lang="ts">
20+
import StickerPeel from './StickerPeel.vue';
21+
import logo from './assets/sticker.png';
22+
</script>`
23+
});

0 commit comments

Comments
 (0)