> For the complete documentation index, see [llms.txt](https://ruio.garyrivera.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ruio.garyrivera.me/overview/...md).

# Introduction

<div align="center"><img src="/files/WegZVfM0ppcemrbi3zj2" alt="ruio banner"></div>

![codecov](https://codecov.io/gh/gary-rivera/ruio/branch/main/graph/badge.svg) ![npm version](https://img.shields.io/npm/v/ruio) ![downloads](https://img.shields.io/npm/dm/ruio) ![bundle size](https://img.shields.io/bundlephobia/min/ruio) ![license](https://img.shields.io/npm/l/ruio)

#### Overview

**A developer tool to visualize and debug React component hierarchy.** Helps to troubleshoot complex layout issues, understand nested structures, and refine your UI by applying dynamic styling to highlight component archtitecture.

[![demo gif](https://github.com/user-attachments/assets/9aad57f6-4df2-49b2-805c-2f9780c924a5)](https://github.com/user-attachments/assets/1b226b6d-6bf1-43ed-b016-d685baa722b6)<br>

* **Dynamic Border Styling -** Visualize borders on any element within your React app.
* **Element Selection Mode** Mimics the hover effect of Chrome DevTools to highlight elements on the page.
* **Click-to-Select** Make any element the new root with a click.
* **Toggle Logic** Enable and disable border styling on the fly as well as memory of selected root element.
* **Reset Functionality** Automatically clear all applied border styles.
* **Highly Configurable** Works with different project structures and exists on top of any existing architectures.

### Quick Start

#### Installation

You can install using your preferred package manager:

```bash
# npm
npm install ruio

# yarn
yarn add ruio

# bun
bun add ruio
```

#### Basic Usage

Wrap your application with the `RuioContextProvider`:

```typescript
import RuioContextProvider from 'ruio'

function App() {
  return (
    <RuioContextProvider>
      {/* Your App Components Here */}
    </RuioContextProvider>
  )
}
```

**Note:** ruio automatically detects your app root (`#root`, `#app`, etc.). For custom setups, pass a `defaultRootSelector` prop.

### Documentation

* [**Installation Guide**](/getting-started/installation.md) - Setup, requirements, and troubleshooting
* [**Usage Guide**](/getting-started/usage.md) - Feature walkthrough and workflows
* [**Configuration**](/reference/configuration.md) - Element exclusion, environment settings, and planned features
* [**Examples**](/getting-started/examples.md) - Working examples and common patterns
* [**API Reference**](/reference/api.md) - API documentation for components and hooks
* [**Changelog**](/development/changelog.md) - Version history and release notes
* [**Contributions Guide**](/development/contributing.md)

### Contributing

Contributions are welcome. See [Contributing Guide](/development/contributing.md) for details.

#### License

`ruio` is licensed under the MIT License. See the [LICENSE](https://github.com/gary-rivera/ruio/blob/main/LICENSE/README.md) file for more details.


---

# 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 dynamically by asking a question.

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

```
GET https://ruio.garyrivera.me/overview/...md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
