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

docs: fix inconsistent spelling #1421

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/content/2.usage/1.nuxt-img.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ The placeholder prop can be either a string, a boolean, a number, or an array. T

```html
<!-- Automatically generate a placeholder based on the original image -->
<nuxt-img src="/nuxt.png" placeholder />
<NuxtImg src="/nuxt.png" placeholder />

<!-- Set a width, height for the automatically generated placeholder -->
<nuxt-img src="/nuxt.png" :placeholder="[50, 25]" />
<NuxtImg src="/nuxt.png" :placeholder="[50, 25]" />

<!-- Set a width, height, quality & blur for the automatically generated placeholder -->
<nuxt-img src="/nuxt.png" :placeholder="[50, 25, 75, 5]" />
<NuxtImg src="/nuxt.png" :placeholder="[50, 25, 75, 5]" />

<!-- Set the width & height of the automatically generated placeholder, image will be a square -->
<nuxt-img src="/nuxt.png" :placeholder="15" />
<NuxtImg src="/nuxt.png" :placeholder="15" />

<!-- Provide your own image -->
<nuxt-img src="/nuxt.png" placeholder="./placeholder.png" />
<NuxtImg src="/nuxt.png" placeholder="./placeholder.png" />
```

You can also leverage [`useImage()`](/usage/use-image) to generate a placeholder image based on the original image, can be useful if the source is an SVG or you want better control on the modifiers:
Expand All @@ -137,10 +137,10 @@ When using a placeholder, you can use `placeholder-class` to apply a class to th

```html
<!-- Apply a static class to the original image -->
<nuxt-img src="/nuxt.png" placeholder placeholder-class="custom" />
<NuxtImg src="/nuxt.png" placeholder placeholder-class="custom" />

<!-- Apply a dynamic class to the original image -->
<nuxt-img src="/nuxt.png" placeholder :placeholder-class="custom" />
<NuxtImg src="/nuxt.png" placeholder :placeholder-class="custom" />
```

::callout
Expand Down