How to add an attribute:

close icon
Hey! Give us some feedback here.
Functional
NEW
Pro only solution
Pro early access

CMS Attribute

Apply custom attributes with CMS fields. Use with CMS Collection List and Template page.

401,067

loads per month

CMS Attribute
Step #1

Copy the Solution <script> and paste into the <head> of your page

copy icon
Copy Script
Step #2

Implement in Webflow

Apply attributes to elements on the page

Below is a list of elements and options that are used to create this Attributes functionality. Click any of them to see more details.

Option 1: Static "name"

Most common and recommended implementation approach. Usually custom attribute "name" does not need to be dynamic. Option 1 is a more simple setup which keeps "name" outside of Webflow CMS dynamic fields.

navigator arrow
Target
I want this
div block icon

[All Webflow elements accepted]

to have a CMS generated custom attribute.
See how it works
see webflow attributes
Add this attribute
Description
Name
fs-cmsattribute-target
copy icon
Value
ATTRIBUTE_NAME
copy icon
The element that will receive the custom attribute.

For example, if we want to add the custom CMS attribute to an image, this attribute would be placed on that image.

For example, if we want to set the attribute slide-dots = 3 on a slider dots wrapper, we would set fs-cmsattribute-target = slide-dots on the slider dots wrapper.
navigator arrow
Value
I want this

Text Block, Heading, Paragraph

to be the value of the attribute.
See how it works
see webflow attributes
Add this attribute
Description
Name
fs-cmsattribute-value
copy icon
Value
ATTRIBUTE_NAME
copy icon
Placed on a text element. Sets the value of the custom attribute.

This text element holds the value that we want to use for the custom attribute

For example, if we want to set the attribute slide-dots = 3 on a slider docs wrapper, we would set fs-cmsattribute-target = slide-dots on a text element that has a plain-text value of 3.

Option 2: CMS dynamic "name"

In the event we need to dynamically control the custom attribute "name", we can use Option 2. This requires one additional step to make the "name" value dynamic and managed by Webflow CMS fields.

In the example below, we use the IDENTIFIER "slide-dots-match" to make a relationship between the target, name, and value.

navigator arrow
Target
I want this
div block icon

[All Webflow elements accepted]

to have a CMS generated custom attribute.
See how it works
see webflow attributes
Add this attribute
Description
Name
fs-cmsattribute-target
copy icon
Value
IDENTIFIER
copy icon
The element that will receive the custom attribute.

For example, if we want to add the custom CMS attribute to an image, this attribute would be placed on that image.

For example, if we want to set the attribute slide-dots = 3 on a slider docs wrapper, we can set fs-cmsattribute-target = slide-dots-match on the slider dots wrapper.
navigator arrow
Name
I want this

Text Block, Heading, Paragraph

to be the name of the attribute.
See how it works
see webflow attributes
Add this attribute
Description
Name
fs-cmsattribute-name
copy icon
Value
IDENTIFIER
copy icon
Placed on a text element. Sets the name of the custom attribute.

This text element holds the name that we want to use for the custom attribute

Custom attributes follow this structure: name = value

For example, if we want to set the attribute slide-dots = 3 on a slider docs wrapper, we can set fs-cmsattribute-name = slide-dots-match on a text element that has a plain-text value of slide-dots.
navigator arrow
Value
I want this

Text Block, Heading, Paragraph

to be the value of the attribute.
See how it works
see webflow attributes
Add this attribute
Description
Name
fs-cmsattribute-value
copy icon
Value
IDENTIFIER
copy icon
Placed on a text element. Sets the value of the custom attribute.

This text element holds the value that we want to use for the custom attribute

For example, if we want to set the attribute slide-dots = 3 on a slider docs wrapper, we would set fs-cmsattribute-value = slide-dots on a text element that has a plain-text value of 3.
Note — CMS Attribute can not be used to apply CMS Load attributes

This works: CMS Attribute works with CMS Load. We can use these two solutions together. For example, we can have a CMS List with CMS Load applied + CMS Attribute applied to items in the list.

This does not work: We can not apply any CMS Load attributes via this CMS Attributes solution. For example, we can not apply fs-cmsload-mode = pagination through this CMS Attribute solution.

Working examples

See this solution working live in this Webflow project.

Example 1
Example
Copy and paste this example directly on Webflow
locked icon
Coming soon

Developer documentation

external link icon

Next time implement inside Webflow

external link icon
Subscribe

Sign up for future releases!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.