---
title: Data Driven GUIs
template: base
---
Developer docs for the Data Driven GUIs mod.
## Getting Started
### Import The Library
Add the repository and dependency to your `build.gradle.kts`:
Stable (Releases Repo)
```kotlin
maven {
name = "TheClashFruit's Maven Releases"
url = uri("https://mvn.theclashfruit.me/releases")
}
```
Beta, Alpha (Snapshots Repo)
```kotlin
maven {
name = "TheClashFruit's Maven Snapshots"
url = uri("https://mvn.theclashfruit.me/snapshots")
}
```
```kotlin
implementation("me.theclashfruit:ddg-$mc_version-fabric:$version")
```
## Creating a GUI
The menus are stored in `data/modid/screen/.xml` and the actions are stored in `data/modid/action/.json`.
An example menu would look like this:
```xml
Some text
```
> You can kind of think of it like a web page, where the root element is the body and the elements are like divs, buttons, inputs and paragraphs.
Some built in action types are:
* `ddg:open_menu` - Opens a menu.
## Opening a Menu From a Server
**From a mod using the mod's api**:
```java
ServerPlayNetworking.send(player, new OpenCustomScreenPayload(Identifier.of("modid", "menu_name"), "title"));
```
**With a command with the mod installed**:
```plaintext
/ddg open []
# Example:
/ddg open modid:screen/menu_name.xml "Title"
```