Filterable
Enable
Filterable grid powered by Shuffle.js. Items animate smoothly when filtered by category.
functions.php
JS module
main.scss
SCSS import
Structure
Three required parts: a .filterable wrapper, a .filterable-nav with filter buttons, and a .filterable-grid containing items.
.filterable
Element Role
.filterable Root wrapper — auto-detected by JS
.filterable-nav Contains filter buttons
[data-filter] Button attribute — category name or * for all
.filterable-grid Grid container — positioned by Shuffle.js
.filterable-item Grid item — positioned & animated
[data-categories] Item attribute — comma-separated category list
Live Demo
Click a filter button to see items shuffle.
.filterable
Interactive
Design
Development
Marketing
Design + Dev
Marketing
Design
Multiple Categories
An item can belong to multiple categories. Separate them with commas in data-categories.
data-categories
Multi-group cumulative filtering
Combine multiple filter dimensions (e.g. type AND category). Each .filterable-nav declares its own data-filter-group="name"; items are filtered by the AND of all active groups.
data-filter-group
Per-nav attribute
Behavior Effect
No group attr Default group is categories (backward compat with existing single-nav usage)
data-filter-group="types" Nav controls the types group; items declare membership via data-types
Multiple navs Each group tracks its active filter independently; result = AND across all groups
data-filter="*" "All" for that group — group is ignored in the AND
Configuration
Shuffle.js defaults — no data attributes needed on the wrapper.
Defaults
Option Value Description
itemSelector .filterable-item Selector for grid items
speed 400 Animation duration in ms
easing ease CSS transition easing
On this page