diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index 15e7b8b..77e872d 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -1,5 +1,5 @@ // Highlighted sidebar items -export const NEW = ['Prism', 'Plasma' 'Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Glass Surface', 'Sticker Peel', 'Scroll Stack', 'Faulty Terminal', 'Pill Nav', 'Card Nav', 'Logo Loop']; +export const NEW = ['Prism', 'Plasma', 'Electric Border', 'Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy', 'Glass Surface', 'Sticker Peel', 'Scroll Stack', 'Faulty Terminal', 'Pill Nav', 'Card Nav', 'Logo Loop']; export const UPDATED = []; // Used for main sidebar navigation @@ -41,6 +41,7 @@ export const CATEGORIES = [ 'Logo Loop', 'Pixel Transition', 'Target Cursor', + 'Electric Border', 'Sticker Peel', 'Ribbons', 'Glare Hover', diff --git a/src/constants/Components.ts b/src/constants/Components.ts index df31a09..5d22f15 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -21,6 +21,7 @@ const animations = { 'target-cursor': () => import('../demo/Animations/TargetCursorDemo.vue'), 'crosshair': () => import('../demo/Animations/CrosshairDemo.vue'), 'sticker-peel': () => import('../demo/Animations/StickerPeelDemo.vue'), + 'electric-border': () => import('../demo/Animations/ElectricBorderDemo.vue'), }; const textAnimations = { diff --git a/src/constants/code/Animations/electricBorderCode.ts b/src/constants/code/Animations/electricBorderCode.ts new file mode 100644 index 0000000..dadea44 --- /dev/null +++ b/src/constants/code/Animations/electricBorderCode.ts @@ -0,0 +1,28 @@ +import code from '@/content/Animations/ElectricBorder/ElectricBorder.vue?raw'; +import { createCodeObject } from '@/types/code'; + +export const electricBorder = createCodeObject(code, 'Animations/ElectricBorder', { + usage: `// CREDIT +// Component inspired by @BalintFerenczy on X +// https://codepen.io/BalintFerenczy/pen/KwdoyEN + + + + + + A glowing, animated border wrapper. + + + + + +` +}); diff --git a/src/content/Animations/ElectricBorder/ElectricBorder.vue b/src/content/Animations/ElectricBorder/ElectricBorder.vue new file mode 100644 index 0000000..792bd05 --- /dev/null +++ b/src/content/Animations/ElectricBorder/ElectricBorder.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/css/category.css b/src/css/category.css index 31fb952..8e6d95e 100644 --- a/src/css/category.css +++ b/src/css/category.css @@ -678,3 +678,111 @@ div:has(> .props-table) { font-size: 3rem; } } + +.eb-demo-card { + position: relative; + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + gap: 8px; + padding: 24px; + border-radius: 16px; + background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); + color: #e9f8ff; +} + +.eb-demo-badge { + align-self: flex-start; + font-size: 10px; + letter-spacing: 0.08em; + text-transform: uppercase; + padding: 4px 8px; + border-radius: 999px; + background: rgba(255, 255, 255, 0.15); + color: #fff; +} + +.eb-demo-title { + margin: 0; + font-size: 24px; + font-weight: 700; +} + +.eb-demo-desc { + margin: 0; + opacity: 0.7; + font-size: 14px; +} + +.eb-demo-row { + display: flex; + gap: 6px; + margin-top: auto; +} + +.eb-demo-chip { + font-size: 11px; + padding: 2px 8px; + border-radius: 999px; + background: rgba(255, 255, 255, 0.06); + color: rgba(255, 255, 255, 0.8); + border: 1px solid rgba(255, 255, 255, 0.08); +} + +.eb-demo-cta { + margin-top: 6px; + align-self: flex-start; + font-size: 14px; + font-weight: 600; + width: 100%; + color: #2e2e2e; + background: #fff; + border: none; + border-radius: 10px; + padding: 8px 10px; + cursor: pointer; + transition: + transform 120ms ease, + filter 120ms ease, + box-shadow 120ms ease; + box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15); +} + +.eb-demo-cta:hover { + transform: translateY(-1px); + filter: brightness(0.98); + box-shadow: 0 6px 24px rgba(125, 249, 255, 0.25); +} + +.eb-demo-button-wrap { + width: 150px; + height: 50px; + border-radius: 999px; + display: flex; + align-items: center; + justify-content: center; +} + +.eb-demo-button { + font-size: 16px; + line-height: 0; + letter-spacing: -0.5px; + color: #b0f29e; + border: none; + border-radius: 999px; + padding: 8px 12px; + cursor: pointer; +} + +.eb-button-container { + transition: 0.3s ease; +} + +.eb-button-container:hover { + transform: scale(1.1); + background-color: rgba(177, 158, 239, 0.1); + box-shadow: 0 8px 16px rgba(177, 158, 239, 0.1); + transition: 0.3s ease; + filter: saturate(1.5); +} diff --git a/src/demo/Animations/ElectricBorderDemo.vue b/src/demo/Animations/ElectricBorderDemo.vue new file mode 100644 index 0000000..a5c5aa4 --- /dev/null +++ b/src/demo/Animations/ElectricBorderDemo.vue @@ -0,0 +1,168 @@ + + + + + + + Featured + Electric Card + An electric border for shocking your users, the right way. + + Live + v1.0 + + Get Started + + + + + Learn More + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ A glowing, animated border wrapper. +
An electric border for shocking your users, the right way.