Wessi
Wessi

Reputation: 1822

Flowbite-Svelte: Set height of image

<script>
  import { Img } from 'flowbite-svelte';
</script>

<Img src={image_url} alt="Listing" class="rounded-lg"/>

How do I define the height of the image? I have tried <Img src={image_url} alt="Listing" size="h-10" class="rounded-lg"/> but it had no effect.

Upvotes: 2

Views: 1176

Answers (2)

Naren
Naren

Reputation: 4480

Per docs, you can use imgClass to add styles to Image.

imgClass="h-auto"

<Img src={image_url} alt="Listing" class="rounded-lg" imgClass="h-10"/>

Upvotes: 4

Johan
Johan

Reputation: 2962

You can use class attribute : <Img src={image_url} alt="Listing" class="rounded-lg h-10" />

Upvotes: 0

Related Questions