# Decorative Components

## Separation

### Header

The header lets you write a title for the following options, helping you separate large mods. You might define all of your colors in a single section, titled "Colors". Or locate all of your HUD options together.

```java
@Header(
    text = "Some information that you need to look at!"
)
public static boolean ignored; // Useless. Java limitations with @annotation.
```

![An info example with some config components beneath it](/files/DnwOaDxfd7qD4U38mLjO)

### Custom Pages

Config pages can be used with the @Page annotation. You can specify an additional class that extends Page, which will be opened when clicked. Read more about [Pages](/oneconfig/gui/pages.md#custom-pages) for more information.

The enum `PageLocation` describes the location of that page, which can either be `TOP` or `BOTTOM`.

```java
@Page(
    name = "I'm a page button!",
    location = PageLocation.TOP,
    // optional description that is also displayed on the page button
    description = "Press me to open a new page!"
)
public static MyPage pageToOpen = new MyPage();
```

![Page button example beneath some other config components](/files/bQrvAklxnhBxIWPl1plF)

## Inline documentation

### Info Line

Information lines can provide the user with extra context about something. Maybe warning the user of a potential issue or common problem you could encounter. It's got both single and dual-column variants. Read the designer's note to understand when this should be used.&#x20;

```java
@Info(
    text = "An error occurred :(",
    type = InfoType.ERROR // Types are: INFO, WARNING, ERROR, SUCCESS
)
public static boolean ignored; // Useless. Java limitations with @annotation.

@Info(
    text = "Just trying to say something here",
    type = InfoType.INFO
)
public static boolean ignored2; // Useless. Java limitations with @annotation.
```

![example info fields](/files/t21GN0sHSJ7YNjf1zseQ)

### Descriptions

TBD. [nextdaydelivery](mailto:undefined)

### When to use an info line over a description

Descriptions aren't always shown to the user, only when they hover over the text of an option. This means that if you're simply adding extra info about what something does, use that. Info lines should be for more crucial information, something you actually want them to read.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.polyfrost.org/oneconfig/config/adding-options/decorative-config-components.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
