Skip to content
epitometool

CSS triangle generator

CSS & UI generators

Generate CSS border triangle snippets for direction and size.

Updated

CSS triangle generator

Generate CSS border triangle snippets for direction and size.

Input format: Line 1=direction (up/down/left/right), Line 2=size px, Line 3=color

Output

Quick start

How to use css-triangle

Enter input and view computed output.

  1. Step 1
    Enter input

    Paste or type your data in the input box.

  2. Step 2
    Compute

    The tool processes input instantly in your browser.

  3. Step 3
    Use output

    Copy output and continue your workflow.

In-depth guide

CSS triangle generator guide

Generate CSS border triangle snippets for direction and size. This tool is designed for fast local processing and practical day-to-day use.

Quick start

Paste input, review output instantly, then copy it for your workflow.

Input tips

Use one value per line for structured inputs. Common separators are handled gracefully.

Privacy

Processing runs in your browser tab for the MVP workflow, with no mandatory upload step.

When to use it vs alternatives

Use this tool for quick browser-based work when you need an answer or output immediately. Use a dedicated application or automated workflow when you need bulk processing, approvals, or repeatable production rules.

Common pitfalls

  • Check the result before replacing the original input.
  • Watch for unit, format, encoding, and browser memory limits on large inputs.
  • Keep a copy of important source material until the output is verified.

Frequently asked questions

How does the CSS triangle trick work?

A zero-size element with thick borders shows four colored triangles where the borders meet. Making three borders transparent leaves a single triangle.

How do I change the triangle direction?

The visible triangle points away from the transparent sides. Swap which borders are colored versus transparent to point it up, down, left or right.

How do I control the size?

Border width sets the size: a larger perpendicular border makes a taller triangle, and the two side borders set the base width.

Should I use this or an SVG?

The border trick is great for tooltip and dropdown arrows with no extra markup. For complex or scalable shapes, an SVG or clip-path is cleaner.

Why is my triangle not showing?

The element must have zero width and height, and the correct three borders must be transparent. Any padding or content will distort it.

Is any data uploaded?

No. The CSS is generated locally in your browser.

Keep exploring

More tools you'll like

Hand-picked utilities that pair well with the one you're on — all free, client-side, and zero-signup.