Minimal test examples of using packages for javascript tree viewing. You can see the page working at https://bomeara.github.io/jsphylotastic/index.html.
This uses https://github.com/veg/phylotree.js (so the javascript file is from them, stored here for convenience), and is based on their vanilla example.
Stephen D. Shank, Steven Weaver, Sergei L. Kosakovsky Pond. phylotree.js - a JavaScript library for application development and interactive data visualization in phylogenetics. BMC Bioinformatics, 2018, Volume 19, Number 1, Page 1