Skip to content

Commit 863752d

Browse files
authored
Merge branch 'main' into feat/stepper
2 parents bafee9c + 19e8be9 commit 863752d

File tree

25 files changed

+3642
-6
lines changed

25 files changed

+3642
-6
lines changed

src/constants/Categories.ts

Lines changed: 10 additions & 3 deletions
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', 'Sticker Peel'];
2+
export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Text Type', 'Glass Surface', 'Sticker Peel', 'Scroll Stack', 'Faulty Terminal'];
33
export const UPDATED = [];
44

55
// Used for main sidebar navigation
@@ -27,7 +27,8 @@ export const CATEGORIES = [
2727
'Rotating Text',
2828
'Glitch Text',
2929
'Scroll Velocity',
30-
'Text Type'
30+
'Text Type',
31+
'Variable Proximity',
3132
]
3233
},
3334
{
@@ -63,6 +64,7 @@ export const CATEGORIES = [
6364
'Masonry',
6465
'Glass Surface',
6566
'Magic Bento',
67+
'Scroll Stack',
6668
'Profile Card',
6769
'Dock',
6870
'Gooey Nav',
@@ -81,7 +83,10 @@ export const CATEGORIES = [
8183
'Elastic Slider',
8284
'Stack',
8385
'Chroma Grid',
84-
'Stepper'
86+
'Stepper',
87+
'Bounce Cards',
88+
'Counter',
89+
'Rolling Gallery'
8590
]
8691
},
8792
{
@@ -93,6 +98,7 @@ export const CATEGORIES = [
9398
'Dither',
9499
'Dot Grid',
95100
'Hyperspeed',
101+
'Faulty Terminal',
96102
'Ripple Grid',
97103
'Silk',
98104
'Lightning',
@@ -109,6 +115,7 @@ export const CATEGORIES = [
109115
'Liquid Chrome',
110116
'Grid Distortion',
111117
'Galaxy',
118+
'Light Rays',
112119
]
113120
}
114121
];

src/constants/Components.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const textAnimations = {
4444
'glitch-text': () => import("../demo/TextAnimations/GlitchTextDemo.vue"),
4545
'scroll-velocity': () => import("../demo/TextAnimations/ScrollVelocityDemo.vue"),
4646
'text-type': () => import("../demo/TextAnimations/TextTypeDemo.vue"),
47+
'variable-proximity': () => import("../demo/TextAnimations/VariableProximityDemo.vue"),
4748
};
4849

4950
const components = {
@@ -70,6 +71,10 @@ const components = {
7071
'stack': () => import('../demo/Components/StackDemo.vue'),
7172
'chroma-grid': () => import('../demo/Components/ChromaGridDemo.vue'),
7273
'stepper': () => import('../demo/Components/StepperDemo.vue'),
74+
'bounce-cards': () => import('../demo/Components/BounceCardsDemo.vue'),
75+
'counter': () => import('../demo/Components/CounterDemo.vue'),
76+
'rolling-gallery': () => import('../demo/Components/RollingGalleryDemo.vue'),
77+
'scroll-stack': () => import('../demo/Components/ScrollStackDemo.vue'),
7378
};
7479

7580
const backgrounds = {
@@ -95,6 +100,8 @@ const backgrounds = {
95100
'grid-distortion': () => import('../demo/Backgrounds/GridDistortionDemo.vue'),
96101
'ripple-grid': () => import('../demo/Backgrounds/RippleGridDemo.vue'),
97102
'galaxy': () => import('../demo/Backgrounds/GalaxyDemo.vue'),
103+
'faulty-terminal': () => import('../demo/Backgrounds/FaultyTerminalDemo.vue'),
104+
'light-rays': () => import('../demo/Backgrounds/LightRaysDemo.vue'),
98105
};
99106

100107
export const componentMap = {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import code from '@content/Backgrounds/FaultyTerminal/FaultyTerminal.vue?raw';
2+
import { createCodeObject } from '../../../types/code';
3+
4+
export const faultyTerminal = createCodeObject(code, 'Backgrounds/FaultyTerminal', {
5+
installation: `npm install ogl`,
6+
usage: `<template>
7+
<div class="relative w-full h-[600px]">
8+
<FaultyTerminal
9+
:scale="1.5"
10+
:grid-mul="[2, 1]"
11+
:digit-size="1.2"
12+
:time-scale="1"
13+
:pause="false"
14+
:scanline-intensity="1"
15+
:glitch-amount="1"
16+
:flicker-amount="1"
17+
:noise-amp="1"
18+
:chromatic-aberration="0"
19+
:dither="0"
20+
:curvature="0"
21+
tint="#ffffff"
22+
:mouse-react="true"
23+
:mouse-strength="0.5"
24+
:page-load-animation="false"
25+
:brightness="1"
26+
/>
27+
</div>
28+
</template>
29+
30+
<script setup lang="ts">
31+
import FaultyTerminal from "./FaultyTerminal.vue";
32+
</script>`
33+
});
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import code from '@content/Backgrounds/LightRays/LightRays.vue?raw';
2+
import { createCodeObject } from '@/types/code';
3+
4+
export const lightRays = createCodeObject(code, 'Backgrounds/LightRays', {
5+
installation: `npm install ogl`,
6+
usage: `<template>
7+
<div class="w-full h-[600px] relative">
8+
<LightRays
9+
rays-origin="top-center"
10+
rays-color="#00ffff"
11+
:rays-speed="1.5"
12+
:light-spread="0.8"
13+
:ray-length="1.2"
14+
:follow-mouse="true"
15+
:mouse-influence="0.1"
16+
:noise-amount="0.1"
17+
:distortion="0.05"
18+
class-name="custom-rays"
19+
/>
20+
</div>
21+
</template>
22+
23+
<script setup lang="ts">
24+
import LightRays from "./LightRays.vue";
25+
</script>`
26+
});
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import code from '@content/Components/BounceCards/BounceCards.vue?raw';
2+
import { createCodeObject } from '@/types/code';
3+
4+
export const bounceCards = createCodeObject(code, 'Components/BounceCards', {
5+
installation: `npm install gsap`,
6+
usage: `<template>
7+
<BounceCards
8+
:images="images"
9+
:container-width="500"
10+
:container-height="250"
11+
:animation-delay="0.5"
12+
:animation-stagger="0.06"
13+
ease-type="elastic.out(1, 0.8)"
14+
:transform-styles="transformStyles"
15+
:enable-hover="true"
16+
class="custom-bounce-cards"
17+
/>
18+
</template>
19+
20+
<script setup lang="ts">
21+
import BounceCards from "./BounceCards.vue";
22+
23+
const images = [
24+
'https://picsum.photos/400/400?grayscale',
25+
'https://picsum.photos/500/500?grayscale',
26+
'https://picsum.photos/600/600?grayscale',
27+
'https://picsum.photos/700/700?grayscale',
28+
'https://picsum.photos/300/300?grayscale'
29+
];
30+
31+
const transformStyles = [
32+
'rotate(5deg) translate(-150px)',
33+
'rotate(0deg) translate(-70px)',
34+
'rotate(-5deg)',
35+
'rotate(5deg) translate(70px)',
36+
'rotate(-5deg) translate(150px)'
37+
];
38+
</script>`
39+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import code from '@content/Components/Counter/Counter.vue?raw';
2+
import { createCodeObject } from '../../../types/code';
3+
4+
export const counter = createCodeObject(code, 'Components/Counter', {
5+
installation: `npm i motion-v`,
6+
usage: `import Counter from './Counter.vue'
7+
8+
<Counter
9+
:value="1"
10+
:places="[100, 10, 1]"
11+
:fontSize="80"
12+
:padding="5"
13+
:gap="10"
14+
textColor="white"
15+
:fontWeight="900"
16+
/>`
17+
});
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import code from '@content/Components/RollingGallery/RollingGallery.vue?raw';
2+
import { createCodeObject } from '@/types/code.ts';
3+
4+
export const rollingGallery = createCodeObject(code, 'Components/RollingGallery', {
5+
installation: `npm install motion-v`,
6+
usage: `<template>
7+
<RollingGallery
8+
:autoplay="true"
9+
:pause-on-hover="true"
10+
:images="customImages"
11+
/>
12+
</template>
13+
14+
<script setup lang="ts">
15+
import RollingGallery from "./RollingGallery.vue";
16+
17+
const customImages = [
18+
"https://images.unsplash.com/photo-1528181304800-259b08848526?q=80&w=3870&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
19+
"https://images.unsplash.com/photo-1506665531195-3566af2b4dfa?q=80&w=3870&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
20+
"https://images.unsplash.com/photo-1520250497591-112f2f40a3f4?q=80&w=3456&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
21+
"https://images.unsplash.com/photo-1495103033382-fe343886b671?q=80&w=3870&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
22+
"https://images.unsplash.com/photo-1506781961370-37a89d6b3095?q=80&w=3264&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
23+
// Add more images as needed
24+
];
25+
</script>`
26+
});
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import code from '@content/Components/ScrollStack/ScrollStack.vue?raw';
2+
import { createCodeObject } from '../../../types/code';
3+
4+
export const scrollStack = createCodeObject(code, 'Components/ScrollStack', {
5+
installation: `npm install lenis`,
6+
usage: `<template>
7+
<ScrollStack>
8+
<ScrollStackItem>
9+
<h2>Card 1</h2>
10+
<p>This is the first card in the stack</p>
11+
</ScrollStackItem>
12+
<ScrollStackItem>
13+
<h2>Card 2</h2>
14+
<p>This is the second card in the stack</p>
15+
</ScrollStackItem>
16+
<ScrollStackItem>
17+
<h2>Card 3</h2>
18+
<p>This is the third card in the stack</p>
19+
</ScrollStackItem>
20+
</ScrollStack>
21+
</template>
22+
23+
<script setup lang="ts">
24+
import ScrollStack, { ScrollStackItem } from "./ScrollStack.vue";
25+
</script>`
26+
});
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import code from '@content/TextAnimations/VariableProximity/VariableProximity.vue?raw';
2+
import { createCodeObject } from '@/types/code';
3+
4+
export const variableProximity = createCodeObject(code, 'TextAnimations/VariableProximity', {
5+
installation: `npm install motion-v`,
6+
usage: `<template>
7+
<div ref="containerRef" class="relative min-h-[400px] p-4">
8+
<VariableProximity
9+
label="Hover me! Variable font magic!"
10+
from-font-variation-settings="'wght' 400, 'opsz' 9"
11+
to-font-variation-settings="'wght' 1000, 'opsz' 40"
12+
:container-ref="containerRef"
13+
:radius="100"
14+
falloff="linear"
15+
class-name="text-4xl font-bold text-center"
16+
/>
17+
</div>
18+
</template>
19+
20+
<script setup lang="ts">
21+
import { ref } from 'vue';
22+
import VariableProximity, { type FalloffType } from './VariableProximity.vue';
23+
24+
const containerRef = ref<HTMLElement | null>(null);
25+
</script>`
26+
});

0 commit comments

Comments
 (0)