Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-image-gallery

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-image-gallery

A Masonry-Like Image Container for Svelte

  • 1.8.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
104
decreased by-4.59%
Maintainers
0
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 16 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc