BX Toolbox
Publisher: BuildboxThemes in package: 1
Snippets for PHP, WordPress, React and Node.
Snippets for PHP, WordPress, React and Node.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #F8F8F2 | — |
| comment | #6272a4 | |
| string | #f1fa8c | — |
| constant.numeric | #bd93f9 | — |
| constant.language | #bd93f9 | — |
| constant.character, constant.other | #bd93f9 | — |
| variable | — | |
| keyword | #ff79c6 | — |
| meta.tag, declaration.tag | #ff79c6 | |
| storage | #ff79c6 | |
| storage.type | #8be9fd | italic |
| entity.name.class | #50fa7b | underline |
| entity.other.inherited-class | #50fa7b | italic underline |
| entity.name.function | #50fa7b | |
| variable.parameter | #ffb86c | italic |
| entity.name.tag | #ff79c6 | |
| entity.other.attribute-name | #50fa7b | |
| support.function | #8be9fd | |
| support.constant | #6be5fd | |
| support.type, support.class | #66d9ef | italic |
| support.other.variable | — | |
| invalid | #F8F8F0 | |
| invalid.deprecated | #F8F8F0 | — |
| meta.structure.dictionary.json string.quoted.double.json | #CFCFC2 | — |
| meta.diff, meta.diff.header | #6272a4 | — |
| markup.deleted | #ff79c6 | — |
| markup.inserted | #50fa7b | — |
| markup.changed | #E6DB74 | — |
| constant.numeric.line-number.find-in-files - match | #bd93f9 | — |
| entity.name.filename | #E6DB74 | — |
| message.error | #F83333 | — |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}