Different Gradient for Every CMS Item? Here’s the Fix.

CMS

“When Webflow CMS doesn’t have a ‘direct’ solution…”

totally normal.

Every migration exposes a challenge that requires a smarter approach.

recently, we moved a client’s site into Webflow.

product CMS. 5-10 items. same layout structure on every page.

but there was a twist:

the gradient background had to be different for each product.

- same structure.
- different visual identity.

and Webflow CMS doesn’t have a built-in “dynamic gradient” option ❗

so you have two choices:

hardcode each one → messy.

use conditional visibility → unnecessary complexity.

or…

use the CMS creatively.

here’s what we did:

- added a plain text field in the collection → “Gradient Color”

- stored the full CSS gradient value per item.
for example: background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

- Added a custom element (div or section) on the CMS Template page.

- Connected the CMS field to the div or section style attribute:
style="{Gradient Color}"

Now, when the page is rendered, the div automatically gets the inline style in the source code, for example:

<div style="background-image: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);">...</div>

Results:
- same layout.
- no extra conditions.
- no duplicate sections.
- fully scalable.

it’s one of those solutions that feels obvious after you see it.

webflow isn’t limited.

sometimes you just need to think in systems instead of settings.

- small tweak.
- clean structure.

Have you implemented something similar, or do you follow a different approach?

1
1 reply
02/17/2026
Open Discussion