css Tools

CSS Triangle Generator

Generate pure CSS triangles pointing in any direction.

Runs 100% in your browser — your data never leaves this device

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What is CSS Triangle Generator?

CSS triangles are created using the border trick - by making an element with zero width and height and using colored borders. This technique is widely used for tooltips, dropdown arrows, and decorative elements. Our generator lets you visually create triangles in any direction with custom colors and sizes, then copy the CSS code for immediate use.

How to Use CSS Triangle Generator

1. Select the direction the triangle should point 2. Adjust the width and height of the triangle 3. Choose the triangle color 4. Preview the result in real-time 5. Copy the generated CSS code

Common Use Cases

  • Creating tooltip arrows and pointers
  • Building dropdown menu indicators
  • Designing breadcrumb separators
  • Adding decorative elements to cards
  • Creating custom bullet points

Frequently Asked Questions

How do CSS triangles work?

CSS triangles use the border property. When an element has zero width/height, its borders meet at angles. By making some borders transparent and one colored, a triangle shape appears.

Can I create triangles pointing diagonally?

Yes! By adjusting border widths, you can create triangles pointing to corners. This tool supports the four main directions, but you can modify the CSS for diagonal variants.

Are CSS triangles accessible?

CSS triangles are decorative and typically should be hidden from screen readers using aria-hidden="true" on the element.