Skip to content
MewixMewix

CSS triangle generator

Choose which way the triangle points, set edge length and fill colour, and copy the transparent-border technique as CSS.

Updated by the Mewix team

Tooltip arrow CSS without images

CSS triangles use a zero-width, zero-height box and coloured borders on one side while the others stay transparent. Pick a direction (up, down, left, right), set edge length 16–96px, and choose fill colour. Copied rules list each border width and colour explicitly—ready to drop on a pseudo-element beside your tooltip body.

How direction maps to borders

Pointing up colours border-bottom; pointing down colours border-top; left uses border-right; right uses border-left. The non-coloured sides get equal transparent widths so the triangle stays equilateral in the preview stage.

Why not use clip-path instead?

Clip-path polygons scale cleanly and support rounded tips, but border triangles still appear in legacy snippets and design-system docs. This tool documents the classic technique; migrate to clip-path manually if you need non-equilateral shapes.