mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 22:49:31 -07:00
Added <GridDistortion /> background
This commit is contained in:
24
src/constants/code/Backgrounds/gridDistortionCode.ts
Normal file
24
src/constants/code/Backgrounds/gridDistortionCode.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import code from '@content/Backgrounds/GridDistortion/GridDistortion.vue?raw';
|
||||
import type { CodeObject } from '../../../types/code';
|
||||
|
||||
export const gridDistortion: CodeObject = {
|
||||
cli: `npx jsrepo add https://vue-bits.dev/ui/Backgrounds/GridDistortion`,
|
||||
installation: `npm i three`,
|
||||
usage: `<template>
|
||||
<div class="relative w-full h-[600px]">
|
||||
<GridDistortion
|
||||
imageSrc="https://picsum.photos/1920/1080?grayscale"
|
||||
:grid="10"
|
||||
:mouse="0.1"
|
||||
:strength="0.15
|
||||
:relaxation="0.9"
|
||||
className="custom-class"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import GridDistortion from "./GridDistortion.vue";
|
||||
</script>`,
|
||||
code
|
||||
};
|
||||
Reference in New Issue
Block a user