Construct a square under the base. Then draw lines from the bottom two vertices of the square to the top of the triangle.
The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.
Also here: Catriona Agg's geometry puzzles made interactive; the same gallery in plain JavaScript; and how to embed a live drawing in your own page.