Like this tool?
Install byteflow.tools for faster startup and offline tool access.
Install guideLike this tool?
Install byteflow.tools for faster startup and offline tool access.
Install guideGenerate directional CSS triangles for tooltips, pointers, and UI arrows.
Generate directional CSS triangles for tooltips, pointers, badges, and navigation cues using border-based shape techniques.
It outputs triangle CSS using transparent borders and directional color borders.
It supports `up`, `down`, `left`, and `right` orientations with width and height controls.
It provides a live preview so arrow direction and scale can be confirmed quickly.
It exports reusable snippets for dropdowns, callouts, and pointer UI components.
Direction
right
Geometry
base width 70px, height 40px
Color
#38bdf8
Right triangle CSS
border-top: 35px solid transparent; border-bottom: 35px solid transparent; border-left: 40px solid #38bdf8;
Up triangle CSS
border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 34px solid #22d3ee;
Integration note
Use pseudo-elements to attach triangles to existing UI blocks.
Triangle appears distorted
Balance base width and height values for intended proportions.
Direction points the wrong way
Verify selected orientation before copying the snippet.
Color edge shows antialias artifacts
Try even pixel values and inspect at target zoom levels.
Positioning around tooltip is off
Combine generated shape with explicit absolute positioning rules.
Unexpected layout shift in containers
Keep triangle element width/height at zero as generated.
CSS Triangle Generator should be treated as a repeatable validation step before merge, release, and handoff.
Why is width and height set to zero in triangle CSS?
Border-based triangles rely on zero-sized boxes plus border geometry.
Can I use this for tooltip arrows?
Yes, this is a common use case for generated triangles.
How do I change triangle direction?
Switch orientation and regenerate the border side rules.
Can I animate triangle color?
Yes, animate the directional border color property.
Is this better than using SVG triangles?
For simple pointers, border triangles are lightweight and fast.