Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholder slot for <NuxtImg> #1307

Open
DamianGlowala opened this issue Mar 30, 2024 · 5 comments · May be fixed by #1626
Open

Placeholder slot for <NuxtImg> #1307

DamianGlowala opened this issue Mar 30, 2024 · 5 comments · May be fixed by #1626
Labels
enhancement New feature or request pending

Comments

@DamianGlowala
Copy link
Member

DamianGlowala commented Mar 30, 2024

I've been thinking of how to achieve more sophisticated placeholders using <NuxtImg> than what the placeholder prop allows for. Being able to define the placeholder in a slot would allow for greater flexibility:

<NuxtImg>
  <template #placeholder>
    <SkeletonLoader />
  </template>
</NuxtImg>

If this is a desirable addition, I am willing to implement it.

@damevin
Copy link

damevin commented Jul 14, 2024

That would be great, dealing with placeholder could be improved !!

@KingSit3
Copy link

yes please 😀

@Baroshem
Copy link
Collaborator

Baroshem commented Dec 9, 2024

@DamianGlowala I think this is an awesome idea! Please if you have time, create a PR with the implementation proposal :)

@Baroshem Baroshem added enhancement New feature or request pending labels Dec 9, 2024
@danekslama danekslama linked a pull request Dec 10, 2024 that will close this issue
6 tasks
@danekslama
Copy link

I made a PR, but there are some tests failing. Can you check it please @DamianGlowala? This is officially my first contribution so I will be happy if someone checks it out.

@danekslama
Copy link

danekslama commented Dec 13, 2024

@Baroshem I have fixed the tests, added examples, and addressed your suggestions. Everything seems to be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants