desmos
Version:
Desmos is the dead-simple way to embed rich, interactive math into your web page or web app.
31 lines (21 loc) • 1.14 kB
Markdown
Desmos is the dead-simple way to embed rich, interactive math into your web page or web app.
The easiest way to use **desmos** is to install it from npm and build it into your app with Webpack.
`npm install desmos --save`
Then use it in your app:
```javascript
import Desmos from 'desmos'
const elt = document.createElement('div')
elt.style.width = '600px'
elt.style.height = '400px'
const calculator = Desmos.GraphingCalculator(elt)
calculator.setExpression({ id: 'graph1', latex: 'y=x^2' })
document.body.prepend(elt)
```

------------
[](https://www.desmos.com/calculator "https://www.desmos.com/calculator")
[](https://www.desmos.com/api/v1.5/docs/index.html "https://www.desmos.com/api/v1.5/docs/index.html")