diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index ac41eb1..c7844c6 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -1,5 +1,5 @@ // Highlighted sidebar items -export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Text Type', 'Glass Surface', 'Sticker Peel']; +export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Text Type', 'Glass Surface', 'Sticker Peel', 'Scroll Stack']; export const UPDATED = []; // Used for main sidebar navigation @@ -63,6 +63,7 @@ export const CATEGORIES = [ 'Masonry', 'Glass Surface', 'Magic Bento', + 'Scroll Stack', 'Profile Card', 'Dock', 'Gooey Nav', @@ -80,7 +81,7 @@ export const CATEGORIES = [ 'Flowing Menu', 'Elastic Slider', 'Stack', - 'Chroma Grid' + 'Chroma Grid', ] }, { diff --git a/src/constants/Components.ts b/src/constants/Components.ts index d543dc2..374b699 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -69,6 +69,7 @@ const components = { 'tilted-card': () => import('../demo/Components/TiltedCardDemo.vue'), 'stack': () => import('../demo/Components/StackDemo.vue'), 'chroma-grid': () => import('../demo/Components/ChromaGridDemo.vue'), + 'scroll-stack': () => import('../demo/Components/ScrollStackDemo.vue'), }; const backgrounds = { diff --git a/src/constants/code/Components/scrollStackCode.ts b/src/constants/code/Components/scrollStackCode.ts new file mode 100644 index 0000000..ea78710 --- /dev/null +++ b/src/constants/code/Components/scrollStackCode.ts @@ -0,0 +1,26 @@ +import code from '@content/Components/ScrollStack/ScrollStack.vue?raw'; +import { createCodeObject } from '../../../types/code'; + +export const scrollStack = createCodeObject(code, 'Components/ScrollStack', { + installation: `npm install lenis`, + usage: ` + + + Card 1 + This is the first card in the stack + + + Card 2 + This is the second card in the stack + + + Card 3 + This is the third card in the stack + + + + +` +}); diff --git a/src/content/Components/ScrollStack/ScrollStack.vue b/src/content/Components/ScrollStack/ScrollStack.vue new file mode 100644 index 0000000..24f505a --- /dev/null +++ b/src/content/Components/ScrollStack/ScrollStack.vue @@ -0,0 +1,292 @@ + + + + + + + + + + + + + diff --git a/src/css/category.css b/src/css/category.css index ecbd9f9..c85fec5 100644 --- a/src/css/category.css +++ b/src/css/category.css @@ -566,3 +566,90 @@ div:has(> .props-table) { order: 2; } } + +.scroll-stack-card-demo { + font-size: clamp(1.5rem, 4vw, 3rem); + font-weight: 900; + color: #fff; + display: flex; + justify-content: space-between; + flex-direction: column; + gap: 1rem; + white-space: nowrap; + text-align: center; +} + +.scroll-stack-card-demo .stack-img-container { + width: 100%; + height: 100%; + min-height: 150px; + border-radius: 1.5rem; + border: 10px solid #fff; + display: flex; + align-items: center; + justify-content: center; + font-size: clamp(4rem, 8vw, 8rem); +} + +.scroll-stack-demo-container .scroll-stack-inner { + padding: 20vh 2rem 50rem; +} + +.ssc-demo-1 { + background-color: #5227ff; +} + +.ssc-demo-2 { + background-color: #f01e9c; +} + +.ssc-demo-3 { + background-color: #5227ff; +} + +.ssc-demo-4 { + background-color: #f01e9c; +} + +.ssc-demo-5 { + background-color: #5227ff; + text-align: center; + justify-content: center; + align-items: center; +} + +@media only screen and (min-width: 1240px) { + .scroll-stack-card-demo { + flex-direction: row; + gap: 2rem; + text-align: left; + } + + .scroll-stack-demo-container .scroll-stack-inner { + padding: 20vh 5rem 50rem; + } + + .scroll-stack-card-demo .stack-img-container { + width: 50%; + min-height: auto; + } + + .scroll-stack-card-demo h3 { + margin-bottom: 1em; + } +} + +@media only screen and (max-width: 480px) { + .scroll-stack-card-demo { + font-size: 1rem; + padding: 0.2rem; + gap: 0.5rem; + } + + .scroll-stack-card-demo .stack-img-container { + border-width: 5px; + border-radius: 1rem; + min-height: 120px; + font-size: 3rem; + } +} diff --git a/src/demo/Components/ScrollStackDemo.vue b/src/demo/Components/ScrollStackDemo.vue new file mode 100644 index 0000000..bf6e135 --- /dev/null +++ b/src/demo/Components/ScrollStackDemo.vue @@ -0,0 +1,216 @@ + + + + + { + isCompleted = false; + forceRerender(); + } + " + /> + + {{ isCompleted ? 'Stack Completed!' : 'Scroll Down' }} + + + + + Text Animations + + + + + + + + Animations + + + + + + + + Components + + + + + + + + Backgrounds + + + + + + + + All on Vue Bits! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
This is the first card in the stack
This is the second card in the stack
This is the third card in the stack
+ {{ isCompleted ? 'Stack Completed!' : 'Scroll Down' }} +