Customizing
Set the API client's defaults and features for your site with the client config, and what readers can change in settings.
The client key in orbitdocs.config.ts sets how the API client looks and which features your readers get. Each reader can then adjust layout and appearance in the client's settings drawer. Their choices are kept in their browser.
Site defaults
export default defineConfig({
// ...
client: {
layout: 'stacked',
density: 'compact',
accent: '#8B5CF6',
features: {
scripts: false,
runner: false,
},
},
});Prop
Type
Features
| Feature | Default | When false |
|---|---|---|
scripts | true | The Scripts tab is hidden. |
runner | true | Collection runner leaves the rail and the command palette. |
history | true | History leaves the rail and the command palette. |
import | true | Import (cURL) leaves the rail. |
environments | true | The Environments view, ⌘ E and its palette entry are hidden. The environment menu in the top bar stays. |
Turn features off to keep the client simple for your audience. For example, a public API for beginners might hide scripts and the runner.
Turn the client off
client: { enabled: false },This removes Test Request from every operation and API Client from the top bar. The /client page is still built from app/client/[[...variant]]/page.tsx; delete that file too if you don't want the page.
Turn sending off for one API
For an API readers can't call from the browser, such as a demo with no live server, set send: false on it:
apis: [
{
id: 'demo',
source: { file: 'demo/travel.json' },
send: false,
// Optional; this is the default.
sendDisabledMessage: 'Sending requests is turned off for this API. Copy the request as code and run it yourself.',
},
],Readers can still open that API's requests in the client, edit them and copy them as cURL or code. Nothing is sent:
- Send is disabled and explains why on hover. The response pane shows the same message.
- ⌘ Enter, Send in the right-click menu and in the Send menu, and Send request in the command palette do nothing.
- The collection runner doesn't run the collection.
- Requests a reader adds to that API's collection follow the same setting.
In the reference, Test Request is disabled with the same message. The code samples and Copy stay. Other APIs on the site are not affected.
Reader settings
Readers open settings with the gear at the bottom of the rail, or from the command palette.
| Setting | Default | What it does |
|---|---|---|
| Layout | Site layout | Side by side or stacked. ⌘ J toggles it. |
| Density | Site density | Comfortable or compact. |
| Show sidebar | On | The collections panel. ⌘ B toggles it. |
| Editor font size | 13 px | From 11 to 18 px, for editors and responses. |
| Accent | Site accent | A color from the swatches. Use the site accent clears it. |
| Wrap long lines | On | Wrap long lines in the response body. |
| Confirm before sending to production | On | Ask before each send to an environment marked Production. |
The drawer also lists the keyboard shortcuts. Reset to defaults returns every setting to the site defaults.
The client also remembers the size of the request and response panes (drag the divider, from 20% to 80%) and the language of the Code tab.
Saved settings win over new defaults
Settings are saved per browser under orbitdocs:client:settings, as soon as a reader changes one. After that, changing client.layout or client.density in your config doesn't affect that reader until they press Reset to defaults.
Style the client further
The client uses the site's theme and HeroUI components, so theme in the config applies to it too. To change it further, override CSS variables in app/global.css, below the imports. See Themes.

