> For the complete documentation index, see [llms.txt](https://design-with-cracka.gitbook.io/bricksmegamenupro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://design-with-cracka.gitbook.io/bricksmegamenupro/moving-elements.md).

# Moving Elements

Three attributes move elements between the header and the mobile menu as the screen gets smaller.

| Attribute            | Moves                                               | Use it for                                                                   |
| -------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------- |
| `data-breakout-link` | A menu link out of the mobile menu, into the header | A CTA button that should stay visible next to the toggle                     |
| `data-breakin`       | Any element from the header into the mobile menu    | Search, social icons or a phone number that should go inside the mobile menu |
| `data-breakinto`     | Any element into any container you choose           | Anything else, such as moving an element into a top bar                      |

Add the attribute to the element you want to move. See [Change an attribute](/bricksmegamenupro/readme.md#change-an-attribute).

***

## data-breakout-link

Moves a menu link from the mobile menu into the header. It only works on a plain link, not on a **Dropdown** element.

| Value                   | Result                                                                                                |
| ----------------------- | ----------------------------------------------------------------------------------------------------- |
| Empty                   | Below the breakpoint, the link moves into the header.                                                 |
| A number, such as `560` | The link moves into the header below the breakpoint, then goes back into the mobile menu below 560px. |

Above the breakpoint, the link stays in the menu.

The template's last menu item uses `data-breakout-link="520"`. If you don't want that link in the mobile header, remove the attribute.

***

## data-breakin

Moves an element from the header into the mobile menu.

| Value                   | Result                                                         |
| ----------------------- | -------------------------------------------------------------- |
| Empty                   | The element moves into the mobile menu below the breakpoint.   |
| A number, such as `767` | The element moves into the mobile menu at 767px and below.     |
| `end`                   | Pushes the breakin container to the bottom of the mobile menu. |

The element goes into a container with the class `breakin-container`. Where that container sits depends on the `breakinToNavList` option:

* `1` (default): inside the list of menu items, shown last.
* `0`: at the end of the nav wrapper.

See [Menu Options](/bricksmegamenupro/menu-options.md).

When the screen gets wider again, the element goes back to the header.

### Style a moved element

Target it through the container. For example, to change a text color once it's in the mobile menu:

```css
.breakin-container .my-text {
  color: gray;
}
```

***

## data-breakinto

Moves an element into any container, below the breakpoint or a width you choose.

Set the value to the container's selector, such as its class or ID. To use your own width, add a bar (`|`) and the width after it.

```
data-breakinto=".my-div-class"          moves into .my-div-class below the breakpoint
data-breakinto=".my-div-class | 767"    moves into .my-div-class at 767px and below
```

The target can be any class or ID: the header, a top bar, the menu wrap or the mobile menu.

***

## Older versions

**Below 1.4.1**, `data-breakout-link` and `data-breakin` took no value. You set the width with a second attribute, `data-breakpoint`, for example `data-breakpoint="560"`. `data-breakinto` didn't exist.

**1.4.2 and below**, `breakinToNavList` defaulted to `0`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://design-with-cracka.gitbook.io/bricksmegamenupro/moving-elements.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
