npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@teamnovu/vue-responsive-image

v0.0.1

Published

Make every Image Responsive to Shrink your Bundle Size

Downloads

21

Readme

vue-responsive-image

npm version License

Make every Image Responsive to Shrink your Bundle Size

📖 Release Notes

Intro

DEMO

Vue Responsive Image helps you in making every image on your website responsive. Inspired by tailwindcss breakpoints it always scales the image down to fit the current breakpoint but still leaves you the flexibility to scale it down even further.

Requirements

Nothing, just go for it.

Setup

  1. Add @teamnovu/vue-responsive-image as a dependency to your project
yarn add @teamnovu/vue-responsive-image

# or npm install @teamnovu/vue-responsive-image
  1. Add the following code to your main.js
import ResponsiveImage from '@teamnovu/vue-responsive-image'

Vue.component('ResponsiveImage', ResponsiveImage)

Usage

Just use the <ResponsiveImage /> component where you would have a normal <img /> tag and pass in the props as follows.

<ResponsiveImage
  src="https://source.unsplash.com/random/{w}x1000"
  :screens="{
    xs: '360px',
    sm: '640px',
    md: '768px',
    lg: '1024px',
    xl: '1280px'
  }"
  :max-width="3000"
  sizes="w-90vw md:w-60vw xl:w-50vw"
/>

Available Props

| Option | Type | Default | Options | Description | |------------ |---------- |------------------------------------------------------------ |------------------------------------ |-------------------------------------------------------------------------------- | | src | String | none | width: {w} | The source to be used for the image with {w} where the width should go. | | maxWidth | Number | 2560 | Any Number | The maximum width used to calculate the image width on the biggest breakpoint. | | screens | Object | { sm: '640px', md: '768px', lg: '1024px', xl: '1280px' } | An key pixel value pairs | The breakpoints to be used. | | sizes | String | 100vw for each breakpoint | Any vw value for each breakpoint | Viewport-width to further shrink image on each breakpoint. |

Development

  1. Clone this repository
  2. Install dependencies using yarn install
  3. Start development server using yarn dev

Release

  1. yarn release
  2. npm publish

Features Planned

  • [ ] Image Ratio
  • [ ] Breakpoints from tailwindcss config

License

MIT License

Copyright (c) teamnovu