🪐 Console Component
This component displays a Jupyter Console.
With a Jupyter server
<Jupyter
jupyterServerUrl="https://oss.datalayer.run/api/jupyter-server"
jupyterServerToken="60c1661cc408f978c309d04157af55c9588ff9557c9380e4fb50785750703da6"
>
<Console />
</Jupyter>
You can set the following props to connect it to a running Jupyter Server:
jupyterServerUrl
: The server URLjupyterServerToken
: The server authentication token
Your server will likely need to accept connection from external client.
With in-browser kernel
It supports in-browser kernel (using JupyterLite kernels).
To use the Pyodide Python kernel,
you can simply set lite
to true
:
<Jupyter
lite={true}
>
<Console />
</Jupyter>
But you can also load your own JupyterLite kernel. For example here, the console loads the JavaScript kernel.
<Jupyter
lite={import('@jupyterlite/javascript-kernel-extension')}
defaultKernelName={'javascript'}
>
<Console />
</Jupyter>
To do so, you will need to specify two props:
lite
: Should be set with the dynamic import of the kernel NPM packagedefaultKernelName
: Should match the name of the dynamically imported kernel