LIGO snippets Demo
“ligo-snippets” (https://www.npmjs.com/package/@ligolang/ligo-snippets) is a React component that can be included on any webpage to display LIGO source code to users.
The user will see LIGO code with syntax highlighting, and an action button allowing the user to open the source code in the LIGO Web IDE (https://ide.ligolang.org).
Each code snippet can have preset LIGO Web IDE configurations (e.g. entrypoint, parameters or storage). These configurations are optional and will be passed onto the LIGO Web IDE when present. This will allow examples to provide the proper configurations for the reader to experiment with.
The “ligo-snippets” React component uses the CodeJar editor (https://github.com/antonmedv/codejar), which is extremely lightweight (only 2kB). It currently supports syntax highlighting for CameLIGO. Additionally, it has both a light and dark theme mode.
- CameLIGO