lazysizes
select2
Our great sponsors
lazysizes | select2 | |
---|---|---|
19 | 29 | |
17,297 | 25,768 | |
- | 0.0% | |
0.0 | 2.0 | |
27 days ago | 6 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lazysizes
-
Optimizing Images for Developer Blogs
Use a JavaScript library to implement lazy loading. There are a number of JavaScript libraries available that can help you implement lazy loading, such as Lazysizes and Lozad.
-
Generate thumbhash at edge for tiny progressive images
Normally I would write some client-side JS to do this but as this project is solely server-rendered I opted to use a simple tried-and-true library for this: lazysizes.
-
Tell HN: I was tired of being a perfectionist so I built an app within 24 hours
I recently did some optimizations on my personal website to make the images load “lazily.” In other words it only loads stuff once it hits the viewport. I think that’s what you’re looking for. I tried two techniques:
1. There is an HTML attribute to do just this and it seems to work for iframes too: https://developer.mozilla.org/en-US/docs/Web/Performance/Laz...
2. There is a simple library called “lazy sizes” (https://github.com/aFarkas/lazysizes)
I tried to avoid the lib and use the native HTML… but for whatever reason the lib worked more reliably/effectively in manual tests as well as in my benchmarking via PageSpeed / Lighthouse. YMMV!
-
What unpopular webdev opinions do you have?
lazysizes is better than loading="lazy"
-
Native lazyload images vs other libraries
Since browsers support native lazy-loading, do we need libraries like this https://github.com/aFarkas/lazysizes?
-
Few tips to improve WebPage Performance
Use Lazy loading for below-the-fold images. (You can use different 3rd party libraries like Unveil, lazysizes, etc.)
-
The Ultimate Eleventy Template for your blog with a FREE minimalist theme [Open Source]
⚡️ Lazy load images with lazysizes
-
Best CLS Practices for Images
You can also use this really great library for handling the loading of images in a holistic and well-supported way or you can look at manually implementing the LQIP technique.
-
HTML tips you might not have been aware of
And, lazyloading is only for images. If you use e.g. lazysizes you can do anything with it. I'm a digital publisher so I use it for ads and embedded tweets/IGs and so on.
- LazyLoad not loading all the times the images. Fix or change lazyload mode? Angular project
select2
- Does MVC have a combobox?
-
HTML Web Components
Most people using react aren't building SPAs. Vue/React can be used the same way as jquery, which is to add enhanced UI functionality that server-side HTML views simply can't offer.
The best example is a multi-select box, or a searchable select box with autocomplete (what W3 calls the combobox pattern https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) which in jquery was usually via https://select2.org/
For example, on my company website there's a timezone select box with are 151 options. Asking a user to simply scroll through 100+ to find theirs is annoying vs typing a few characters and hitting enter.
There's many examples of select boxes like that and there really is no static server-side way to solve this problem (I tried hard to think of one)... without creating a multi-page Wizard for what should be a single field on a larger form.
If you're building a SaaS product there are many highly-interactive components that demand JS and there's really no better mainstream solution atm than static-first sites with small "islands" of Vue/React style components (ideally with hydration) where interactivity is required.
People still abuse React/Vue of course, but the trend is 100% moving back to "mostly static" rather than slow SPAs and IMO JS-powered components are not never going away unless browsers start offering these complex components built-in.
-
I add a log database for my Django project what to do ??
I’m a fan of select2 (https://select2.org), it supports loading in data from a foreign source (API)
-
Formset factory for displaying hundreds of records for editing. Is there a better way?
You could use a Select2() for the records which prevent the massive amount of data being transferred.
- search box in select tag
- I am trying to make a minimalistic NHL Stats website. I would really appreciate some feedback!
-
What are the popular PHP Frameworks you are using for the development of web applications and why?
Sometimes I still import it for only one thing : select2 that depends on it. Does anyone have an alternative ? I'd love it
-
Better way of selecting Foreign key objects in django admin form
The traditional solution was to use ModelAdmin.raw_id_fields, a comma-delimited string of IDs in a text input. Many users found the interaction inelegant, and so ModelAdmin.autocomplete_fields with live search integration with Select2 was added in Django 2.0.
- How do you create a category (or select an existing one) from a field value on a page form in MediaWiki?
-
How would i go about displaying more information of objects in a ModelForm?
The module django-extensions has a searchable select box widget. There are others using Select2 as well.
What are some alternatives?
vanilla-lazyload - LazyLoad is a lightweight, flexible script that speeds up your website by deferring the loading of your below-the-fold images, backgrounds, videos, iframes and scripts to when they will enter the viewport. Written in plain "vanilla" JavaScript, it leverages IntersectionObserver, supports responsive images and enables native lazy loading.
selectize.js - Selectize is the hybrid of a textbox and <select> box. It's jQuery based, and it has autocomplete and native-feeling keyboard navigation; useful for tagging, contact lists, etc.
ng-bootstrap - Angular powered Bootstrap
typeahead.js - typeahead.js is a fast and fully-featured autocomplete library
react-lazy-load - React component that renders children elements when they enter the viewport.
Choices.js - A vanilla JS customisable select box/text input plugin ⚡️
Tailwind CSS - A utility-first CSS framework for rapid UI development.
chosen - Deprecated - Chosen is a library for making long, unwieldy select boxes more friendly.
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
bootstrap-select - :rocket: The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more.
PrismJS - Lightweight, robust, elegant syntax highlighting.
jquery multi-select - A user-friendlier drop-in replacement for the standard select with multiple attribute activated.