8000 How to use the Rendering only visible icons feature of the Iconify web component? · Issue #397 · nuxt/icon · GitHub
[go: up one dir, main page]

Skip to content

How to use the Rendering only visible icons feature of the Iconify web component? #397

Open

Description

@DAOLOGE

Hello, how do I use the Rendering only visible icons feature of the Iconify web component? I'm using animated icons and want the animation to restart each time they enter the viewport
https://iconify.design/docs/iconify-icon/#rendering-only-visible-icons

Activity

  1. cyberalien commented on May 19, 2025

    @cyberalien

    Nuxt Icon uses Vue component, which doesn't have that function.

    What you can do is create a wrapper. Use IntersectionObserver to check if icon is visible, render it if visible, render placeholder (you need to render something to attach observer to) if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0