Paste before </body> tag of the page you're working with.
The variable we created to store our Library instance. The name of the variable can be set to whatever you want.
The class of the button that will be used to filter items. Clicking this button triggers the sort on your list.
Option to make the initial sort click reversed.
true = sort Z > A on first click
false = sort A > Z on first click
If your list is already sorted from A > Z and sortReverse is false, nothing will happen on the first click.
The class that will be added to buttons when they are in an active state.
Option to add animations and transitions for items leaving and entering the filtered grid.
~true~ turns on animation on, ~false~ turns animation off (default: ~true~).
Time the animation happens in seconds. ~0.2~ would be 0.2 seconds, or 200 milliseconds (default: ~0.2~).
Easing of the effect. Available options are ~ease~, ~ease-in~, ~ease-out~, and ~ease-in-out~ (default: ~ease~).
Add ~fade~, ~translate~, ~rotate~, and ~scale~ effects (default: ~fade~).
The data-attribute placed on the ui element to tell the Library what to sort by when that ui element is clicked.
We need to tell the Library what button is triggering the sort and what it should sort by.
~Name~ is always ~sort-by~.
~Value~ is the class of the text that button will filter by.
If you are filtering by the year, give a class of ~.year-text~ to the text element.