Use o slot padrão com o seu conteúdo para criar uma animação de rolagem infinita.
<template>
<NMarquee>
<NIcon name="i-simple-icons-github" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-discord" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-x" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-instagram" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-linkedin" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-facebook" class="size-10 shrink-0" />
</NMarquee>
</template>
Use a prop pause-on-hover para pausar a animação quando o usuário passa o mouse sobre o conteúdo.
<template>
<NMarquee pause-on-hover>
<NIcon name="i-simple-icons-github" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-discord" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-x" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-instagram" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-linkedin" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-facebook" class="size-10 shrink-0" />
</NMarquee>
</template>
Use a prop reverse para inverter a direção da animação.
<template>
<NMarquee reverse>
<NIcon name="i-simple-icons-github" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-discord" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-x" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-instagram" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-linkedin" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-facebook" class="size-10 shrink-0" />
</NMarquee>
</template>
Use a prop orientation para alterar a direção da rolagem.
<template>
<NMarquee orientation="vertical">
<NIcon name="i-simple-icons-github" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-discord" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-x" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-instagram" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-linkedin" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-facebook" class="size-10 shrink-0" />
</NMarquee>
</template>
Use a prop repeat para especificar quantas vezes o conteúdo deve ser repetido na animação.
<template>
<NMarquee :repeat="6">
<NIcon name="i-simple-icons-github" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-discord" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-x" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-instagram" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-linkedin" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-facebook" class="size-10 shrink-0" />
</NMarquee>
</template>
Use a prop overlay para remover as sobreposições de gradiente nas bordas do marquee.
<template>
<NMarquee :overlay="false">
<NIcon name="i-simple-icons-github" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-discord" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-x" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-instagram" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-linkedin" class="size-10 shrink-0" />
<NIcon name="i-simple-icons-facebook" class="size-10 shrink-0" />
</NMarquee>
</template>
Use o componente Marquee para criar uma animação de rolagem infinita para os seus depoimentos.
Anthony Bettini
CEO and founder of VulnCheck
Yaz Jallad
Founder Ninjaparade Digital
Kevin Olson
Founder of Fume.app
Michael Hoffmann
Senior Frontend Developer
Harlan Wilton
Nuxt core team member
Thomas Sanlis
Freelance developer and designer
Benjamin Code
YouTuber and SaaS builder
Estéban Soubiran
Web developer and UnJS member
Anthony Bettini
CEO and founder of VulnCheck
Yaz Jallad
Founder Ninjaparade Digital
Kevin Olson
Founder of Fume.app
Michael Hoffmann
Senior Frontend Developer
Harlan Wilton
Nuxt core team member
Thomas Sanlis
Freelance developer and designer
Benjamin Code
YouTuber and SaaS builder
Estéban Soubiran
Web developer and UnJS member
Anthony Bettini
CEO and founder of VulnCheck
Yaz Jallad
Founder Ninjaparade Digital
Kevin Olson
Founder of Fume.app
Michael Hoffmann
Senior Frontend Developer
Harlan Wilton
Nuxt core team member
Thomas Sanlis
Freelance developer and designer
Benjamin Code
YouTuber and SaaS builder
Estéban Soubiran
Web developer and UnJS member
Anthony Bettini
CEO and founder of VulnCheck
Yaz Jallad
Founder Ninjaparade Digital
Kevin Olson
Founder of Fume.app
Michael Hoffmann
Senior Frontend Developer
Harlan Wilton
Nuxt core team member
Thomas Sanlis
Freelance developer and designer
Benjamin Code
YouTuber and SaaS builder
Estéban Soubiran
Web developer and UnJS member
Anthony Bettini
CEO and founder of VulnCheck
Yaz Jallad
Founder Ninjaparade Digital
Kevin Olson
Founder of Fume.app
Michael Hoffmann
Senior Frontend Developer
Harlan Wilton
Nuxt core team member
Thomas Sanlis
Freelance developer and designer
Benjamin Code
YouTuber and SaaS builder
Estéban Soubiran
Web developer and UnJS member
Anthony Bettini
CEO and founder of VulnCheck
Yaz Jallad
Founder Ninjaparade Digital
Kevin Olson
Founder of Fume.app
Michael Hoffmann
Senior Frontend Developer
Harlan Wilton
Nuxt core team member
Thomas Sanlis
Freelance developer and designer
Benjamin Code
YouTuber and SaaS builder
Estéban Soubiran
Web developer and UnJS member
Anthony Bettini
CEO and founder of VulnCheck
Yaz Jallad
Founder Ninjaparade Digital
Kevin Olson
Founder of Fume.app
Michael Hoffmann
Senior Frontend Developer
Harlan Wilton
Nuxt core team member
Thomas Sanlis
Freelance developer and designer
Benjamin Code
YouTuber and SaaS builder
Estéban Soubiran
Web developer and UnJS member
Anthony Bettini
CEO and founder of VulnCheck
Yaz Jallad
Founder Ninjaparade Digital
Kevin Olson
Founder of Fume.app
Michael Hoffmann
Senior Frontend Developer
Harlan Wilton
Nuxt core team member
Thomas Sanlis
Freelance developer and designer
Benjamin Code
YouTuber and SaaS builder
Estéban Soubiran
Web developer and UnJS member
Use o componente Marquee para criar uma animação de rolagem infinita para as suas capturas de tela.
































| Prop | Default | Type |
|---|---|---|
as | 'div' | anyThe element or component this component should render as. |
pauseOnHover | false | boolean Pause the marquee on hover. |
reverse | false | boolean Reverse the direction of the marquee. |
orientation | 'horizontal' | "vertical" | "horizontal"The orientation of the marquee. |
repeat | 4 | numberThe number of times the marquee should repeat. |
overlay | true | boolean Display an overlay on the marquee. |
ui | { root?: SlotClass; content?: SlotClass; } |
| Slot | Type |
|---|---|
default | {} |
export default defineAppConfig({
ui: {
marquee: {
slots: {
root: 'group relative flex items-center overflow-hidden gap-(--gap) [--gap:--spacing(16)] [--duration:20s]',
content: 'flex items-center shrink-0 justify-around gap-(--gap) min-w-max'
},
variants: {
orientation: {
horizontal: {
content: 'w-full'
},
vertical: {
content: 'h-full'
}
},
pauseOnHover: {
true: {
content: 'group-hover:[animation-play-state:paused]'
}
},
reverse: {
true: {
content: '![animation-direction:reverse]'
}
},
overlay: {
true: {
root: 'before:absolute before:pointer-events-none before:content-[""] before:z-2 before:from-default before:to-transparent after:absolute after:pointer-events-none after:content-[""] after:z-2 after:from-default after:to-transparent'
}
}
},
compoundVariants: [
{
orientation: 'horizontal',
class: {
root: 'flex-row',
content: 'flex-row animate-[marquee_var(--duration)_linear_infinite] rtl:animate-[marquee-rtl_var(--duration)_linear_infinite] backface-hidden'
}
},
{
orientation: 'horizontal',
overlay: true,
class: {
root: 'before:inset-y-0 before:left-0 before:h-full before:w-1/3 before:bg-gradient-to-r after:inset-y-0 after:right-0 after:h-full after:w-1/3 after:bg-gradient-to-l backface-hidden'
}
},
{
orientation: 'vertical',
class: {
root: 'flex-col',
content: 'flex-col animate-[marquee-vertical_var(--duration)_linear_infinite] rtl:animate-[marquee-vertical-rtl_var(--duration)_linear_infinite] h-[fit-content] backface-hidden'
}
},
{
orientation: 'vertical',
overlay: true,
class: {
root: 'before:inset-x-0 before:top-0 before:w-full before:h-1/3 before:bg-gradient-to-b after:inset-x-0 after:bottom-0 after:w-full after:h-1/3 after:bg-gradient-to-t backface-hidden'
}
}
]
}
}
})
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nitro/ui/vite'
export default defineConfig({
plugins: [
vue(),
ui({
ui: {
marquee: {
slots: {
root: 'group relative flex items-center overflow-hidden gap-(--gap) [--gap:--spacing(16)] [--duration:20s]',
content: 'flex items-center shrink-0 justify-around gap-(--gap) min-w-max'
},
variants: {
orientation: {
horizontal: {
content: 'w-full'
},
vertical: {
content: 'h-full'
}
},
pauseOnHover: {
true: {
content: 'group-hover:[animation-play-state:paused]'
}
},
reverse: {
true: {
content: '![animation-direction:reverse]'
}
},
overlay: {
true: {
root: 'before:absolute before:pointer-events-none before:content-[""] before:z-2 before:from-default before:to-transparent after:absolute after:pointer-events-none after:content-[""] after:z-2 after:from-default after:to-transparent'
}
}
},
compoundVariants: [
{
orientation: 'horizontal',
class: {
root: 'flex-row',
content: 'flex-row animate-[marquee_var(--duration)_linear_infinite] rtl:animate-[marquee-rtl_var(--duration)_linear_infinite] backface-hidden'
}
},
{
orientation: 'horizontal',
overlay: true,
class: {
root: 'before:inset-y-0 before:left-0 before:h-full before:w-1/3 before:bg-gradient-to-r after:inset-y-0 after:right-0 after:h-full after:w-1/3 after:bg-gradient-to-l backface-hidden'
}
},
{
orientation: 'vertical',
class: {
root: 'flex-col',
content: 'flex-col animate-[marquee-vertical_var(--duration)_linear_infinite] rtl:animate-[marquee-vertical-rtl_var(--duration)_linear_infinite] h-[fit-content] backface-hidden'
}
},
{
orientation: 'vertical',
overlay: true,
class: {
root: 'before:inset-x-0 before:top-0 before:w-full before:h-1/3 before:bg-gradient-to-b after:inset-x-0 after:bottom-0 after:w-full after:h-1/3 after:bg-gradient-to-t backface-hidden'
}
}
]
}
}
})
]
})