---
url: https://lit-ui-router.dev/reference/ui-router-devtools/lit-ui-router/functions/litViewLocator.md
---
[ui-router-devtools](../../index.md) / [lit-ui-router](../index.md) / litViewLocator

# Function: litViewLocator()

```ts
function litViewLocator(router, __namedParameters?): ViewLocator;
```

Defined in: [ui-router-devtools/src/lit-ui-router.ts:140](https://github.com/simshanith/lit-ui-router/blob/31f3b09934f0d5fb680137a7c51356c2acec408d/packages/ui-router-devtools/src/lit-ui-router.ts#L140)

Finds the `<ui-view>` behind a view the panel names, and outlines it on the page while the Views point at it.
Elements are matched by router and fqn, which `<ui-view>` builds from its `name` and the views around it.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `router` | [`UIRouter`](https://ui-router.github.io/core/docs/latest/classes/_router_.uirouter.html) |
| `__namedParameters?` | [`LitViewLocatorOptions`](../interfaces/LitViewLocatorOptions.md) |

## Returns

[`ViewLocator`](../../index/interfaces/ViewLocator.md)

## Example

```ts
import type { UIRouter } from '@uirouter/core';
import { DevtoolsPlugin } from 'ui-router-devtools/plugin';
import { litViewLocator } from 'ui-router-devtools/lit-ui-router';

declare const router: UIRouter;

router.plugin(DevtoolsPlugin, { viewLocator: litViewLocator });
```
