Skip to content
On this page

ZvImg

ZvImg is a standalone component

INFO

Before you have to import the global css files in your project, follow instructions in Getting Started

Prerequisites

blurhash
bash
npm install blurhash@2

Basic usage

lilly city
vue
<template>
  <ZvImg
    src="https://i0.wp.com/lessortiesdunelilloise.fr/wp-content/uploads/2020/07/grand-place-lille-scaled.jpg?resize=1140%2C855&ssl=1"
  />
</template>

<script lang="ts" setup>
  import ZvImg from '@zadigetvoltaire/ui/components/ZvImg'
</script>

With blur hash placeholder

lilly city
html
<ZvImg
  src="https://i0.wp.com/lessortiesdunelilloise.fr/wp-content/uploads/2020/07/grand-place-lille-scaled.jpg?resize=1140%2C855&ssl=1"
  alt="lilly city"
  hash="|SHU%tNH9a-oNGayjYWBt6~qogM{oft6Rjoeaya}9cM{s-a$t6R*f6t6R+D%IrSiobayWXf6t7WC-nR.R-t5M|j[j[ofj?jEt6xtRkRkofjaj?oeIUoJxZRkflf6a{j[j?RjWEf6ocW=oeayayoLS%W=Rjt6t6jYWDjZay"
  :width="1140"
  :height="855"
/>