<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/when-you-need-to-make-a-triangle-think-conic-gradients-master-dev-blog-el1f4eywx" -->

---
title: When You Need To Make a Triangle, Think Conic Gradients...
description: CSS conic-gradient() is more versatile than it first appears. By repositioning the gradient origin and using hard color stops, you can create triangles with...
canonical: https://daily.dev/posts/when-you-need-to-make-a-triangle-think-conic-gradients-master-dev-blog-el1f4eywx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: When You Need To Make a Triangle, Think Conic Gradients – Master.dev Blog | daily.dev
og:description: CSS conic-gradient() is more versatile than it first appears. By repositioning the gradient origin and using hard color stops, you can create triangles with...
og:url: https://daily.dev/posts/when-you-need-to-make-a-triangle-think-conic-gradients-master-dev-blog-el1f4eywx
og:image: https://api.daily.dev/og/posts/El1f4EYWX.png
og:image:alt: When You Need To Make a Triangle, Think Conic Gradients – Master.dev Blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When You Need To Make a Triangle, Think Conic Gradients – Master.dev Blog

**[Frontend Masters](https://daily.dev/sources/frontendmasters)** · 3 min read · 2 upvotes · 0 comments

## Summary

CSS conic-gradient() is more versatile than it first appears. By repositioning the gradient origin and using hard color stops, you can create triangles with precise angular control — useful for UI elements like nav triangles with hover animations. The post walks through the syntax for placing the conic origin at a corner and defining color stops in degrees, then compares this approach to other triangle-making techniques including border tricks, clip-path polygon, the new border-shape property, SVG polygon, canvas, and skew transforms.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://master.dev/blog/when-you-need-to-make-a-triangle-think-conic-gradients>

## Questions this post answers

### How do I make a triangle shape using CSS conic-gradient()?

Use conic-gradient() with hard color stops and position the gradient origin at a corner, such as the top-left. For example, set 'from 0.25turn at 0 0' to start pointing at 3 o'clock, then define stops like 'green 0 45deg, white 45deg' to create a hard-edged triangular wedge within a box.

_daily.dev surfaces practical CSS techniques like this for developers building custom UI shapes and animations._

### What are alternative ways to create triangle shapes in CSS besides conic-gradient()?

Options include the classic zero-dimension border trick using one of four borders, clip-path with a polygon() function, the newer border-shape property, drawing a polygon in SVG, drawing with canvas's lineTo() method, or using a skew transform combined with overflow hiding to fake a triangular edge.

_Developers comparing CSS shape techniques can find this kind of practical rundown through daily.dev._

## Similar posts on daily.dev

- [conic-gradient and the modern CSS gradient toolbox](https://daily.dev/posts/conic-gradient-and-the-modern-css-gradient-toolbox-8a2mgdgkn) · Flavio Copes · 7 upvotes · 0 comments
- [Repeating Square Dots Backgrounds in CSS – Frontend Masters Blog](https://daily.dev/posts/repeating-square-dots-backgrounds-in-css-frontend-masters-blog-0u0zcrrfq) · Frontend Masters · 2 upvotes · 0 comments
- [How to create fancy corners using CSS corner-shape](https://daily.dev/posts/how-to-create-fancy-corners-using-css-corner-shape-t9hjg3jcn) · LogRocket · 0 upvotes · 0 comments
- [The “Most Hated” CSS Feature: tan\(\)](https://daily.dev/posts/the-most-hated-css-feature-tan--0af8x8h2r) · CSS-Tricks · 27 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/when-you-need-to-make-a-triangle-think-conic-gradients-master-dev-blog-el1f4eywx)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"When You Need To Make a Triangle, Think Conic Gradients – Master.dev Blog","url":"https://daily.dev/posts/when-you-need-to-make-a-triangle-think-conic-gradients-master-dev-blog-el1f4eywx","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/when-you-need-to-make-a-triangle-think-conic-gradients-master-dev-blog-el1f4eywx"},"datePublished":"2026-07-24T15:03:06.312Z","dateModified":"2026-09-14T06:27:23.221Z","description":"CSS conic-gradient() is more versatile than it first appears. By repositioning the gradient origin and using hard color stops, you can create triangles with...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c6ec988a24adf21ff5ec7549b183c93d?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c6ec988a24adf21ff5ec7549b183c93d?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Frontend Masters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Frontend Masters","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d34dd87208f24090bfb0917307fcf89f","url":"https://daily.dev/sources/frontendmasters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/when-you-need-to-make-a-triangle-think-conic-gradients-master-dev-blog-el1f4eywx","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Frontend Masters","item":"https://daily.dev/sources/frontendmasters"},{"@type":"ListItem","position":3,"name":"When You Need To Make a Triangle, Think Conic Gradients – Master.dev Blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/when-you-need-to-make-a-triangle-think-conic-gradients-master-dev-blog-el1f4eywx#faq","mainEntity":[{"@type":"Question","name":"How do I make a triangle shape using CSS conic-gradient()?","acceptedAnswer":{"@type":"Answer","text":"Use conic-gradient() with hard color stops and position the gradient origin at a corner, such as the top-left. For example, set 'from 0.25turn at 0 0' to start pointing at 3 o'clock, then define stops like 'green 0 45deg, white 45deg' to create a hard-edged triangular wedge within a box. daily.dev surfaces practical CSS techniques like this for developers building custom UI shapes and animations."}},{"@type":"Question","name":"What are alternative ways to create triangle shapes in CSS besides conic-gradient()?","acceptedAnswer":{"@type":"Answer","text":"Options include the classic zero-dimension border trick using one of four borders, clip-path with a polygon() function, the newer border-shape property, drawing a polygon in SVG, drawing with canvas's lineTo() method, or using a skew transform combined with overflow hiding to fake a triangular edge. Developers comparing CSS shape techniques can find this kind of practical rundown through daily.dev."}}]}
```

