Skip to content

Commit 99515bd

Browse files
committed
Update theme settings docs
1 parent 7eb494f commit 99515bd

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed
4.58 KB
Loading

src/app/(pricing)/pricing/data.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ export const planFeatures: PricingComparisonProps['features'] = [
147147
title: 'Add your own custom OpenAPI specs',
148148
tooltip: 'Add your own OpenAPI specs, to validate traffic against your API contract and show dynamic documentation alongside each request',
149149
checked: ['pro', 'team'],
150+
},
151+
{
152+
title: 'Choose your own custom UI theme',
153+
tooltip: 'Switch between themes independent of your system settings, or load your own totally custom UI theme to override everything',
154+
checked: ['pro', 'team']
150155
}
151156
]
152157
},

src/content/docs/reference/settings-page.mdx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,30 @@ Note that client certificates are necessarily stored unencrypted in HTTP Toolkit
132132

133133
![The themes card](./theme-settings.png)
134134

135-
The theme settings card allows you to change the app theme.
136-
137-
Select one of the three themes on the left to immediately change the whole app's theme.
138-
139-
All colours used in the theme are shown on the right, along with an editor containing some example HTML (actually the contents of the default intercepted [amiusing.httptoolkit.tech](https://amiusing.httptoolkit.tech) page!), so you can see it all live.
135+
The theme settings card allows you to change the app theme. By default the app switches between light & dark themes to match your system, but you can also switch them manually here, use the high contrast theme, or upload your own custom themes.
136+
137+
Select one of the themes on the left to immediately change the whole app's theme. All colours used in the theme are shown on the right, along with an editor containing some example HTML (actually the contents of the default intercepted [amiusing.httptoolkit.tech](https://amiusing.httptoolkit.tech) page!), so you can see it all live.
138+
139+
To use a custom theme, click the 'Custom' option and then select a theme file. Custom themes are JSON files with an `.htk-theme` extension, containing:
140+
141+
* A `name` string field
142+
* An `extends` field, containing the name of an existing theme (`light`, `dark`, or `high-contrast`)
143+
* Any subset of the theme fields to override (see the `lightTheme` etc constants in [styles.ts](https://github.com/httptoolkit/httptoolkit-ui/blob/main/src/styles.ts) to check out the default theme values)
144+
145+
As an example, here's an alternative dark blue custom theme:
146+
147+
```json
148+
{
149+
"name": "DarkBlue",
150+
"extends": "dark",
151+
"mainBackground": "#161630",
152+
"mainLowlightBackground": "#1e1e42",
153+
"inputBackground": "#1e1e38",
154+
"inputHoverBackground": "#20203d",
155+
"inputBorder": "#27274a",
156+
"highlightBackground": "#171b30",
157+
"containerBackground": "#2f2f45"
158+
}
159+
```
140160

141161
**Any questions? [Get in touch](/contact/)**

0 commit comments

Comments
 (0)