Animated Background

Visually highlights selected items by sliding a background into view when hovered over or clicked.

Installation

npx shadcn-vue@latest add https://raya-ui.com/registry/animated-background.json

Or manually:

npm install motion-v clsx tailwind-merge

More Examples

Card Grid

A grid of cards with a spring hover effect, using a custom layout and transition.

Dialog

Enhances modal presentations.

Popover

For small interactive overlays.

Accordion

Collapsible sections for more content.

Collapsible

Collapsible sections for more content.

Drag to Reorder

Reorder items with drag and drop.

Swipe to Delete

Delete items with swipe gestures.

Props

PropTypeDefaultDescription
itemsany[][]Array of items to render. Each item should have a unique id or value.
v-modelstring | numberundefinedThe active item identifier.
enableHoverbooleanfalseIf true, changes selection on mouse enter instead of click.
layoutIdstringrandomUnique ID for the layout animation group.
transitionTransitionspringCustom motion transition settings.

Source content adapted from Motion Primitives.