---
url: /docs/fundamentals/logic/visual-scripting/libraries.md
description: >-
  Enable Luna Park's node libraries and discover the most useful nodes: events,
  HTTP, cookies, errors, and utilities.
---

# Node Libraries

Nodes are grouped in **libraries**. Enable or disable them per project with the **Libraries** button of the top bar. Disabled libraries don't appear in the node search.

Right-click the graph to search for a node by name.

## Available libraries

| Library | Content | Enabled by default |
|---|---|---|
| Standard | Flow control, errors, objects, booleans, HTTP requests. | Yes |
| Array | Create and transform arrays. | Yes |
| Date | Dates and the [Temporal API](./temporal-api). | Yes |
| Dom | Browser dialogs (`Alert`, `Confirm`, `Prompt`), HTML/XML parsing, DOM methods. | Yes |
| Json | Parse and serialize JSON. | Yes |
| Math | Arithmetic, comparisons, rounding, numbers. | Yes |
| Misc | Cookies and HTTP errors for the backend. | Yes |
| Regex | Regular expressions. | Yes |
| String | Text operations. | Yes |
| Url | Build and read URLs. | Yes |
| Reactivity | Reactive time helpers. | No |
| Utils | Clipboard, hashing, UUID, file download... | No |
| Bigint | Arbitrary-precision integers. | No |

Installed [npm packages](../../../integrations/npm) and [plugins](../../../integrations/plugins) add their own nodes.

## Events

Events start the execution of a graph.

| Node | Triggered when |
|---|---|
| `On Mounted` | The component is displayed. |
| `On Unmounted` | The component is removed. |
| `On Load` | The logic is loaded. |
| `On Click`, `On Key Down`, `On Mouse Enter`... | The user interacts with a layout element (create them from the element's **Events** panel). |
| `Manual Play` | You click it in the editor (useful for testing). |

## HTTP requests

`Fetch` sends an HTTP request (`GET`, `POST`, `PUT`, `DELETE`) to any URL, with headers and a body. It outputs the response **text**, the parsed **json**, and the **status**.

::: tip CORS
In the editor, enable the **Proxy** option of `Fetch` if the API blocks requests from the browser (CORS errors). The proxy is only used in the editor.
:::

To call your own backend, use the node generated by each [route](../../data/routes) instead.

## Errors

| Node | Description |
|---|---|
| `Try` | Runs the try branch. If it throws, runs catch with the error. `finally` always runs. |
| `Throw` | Throws an error with an optional message, interrupting execution. |
| `Get Message` | Returns the message of an error. |
| `Error` | Backend only: stops a route and returns an HTTP error code (400, 401, 403, 404...). |

## Cookies

Backend nodes from the **Misc** library: `Get Cookie`, `Set Cookie`, and `Clear Cookie`. Cookies are signed with the **Cookie salt** set in **Backend Settings**.

## Navigation

`Navigate` opens another page of your app. `Get Router` gives access to the router (current route, parameters).

## Utilities

| Node | Library | Description |
|---|---|---|
| `Clipboard Read` / `Clipboard Write` | Utils | Read or write the clipboard. |
| `Hash` | Utils | Hash a string. |
| `UUID` | Utils | Generate a unique identifier. |
| `File Download` | Utils | Make the browser download a file. |
| `Use Now` | Reactivity | The current date, refreshed at an interval. |
| `Use Date Format` | Reactivity | A date formatted with a pattern, kept up to date. |
| `Use Time Ago` | Reactivity | A relative date ("3 minutes ago"), kept up to date. |
| `Log` | Built-in | Prints a value in the console. |
| `Comment` | Built-in | A note in the graph. |
