All Projects → patrickkunka → Mixitup

patrickkunka / Mixitup

A high-performance, dependency-free library for animated filtering, sorting, insertion, removal and more

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to Mixitup

Muuri
Infinite responsive, sortable, filterable and draggable layouts
Stars: ✭ 9,797 (+121.1%)
Mutual labels:  sort, filter
Shuffle
Categorize, sort, and filter a responsive grid of items
Stars: ✭ 2,170 (-51.03%)
Mutual labels:  sort, filter
Faltu
Search sort, filter, limit an array of objects in Mongo-style.
Stars: ✭ 112 (-97.47%)
Mutual labels:  sort, filter
Sieve
⚗️ Clean & extensible Sorting, Filtering, and Pagination for ASP.NET Core
Stars: ✭ 560 (-87.36%)
Mutual labels:  sort, filter
express-mquery
Expose mongoose query API through HTTP request.
Stars: ✭ 37 (-99.16%)
Mutual labels:  filter, sort
Queryql
Easily add filtering, sorting, and pagination to your Node.js REST API through your old friend: the query string!
Stars: ✭ 76 (-98.28%)
Mutual labels:  sort, filter
Laravel Api Handler
Package providing helper functions for a Laravel REST-API
Stars: ✭ 150 (-96.61%)
Mutual labels:  sort, filter
Twig Lambda
Lambda expressions for Twig and filters that make use of them
Stars: ✭ 40 (-99.1%)
Mutual labels:  sort, filter
spring-boot-jpa-rest-demo-filter-paging-sorting
Spring Boot Data JPA with Filter, Pagination and Sorting
Stars: ✭ 70 (-98.42%)
Mutual labels:  filter, sort
repository
[PHP 7] Implementation and definition of a base Repository in Domain land.
Stars: ✭ 26 (-99.41%)
Mutual labels:  filter, sort
Filterizr
✨ Filterizr is a JavaScript library that sorts, shuffles and filters responsive galleries using CSS3 transitions ✨
Stars: ✭ 546 (-87.68%)
Mutual labels:  sort, filter
Graphql To Mongodb
Allows for generic run-time generation of filter types for existing graphql types and parsing client requests to mongodb find queries
Stars: ✭ 261 (-94.11%)
Mutual labels:  sort, filter
Ng2 Smart Table
Angular Smart Data Table component
Stars: ✭ 1,590 (-64.12%)
Mutual labels:  sort, filter
Sortfilterproxymodel
A nicely exposed QSortFilterProxyModel for QML
Stars: ✭ 214 (-95.17%)
Mutual labels:  sort, filter
Jschema
A simple, easy to use data modeling framework for JavaScript
Stars: ✭ 261 (-94.11%)
Mutual labels:  sort, filter
Gridjs
Advanced table plugin
Stars: ✭ 3,231 (-27.08%)
Mutual labels:  sort, filter
Tabulator
Interactive Tables and Data Grids for JavaScript
Stars: ✭ 4,329 (-2.3%)
Mutual labels:  sort
Tabby
Lightweight, accessible vanilla JS toggle tabs.
Stars: ✭ 449 (-89.87%)
Mutual labels:  vanilla-js
Tui.image Editor
🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
Stars: ✭ 4,761 (+7.45%)
Mutual labels:  filter
Gpuvideo Android
This library apply video filter on generate an Mp4 and on ExoPlayer video and Video Recording with Camera2.
Stars: ✭ 403 (-90.9%)
Mutual labels:  filter

MixItUp 3

Build Status Coverage Status jsDelivr Hits

MixItUp is a high-performance, dependency-free library for animated DOM manipulation, giving you the power to filter, sort, add and remove DOM elements with beautiful animations.

MixItUp plays nice with your existing HTML and CSS, making it a great choice for responsive layouts and compatible with inline-flow, percentages, media queries, flexbox and more.

For a live sandbox, full documentation, tutorials and more, please visit kunkalabs.com/mixitup.

Migrating from MixItUp 2? Check out the MixItUp 3 Migration Guide.

Licensing

MixItUp is open source and free to use for non-commercial, educational and non-profit use. For use in commercial projects, a commercial license is required. For licensing information and FAQs please see the MixItUp Licenses page.

Documentation

Browser Support

MixItUp 3 has been tested for compatibility with the following browsers.

  • Chrome 16+
  • Firefox 16+
  • Safari 6.2+
  • Yandex 14+
  • Edge 13+
  • IE 10+ (with animations), IE 8-9 (no animations)

Getting Started

Contents

Most commonly, MixItUp is applied to a "container" of "target" elements, which could be a portfolio of projects, a list of blog posts, a selection of products, or any kind of UI where filtering and/or sorting would be advantageous.

To get started, follow these simple steps:

Building the Container

By default, MixItUp will query the container for targets matching the selector '.mix'.

<div class="container">
    <div class="mix category-a" data-order="1"></div>
    <div class="mix category-b" data-order="2"></div>
    <div class="mix category-b category-c" data-order="3"></div>
    <div class="mix category-a category-d" data-order="4"></div>
</div>

Targets can be filtered using any valid selector e.g. '.category-a', and are sorted via optional custom data attributes e.g. 'data-order'.

Further reading: Marking-up MixItUp Containers

Building Controls

One way that filtering and sorting happens is when controls are clicked. You may use any clickable element as a control, but <button type="button"> is recommended for accessibility.

Filter Controls

Filter controls are queried based on the presence of a data-filter attribute, whose value must be 'all', 'none', or a valid selector string e.g. '.category-a'.

<button type="button" data-filter="all">All</button>
<button type="button" data-filter=".category-a">Category A</button>
<button type="button" data-filter=".category-b">Category B</button>
<button type="button" data-filter=".category-c">Category C</button>

Further reading: Filtering with MixItUp

Sort Controls

Sort controls are queried based on the presence of a data-sort attribute, whose value takes the form of a "sort string" made up of the name of the attribute to sort by, followed by an optional colon-separated sorting order e.g. 'order', 'order:asc', 'order:desc'.

<button type="button" data-sort="order:asc">Ascending</button>
<button type="button" data-sort="order:descending">Descending</button>
<button type="button" data-sort="random">Random</button>

The values 'default' and 'random' are also valid, with 'default' referring to the original order of target elements in the DOM at the time of mixer instantiation.

Further reading: Sorting with MixItUp

Styling the Container

While MixItUp can be added on top of any existing CSS layout, we strongly recommend inline-block or flexbox-based styling over floats and legacy grid frameworks when dealing with grid-based designs for a number of reasons.

Further reading: MixItUp Grid Layouts

Loading MixItUp

Firstly, load the MixItUp JavaScript library using the preferred method for your project.

Script Tag

The most simple way to load MixItUp in your project is to include it via a <script> tag before the closing </body> tag on your page.

        ...

        <script src="/path/to/mixitup.min.js"></script>
    </body>
</html>

With this technique, the MixItUp factory function will be made available via the global variable mixitup.

Module Import

If you are building a modular JavaScript project with Webpack, Browserify, or RequireJS, MixItUp can be installed using your package manager of choice (e.g. npm, jspm, yarn) and then imported into any of your project's modules.

npm install mixitup --save

// ES2015

import mixitup from 'mixitup';
// CommonJS

var mixitup = require('mixitup');
// AMD

require(['mixitup'], function(mixitup) {

});

Creating a Mixer

With the mixitup() factory function available, you may now instantiate a "mixer" on your container to enable MixItUp functionality.

Call the factory function passing a selector string or a reference to your container element as the first parameter, and a the newly instantiated mixer will be returned.

Example: Instantiating a mixer with a selector string
var mixer = mixitup('.container');
Example: Instantiating a mixer with an element reference
var mixer = mixitup(containerEl);

Your mixer is now ready for you to interact with, either via its controls (see above), or its API (see Mixer API Methods). Click a control or call an API method to check that everything is working correctly.

Configuration

If you wish to customize the functionality of your mixer, an optional "configuration object" can be passed as the second parameter to the mixitup function. If no configuration object is passed, the default settings will be used.

Further reading: Configuration Object

Example: Passing a configuration object
var mixer = mixitup(containerEl, {
    selectors: {
        target: '.blog-item'
    },
    animation: {
        duration: 300
    }
});

Using the API

If you wish to interact with your mixer via its API, the mixer reference returned by the factory function can be used to call API methods.

Example: Calling an API method
var mixer = mixitup(containerEl);

mixer.filter('.category-a');

Further reading: Mixer API Methods

Building a modern JavaScript application?

You may wish to use MixItUp 3's new "dataset" API. Dataset is designed for use in API-driven JavaScript applications, and can be used instead of DOM-based methods such as .filter(), .sort(), .insert(), etc. When used, insertion, removal, sorting and pagination can be achieved purely via changes to your data model, without the uglyness of having to interact with or query the DOM directly.

Further reading: Using the Dataset API

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].