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

# lit-ui-router-ssr

The server half: `prerender()` emits a static site from a `ui-router-server`
mount table, `renderToString()` renders one page for a host that owns the
request, and `UiViewRenderer` draws `<ui-view>` inside the `@lit-labs/ssr` render.

## Classes

* [LightElementRenderer](classes/LightElementRenderer.md) — Renders a `LightDomHydrating` element's `render()` into its light DOM, between the part markers its client-side hydrate reads, and writes no shadow root.
* [UiViewRenderer](classes/UiViewRenderer.md) — Renders the routed component of a `<ui-view>` into the element's light DOM, between the part markers its client-side `render()` hydrates against.

## Interfaces

* [EmittedPage](interfaces/EmittedPage.md) — One emitted artefact, as prerender planned it.
* [PagePayload](interfaces/PagePayload.md) — What a page's hydration signature carries of its resolve payload.
* [PrerenderedPage](interfaces/PrerenderedPage.md) — A page prerender emitted.
* [PrerenderOptions](interfaces/PrerenderOptions.md) — Options for prerender: those of `ui-router-server/prerender`'s loop, with a lit render in place of its `render`.
* [PrerenderResult](interfaces/PrerenderResult.md) — What prerender did.
* [PrerenderTally](interfaces/PrerenderTally.md) — Counts of what prerender emitted.
* [RedirectLine](interfaces/RedirectLine.md) — One host rules line: `from to status`, in `_redirects` order.
* [RenderContext](interfaces/RenderContext.md) — What a render hook is handed besides the verdict.
* [RenderedPage](interfaces/RenderedPage.md) — One page renderToString drew.
* [RenderedRedirect](interfaces/RenderedRedirect.md) — A render's answer in place of a page: the path redirects, written as a rules line like a redirect verdict's.
* [RenderToStringOptions](interfaces/RenderToStringOptions.md) — Options for renderToString.
* [ResolvePayload](interfaces/ResolvePayload.md) — The resolved values a server render drew a page with, as `dehydrate` from `ui-router-server/ssr` writes them and `seed` from `ui-router-server/ssr/client` adopts them.
* [ResponseContext](interfaces/ResponseContext.md) — What a response state's handler reads: the resolves its transition landed with, inherited ones included, and the request.
* [SettledRedirect](interfaces/SettledRedirect.md) — Where a redirected transition landed, as `redirectedTo` reports it.
* [SettleOptions](interfaces/SettleOptions.md) — Options for `settle`.

## Type Aliases

* [BoundResponses](type-aliases/BoundResponses.md) — Handlers bound by state name, as responder takes them.
* [FileWriter](type-aliases/FileWriter.md) — Where prerender writes: over `node:fs`, a virtual fs, or memory.
* [Responder](type-aliases/Responder.md) — Answers one response verdict for the request it came from.
* [ResponseHandler](type-aliases/ResponseHandler.md) — Builds a response state's answer from its ResponseContext.
* [ResponseHandlers](type-aliases/ResponseHandlers.md) — A handler for every response state a router declares, keyed by state name: exactly the names of the rows marked `response: true` for `as const` routes, any name for an untyped router.

## Variables

* [redirectedTo](variables/redirectedTo.md) — Reports where `transition` was redirected to, so a host answers the request with a redirect instead of the page it landed on.
* [settle](variables/settle.md) — Moves `router` to `path` and resolves once the transition the url starts has landed, resolves included, so a synchronous render reads the router after it.
* [shadowElementRenderers](variables/shadowElementRenderers.md) — The default element renderers plus `@lit-labs/ssr`'s `LitElementRenderer` last: `[UiViewRenderer, LightElementRenderer, LitElementRenderer]`.

## Functions

* [prerender](functions/prerender.md) — Emits a static site from a mount table's verdicts: a shell verdict becomes `<subpath>/index.html`, or a rules line when the transition its render landed, through `template` or `renderShell`, was redirected, a response state becomes the body or rules line its handler in responses answers, a redirect becomes a rules line and no page, and the `otherwise` projection becomes the 404 document.
* [registerTraceCategory](functions/registerTraceCategory.md) — Registers a trace category beyond core's fixed set, so `router.trace.enable(name)`, `disable(name)` and `enabled(name)` switch it alone, and a no-argument `enable()` or `disable()` covers it too.
* [renderToString](functions/renderToString.md) — Renders the page a router already stands on to a string, for a host that owns the request: a framework route or a worker settles the router on the request's path, decides the response, and calls this for the page's markup.
* [responder](functions/responder.md) — Answers response verdicts on `router`: settles it on the verdict's subpath, the request's query included, and runs the handler bound to the state it lands on with that transition's resolves and the request.
