From 45d0dbaf3c696dbd16b040acdb688d55fa4a5c46 Mon Sep 17 00:00:00 2001 From: Utkarsh-Singhal-26 Date: Sat, 12 Jul 2025 12:06:15 +0530 Subject: [PATCH] Added background --- src/constants/Categories.ts | 1 + src/constants/Components.ts | 1 + .../code/Backgrounds/gridMotionCode.ts | 45 +++++++ .../Backgrounds/GridMotion/GridMotion.vue | 116 ++++++++++++++++++ src/demo/Backgrounds/GridMotionDemo.vue | 115 +++++++++++++++++ 5 files changed, 278 insertions(+) create mode 100644 src/constants/code/Backgrounds/gridMotionCode.ts create mode 100644 src/content/Backgrounds/GridMotion/GridMotion.vue create mode 100644 src/demo/Backgrounds/GridMotionDemo.vue diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index 9234c53..43868e4 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -69,6 +69,7 @@ export const CATEGORIES = [ 'Squares', 'Iridescence', 'Threads', + 'Grid Motion' ], } ]; diff --git a/src/constants/Components.ts b/src/constants/Components.ts index d1c9376..cb5f98e 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -55,6 +55,7 @@ const backgrounds = { 'threads': () => import("../demo/Backgrounds/ThreadsDemo.vue"), 'aurora': () => import("../demo/Backgrounds/AuroraDemo.vue"), 'beams': () => import("../demo/Backgrounds/BeamsDemo.vue"), + 'grid-motion': () => import("../demo/Backgrounds/GridMotionDemo.vue"), }; export const componentMap = { diff --git a/src/constants/code/Backgrounds/gridMotionCode.ts b/src/constants/code/Backgrounds/gridMotionCode.ts new file mode 100644 index 0000000..36b3082 --- /dev/null +++ b/src/constants/code/Backgrounds/gridMotionCode.ts @@ -0,0 +1,45 @@ +import code from "@content/Backgrounds/GridMotion/GridMotion.vue?raw"; +import type { CodeObject } from "../../../types/code"; + +export const gridMotion: CodeObject = { + cli: `npx jsrepo add https://vue-bits.dev/ui/Backgrounds/GridMotion`, + installation: `npm i gsap`, + usage: ` + +`, + code, +}; diff --git a/src/content/Backgrounds/GridMotion/GridMotion.vue b/src/content/Backgrounds/GridMotion/GridMotion.vue new file mode 100644 index 0000000..ee33f4b --- /dev/null +++ b/src/content/Backgrounds/GridMotion/GridMotion.vue @@ -0,0 +1,116 @@ + + + diff --git a/src/demo/Backgrounds/GridMotionDemo.vue b/src/demo/Backgrounds/GridMotionDemo.vue new file mode 100644 index 0000000..1802d94 --- /dev/null +++ b/src/demo/Backgrounds/GridMotionDemo.vue @@ -0,0 +1,115 @@ + + +