geogebra-component.js provides a custom HTML element for embedding GeoGebra applets.


Download geogebra-component.js.

Include the GeoGebra deployggb.js script and geogebra-component.js in your page:

        <script src=""></script>
        <script src="geogebra-component.js" defer></script>


Write a <geogebra-applet> element wherever you want a GeoGebra applet to appear.

Attributes on the element configure how it appears.

Use event listeners and property getters/setters to interact with the applet after it loads.

Full API reference


A = (1,1) B = (2,3) l = Line(A,B)