Create gradient text in Webflow using the native Clip to Text option under Style Panel > Backgrounds. Add a linear or radial gradient background to your text element, then set the Clipping dropdown to 'Clip to Text' — no custom code needed. This works on any text element and renders in Designer preview immediately.
How to Create Gradient Text Effects in Webflow
Webflow's native 'Clip to Text' feature lets you fill any text element with a gradient — no CSS code required. The technique uses CSS background-clip: text under the hood, but Webflow exposes it visually through the Backgrounds section of the Style Panel. You'll set a gradient as the background of a text element, then clip it to only show through the letterforms. This tutorial also covers animated gradient text using Interactions.
Prerequisites
- A Webflow project open in the Designer
- A Heading or Text Block element added to your canvas
- Basic familiarity with the Style Panel (S)
Step-by-step guide
Add a text element and assign a class
Add a text element and assign a class
Click the Add Elements panel (A) and drag a Heading element onto your canvas. With the heading selected, click the Selector field at the top of the Style Panel (S) and type a class name such as 'gradient-heading'. Press Enter to apply the class. Naming the class is important because the gradient is applied to the class — making it reusable across multiple headings.
Expected result: A heading element sits on the canvas with your custom class applied and visible in the Selector field.
Set the text color to transparent
Set the text color to transparent
In the Style Panel, scroll to the Typography section. Click the Font Color swatch and set the color to fully transparent (alpha 0). This is the key step that many people miss — if a solid font color is still active, it will sit on top of the gradient and hide it. Setting the font color to transparent ensures the background gradient shows through.
Expected result: Your heading text becomes invisible on the canvas because the font color is now transparent.
Add a gradient background to the text element
Add a gradient background to the text element
Still in the Style Panel, scroll to the Backgrounds section. Click the '+' icon to add a new background layer. In the dropdown that appears, select 'Gradient'. A gradient editor appears with two default color stops. Click each stop to change its color — for example, set the left stop to a deep purple (#7B2FF7) and the right stop to a vivid pink (#F72F7B). Use the angle input to adjust the gradient direction (0° = vertical, 90° = horizontal, 135° = diagonal).
Expected result: A gradient background appears behind your transparent text — but the text may not yet show the gradient.
Set the Clipping dropdown to Clip to Text
Set the Clipping dropdown to Clip to Text
In the Backgrounds section of the Style Panel, find the Clipping dropdown directly below the background layer you just added. It defaults to 'None'. Click it and select 'Clip to Text'. This applies the CSS background-clip: text property, which restricts the background gradient to only render within the letterforms of your text element.
Expected result: Your heading text now displays the gradient colors filling each letter. The rest of the gradient outside the text letterforms is hidden.
Refine the gradient for visual impact
Refine the gradient for visual impact
Select the gradient background layer and experiment with the settings. Change the gradient type from Linear to Radial for a sunburst effect. Drag the color stop handles along the gradient bar to shift where colors transition. Adjust the angle to align the gradient with your design layout. Increase the opacity of individual color stops to create more vibrant effects by clicking each stop and checking the 'A' (alpha) value in the color picker.
Expected result: The gradient text looks polished and visually distinct from solid-colored headings.
Make the gradient responsive across breakpoints
Make the gradient responsive across breakpoints
Click the Tablet breakpoint in the top bar (or use the breakpoint bar above the canvas). If your heading has a different font size on mobile, the gradient will naturally scale with it — no changes needed. However, if you want a different gradient angle or color scheme on mobile, you can override the background values at each breakpoint independently. Switch to Mobile Portrait breakpoint and adjust only what needs to change.
Expected result: Gradient text looks sharp at all breakpoints with minimal or no breakpoint-specific adjustments.
Optionally animate the gradient with a looping Interaction
Optionally animate the gradient with a looping Interaction
To create a flowing animated gradient, add a sibling or child element with a wider gradient background and use a CSS animation via a Page Settings > Before </body> Code injection. Alternatively, in the Interactions panel (H), create a Page Load trigger, set it to Loop, and animate the background-position using a Move X action on the container. For maximum browser compatibility, inject this CSS in Page Settings > Head Code: <style>.gradient-heading { background-size: 200% auto; animation: gradientShift 3s linear infinite; } @keyframes gradientShift { to { background-position: 200% center; } }</style>
1<style>2.gradient-heading {3 background-size: 200% auto;4 animation: gradientShift 3s linear infinite;5}6@keyframes gradientShift {7 to {8 background-position: 200% center;9 }10}11</style>Expected result: The gradient smoothly shifts color in a continuous loop, giving the heading a dynamic, premium appearance.
Complete working example
1GRADIENT TEXT — VISUAL STEPS SUMMARY231. Add Heading element to canvas42. Assign class 'gradient-heading' in Selector field53. Style Panel > Typography > Font Color > Set alpha to 0 (transparent)64. Style Panel > Backgrounds > '+' > Gradient75. Set color stops (e.g., purple #7B2FF7 → pink #F72F7B), adjust angle86. Style Panel > Backgrounds > Clipping dropdown > 'Clip to Text'97. (Optional) Adjust gradient stops, type (linear/radial), angle108. (Optional animation) Page Settings > Head Code > inject @keyframes CSS above1112NO custom code required for the basic gradient text effect.13Custom code only needed for animated/moving gradients.Common mistakes
Why it's a problem: The gradient background shows as a rectangle behind the text, not inside the letters
How to avoid: You forgot to set the Clipping dropdown to 'Clip to Text'. In the Style Panel > Backgrounds section, find the Clipping dropdown under your gradient layer and select 'Clip to Text'.
Why it's a problem: The text is completely invisible even after applying Clip to Text
How to avoid: Your font color may be set to a non-transparent color that has overridden the gradient display. Go to Style Panel > Typography > Font Color and set it to transparent (alpha 0). Then verify the Backgrounds > Clipping is still set to 'Clip to Text'.
Why it's a problem: The gradient shows on Desktop but disappears on mobile breakpoints
How to avoid: Another breakpoint may have a reset applied. Click into the Tablet or Mobile breakpoint, select your heading, and check the Backgrounds section. If you see a blue dot (local override), it means a breakpoint-specific style is overriding the Desktop gradient. Delete the override at that breakpoint.
Why it's a problem: The Clipping dropdown is not visible in the Backgrounds section
How to avoid: The Clipping dropdown only appears after a background layer has been added. Make sure you've clicked '+' in the Backgrounds section and selected Gradient (or any other background type) first. The Clipping option sits below the layer controls.
Best practices
- Always name your gradient text class (e.g., 'gradient-heading-purple') so it's reusable across pages without reapplying styles.
- Set the font color to transparent (alpha 0) before adding the background gradient to prevent color conflicts.
- Use 3-stop gradients (e.g., purple → blue → pink) for richer, more modern effects than 2-stop gradients.
- Test your gradient text at multiple font sizes — very thin fonts (100–300 weight) make gradients hard to see; use 600–900 weight for best visibility.
- Keep the gradient consistent with your brand's color palette by using Webflow Variables for the gradient stop colors.
- If using Clip to Text on a CMS-connected heading, bind the gradient class via conditional visibility — you cannot bind gradient colors to CMS fields directly.
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I'm building a website in Webflow and want to create gradient text on my headings. I've added a gradient background to the text element in the Style Panel, but the gradient shows as a block behind the text, not inside the letters. What am I missing? Where exactly in Webflow's Style Panel do I find the option to clip the background to the text letterforms?
Make all H1 headings on this page use a gradient text effect with colors going from purple (#7B2FF7) to pink (#F72F7B) at a 45-degree angle. Apply this using Webflow's native Clip to Text feature so no custom CSS is needed.
Frequently asked questions
Does gradient text work in Webflow without custom code?
Yes. Webflow's Style Panel > Backgrounds > Clipping > 'Clip to Text' applies the CSS background-clip: text property natively without any code. Just add a gradient background to the text element and set the clipping. No custom CSS or Embed element required.
Can I use gradient text on CMS-connected headings in Webflow?
Yes, but with a limitation. You can apply the gradient-text class to the text element inside a Collection List, and the gradient will render for all CMS items. However, you cannot bind specific gradient colors to CMS fields — the colors are defined in the class, not per-item. Use conditional visibility to switch between different gradient classes based on a CMS field value.
Why does my gradient text look faded or washed out?
This usually happens when the gradient color stops have low opacity (alpha below 100%), or when the font weight is too light (100–300). Increase the alpha of your gradient stops to 100% and use a font weight of 600 or higher for vibrant, clear gradient text. Thin strokes in letterforms simply don't have enough surface area to show color richly.
Can I animate the gradient movement inside text in Webflow without code?
Not fully without code. Webflow's native Interactions can animate opacity and transforms, but background-position animation (which creates the shifting gradient effect) requires a CSS @keyframes rule. Inject this in Page Settings > Head Code on a paid plan. The class-based CSS animation approach shown in this tutorial is the recommended method.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation