2.4.10 • Published 5 months ago

@finsweet/attributes v2.4.10

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

npm Hits License

What is Attributes?

Attributes is an open source JavaScript library of solutions for adding filters, sort, load & search options, CMS tabs & sliders —and more— to Webflow using simple HTML attributes.

Getting Started

Please follow the documentation at finsweet.com/attributes to learn how to use Attributes in your Webflow projects.

API Reference

Attributes will inject a global window.FinsweetAttributes object into your project that contains some methods to interact with the library.

To ensure that the library is loaded before you try to access the window.FinsweetAttributes object, you can use the following instantiation code:

window.FinsweetAttributes ||= [];
window.FinsweetAttributes.push([
  'ATTRIBUTE_KEY', // 'list', 'copyclip', 'modal', etc.
  (result) => {
    // Your code goes here.
  },
]);

The result object will contain the API of the loaded attribute solution. Check the README.md file of each attribute solution for more information on the API.

The FinsweetAttributes object

Properties

PropertyTypeDescription
processSetContains the currently active Attribute solutions.
modulesObjectContains the controls for the active Attribute solutions (FinsweetAttributeControls).

Methods

MethodDescriptionArguments
push([key, callback])Run a callback after an Attribute has loaded.key (string): The Attribute key.callback (function): The callback function.
load(key)Dynamically load an Attribute solution.key (string): The Attribute key.
destroy()Destroys the instance and all Attribute solutions.

The FinsweetAttributeControls object

Properties

PropertyTypeDescription
versionstringThe version of the Attribute.
loadingPromiseA promise that resolves once the Attribute has loaded and returns its API.

Methods

MethodDescriptionArguments
restart()Restarts the Attribute. In practice, this means that the Attribute will be destroyed and loaded again.
destroy()Destroys the Attribute.
2.3.0

6 months ago

2.2.1

6 months ago

2.2.0

6 months ago

2.4.1

5 months ago

2.3.2

6 months ago

2.2.3

6 months ago

2.4.0

5 months ago

2.3.1

6 months ago

2.2.2

6 months ago

2.4.3

5 months ago

2.3.4

6 months ago

2.2.5

6 months ago

2.4.2

5 months ago

2.3.3

6 months ago

2.2.4

6 months ago

2.4.5

5 months ago

2.3.6

5 months ago

2.2.7

6 months ago

2.4.4

5 months ago

2.3.5

5 months ago

2.2.6

6 months ago

2.4.10

5 months ago

2.1.0

6 months ago

2.4.7

5 months ago

2.2.9

6 months ago

2.4.6

5 months ago

2.2.8

6 months ago

2.4.9

5 months ago

2.4.8

5 months ago

2.0.5

1 year ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

0.0.0

2 years ago