Category: Developer tools
CSS Triangle Generator
Build a pure-CSS triangle with the border trick
Pick a direction, size and colour to build a zero-size box with coloured borders that renders as a triangle, with a live preview and CSS ready to copy. All in your browser.
width: 0; height: 0; border-right: 80px solid transparent; border-bottom: 80px solid #0f7b63; border-left: 80px solid transparent;
Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
A CSS triangle is a `width: 0; height: 0;` box whose borders are given a colour on one side and made transparent on the two beside it, so only the colored border's wedge shows. It is easy to get backwards by hand — the wrong pair of sides, or a border left solid instead of transparent — so this tool builds the four declarations from a direction, a size and a colour and shows the result on a real box as you change them.
How to use it
- Pick a direction first — up, down, left or right — and the tool works out which border side takes the colour and which two beside it have to be transparent.
- Set the size and the colour, and the live preview redraws on a real zero-size box so you can see the wedge before it reaches your stylesheet.
- Copy the border declarations straight into your stylesheet; everything is computed in your browser, so the values you type are never sent anywhere.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- How do I use CSS Triangle Generator?
- Choose a direction — up, down, left or right — then set the size and the colour. The tool builds the four border declarations for a zero-size box and shows the result on a real box as you change them.
- Which inputs and options does CSS Triangle Generator support?
- Three inputs: direction (up, down, left or right), size, and colour. The output is the set of border declarations for a `width: 0; height: 0;` box, with one side coloured and the two beside it transparent.
- How do I view or copy the result?
- The live preview redraws on a real box as you adjust the controls, and the CSS declaration is shown ready to copy into your stylesheet.
- Is my input, file, or result uploaded?
- No. Everything is computed in your browser. Inputs, files, settings and results stay in the browser and are not uploaded to LocalTools.
- What does this tool not support?
- It builds the border-trick triangle only, from a direction, a size and a colour. There are no other shapes, no batch generation, no accounts, no cloud history and no server-side processing; anything not listed on this page is not part of the tool.