CSS Gradient & Shadow Generator
Design linear, radial and conic gradients, box shadows and text shadows, and copy the CSS or Tailwind class.
Presets
Colour stops
CSS
background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
Tailwind CSS
bg-[linear-gradient(135deg,#ff7e5f_0%,#feb47b_100%)]
Everything is made in your browser. Nothing you choose is sent anywhere or remembered.
Runs in your browser. Nothing is uploaded.
What is CSS Gradient & Shadow Generator?
A CSS gradient and shadow generator lets you design a background gradient, a box shadow or a text shadow by moving sliders and picking colors, then gives you the CSS to paste into your stylesheet. You see the result as you change it, so there is no guessing what a blur of 24 pixels or a 135 degree angle looks like.
The Gradient tab makes linear, radial and conic gradients with two to ten color stops. Each stop has a color, an opacity and a position along the line, and you can choose the angle, the shape and the center. The Box shadow and Text shadow tabs stack up to ten layers, each with a horizontal and vertical offset, a blur and a color with opacity. Box shadows also have a spread and an inset option. Layered shadows are how most modern interfaces get a soft, realistic depth, and the presets show a few common ones to start from.
Every design is given as plain CSS and as a Tailwind CSS class that uses an arbitrary value, so you can use it in either kind of project. Transparent colors are written as rgba(), solid ones as hex. Nothing is uploaded or remembered: it runs in your browser and is gone when you close the page.
How to use
- Choose the Gradient, Box shadow or Text shadow tab, or start from a preset.
- For a gradient, pick the type, then set the angle or center and edit the color stops. Add a stop to blend more colors.
- For a shadow, set the offsets, blur, spread and color of a layer. Add more layers for a softer, deeper look.
- Watch the preview change as you go.
- Press Copy CSS or Copy Tailwind and paste the result into your code.
Example
Input
Linear gradient at 135 degrees from #ff7e5f to #feb47b
Output
background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
Shadow values at a glance
The order of the values in a box-shadow, and what each one does.
| Syntax | Meaning |
|---|---|
inset | Optional. Draws the shadow inside the box instead of outside |
4px | Horizontal offset. Positive moves the shadow right |
8px | Vertical offset. Positive moves the shadow down |
16px | Blur radius. 0 is a hard edge; it cannot be negative |
-2px | Spread. Grows (positive) or shrinks (negative) the shadow |
rgba(0, 0, 0, 0.25) | Color. A transparent black is the most natural |
Frequently asked questions
- What is the difference between linear, radial and conic gradients?
- A linear gradient blends colors along a straight line at an angle. A radial gradient blends outward from a center point in a circle or an ellipse. A conic gradient sweeps around a center point like the hand of a clock, which makes it good for color wheels and pie-chart effects.
- What do blur and spread do in a box shadow?
- Blur softens the edge of the shadow: 0 gives a hard edge and larger values fade it out. Spread makes the shadow bigger (positive) or smaller (negative) than the box before the blur is applied. A negative spread with a large vertical offset gives a floating effect.
- Why use several shadow layers?
- A single shadow often looks flat or heavy. Real shadows are darker and sharper near the object and lighter and wider further away, so stacking two or three shadows with growing offset and blur looks more natural.
- How do I use the Tailwind output?
- Add the class to an element, for example a div with the gradient class as its class name. Tailwind turns underscores into spaces, so the value is the same CSS. Text-shadow classes were added in Tailwind CSS 4.1, so older versions need the plain CSS instead.
- Does a box shadow follow the text or the box?
- A box shadow follows the rectangular box of the element, including its rounded corners. A text shadow follows the shape of each letter. Use text-shadow for text, and filter: drop-shadow() if you want a shadow that follows a transparent image.
Related tools
- Color ConverterConvert colors between HEX, RGB, HSL, HWB, HSV, CMYK and OKLCH, with a WCAG contrast checker.
- HTML ViewerPaste HTML and see a live preview at mobile, tablet or desktop width, with scripts off until you allow them.
- Markdown PreviewerWrite Markdown and see a live preview with tables, task lists and code, then download it as .md or HTML.
- Lorem Ipsum GeneratorGenerate lorem ipsum placeholder text by paragraphs, sentences, words or characters.