mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
@@ -2,7 +2,7 @@ import code from '@content/TextAnimations/ScrollFloat/ScrollFloat.vue?raw'
|
|||||||
import type { CodeObject } from '../../../types/code'
|
import type { CodeObject } from '../../../types/code'
|
||||||
|
|
||||||
export const scrollFloatCode: CodeObject = {
|
export const scrollFloatCode: CodeObject = {
|
||||||
cli: `npx jsrepo add https://vue-bits.dev/ui/Components/ProfileCard`,
|
cli: `npx jsrepo add https://vue-bits.dev/ui/TextAnimations/ScrollFloat`,
|
||||||
usage: `<template>
|
usage: `<template>
|
||||||
<ScrollFloat
|
<ScrollFloat
|
||||||
:children="scrollText"
|
:children="scrollText"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<h2 ref="containerRef" :class="`scroll-float ${containerClassName}`">
|
<h2 ref="containerRef" :class="`overflow-hidden ${containerClassName}`">
|
||||||
<span :class="`scroll-float-text ${textClassName}`">
|
<span :class="`inline-block text-center leading-relaxed font-black ${textClassName}`" style="font-size: clamp(1.6rem, 8vw, 10rem);">
|
||||||
<span
|
<span
|
||||||
v-for="(char, index) in splitText"
|
v-for="(char, index) in splitText"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="char"
|
class="inline-block char"
|
||||||
>
|
>
|
||||||
{{ char === " " ? "\u00A0" : char }}
|
{{ char === " " ? "\u00A0" : char }}
|
||||||
</span>
|
</span>
|
||||||
@@ -121,21 +121,3 @@
|
|||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.scroll-float {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-float-text {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: clamp(1.6rem, 8vw, 10rem);
|
|
||||||
font-weight: 900;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.char {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="profile-card-demo">
|
|
||||||
<TabbedLayout>
|
<TabbedLayout>
|
||||||
<template #preview>
|
<template #preview>
|
||||||
<div
|
<div
|
||||||
@@ -47,7 +46,6 @@
|
|||||||
<CliInstallation :command="scrollFloatCode.cli" />
|
<CliInstallation :command="scrollFloatCode.cli" />
|
||||||
</template>
|
</template>
|
||||||
</TabbedLayout>
|
</TabbedLayout>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
Reference in New Issue
Block a user