---
title: "ViewParams"
description: "Everything a chrome-less preview URL can carry."
url: "https://opsinjs.pensievelabs.org/reference/api/ViewParams"
source: "https://opsinjs.pensievelabs.org/reference/api/ViewParams.md"
section: "Reference"
kind: "reference"
---

> Elements written as `<PascalCase … />` below are opsinjs documentation
> components. Their attributes are the content: the values they render are
> generated from `tokens/*.json` and `registry/catalogue.ts` and are
> published separately at https://opsinjs.pensievelabs.org/r/index.json and under the Reference
> section.
> Nothing is missing from this page. The data simply does not live in
> the prose.

{/* GENERATED - do not edit. Source: the declaration named in the table below.
    Script: scripts/build-reference.mts. Change the doc comment on the symbol. */}

<PageTemplate kind="reference" />

## How this is generated [#how-this-is-generated]

Source: `lib/routes.ts`. Script: `scripts/build-reference.mts`. Command:
`pnpm run generate`.

Everything below is copied from the symbol, so a page is improved by improving
its doc comment. The [API index](./index.mdx) says why there is a page per
symbol and what these pages still do not carry.

{/* opsinjs:generated:begin - everything below is replaced by scripts/build-reference.mts */}

## ViewParams [#viewparams]

Everything a chrome-less preview URL can carry. Name and kind become path segments, and the rest become query parameters applied before first paint.

| Kind      | Declared in     |
| --------- | --------------- |
| interface | `lib/routes.ts` |

```ts
export interface ViewParams {
  name: string
  kind?: ViewKind
  base?: string
  style?: string
  mode?: "light" | "dark"
  density?: "comfortable" | "compact"
  text?: 100 | 125 | 150 | 200
  theme?: string
}
```

{/* opsinjs:generated:end */}
