1.7.1 • Published 7 months ago

svelte-image-gallery v1.7.1

Weekly downloads
53
License
ISC
Repository
github
Last release
7 months ago

svelte-image-gallery

MadeWithSvelte.com shield

A Masonry-Like Image Container for Svelte

See On REPL

Traditionalsvelte-image-gallery
traditionalsvelte-image-gallery
Made responsive via media queries or minmax/autofitResponsive out of the box

Installation

npm install --save-dev svelte-image-gallery

Usage

<script>
	import Gallery from 'svelte-image-gallery'

	function handleClick(e) {
		console.log(e.detail.src)
	}
</script>

<Gallery on:click={handleClick}>
	<img src="..." />
	<img src="..." />
	...
</Gallery>

Running Locally

  • Clone the repository
  • Open example folder in terminal
  • Run npm i, then npm run dev

Parameters

ParameterDefaultDescriptionUnit
gap10Grid Gap Between Itemspx
maxColumnWidth250Maximum Column Widthpx
hoverfalseEnlarge Image on Hoverbool
loadingeagerImage Loading Typemdn

To access the image url on click, use the on:click directive in the Gallery component.

Created By Berkin AKKAYA

1.7.1

7 months ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago