SDK Snippet Card

A code card with a filename header and copy affordance over syntax-toned, line-numbered source.

members.ts
import { Sirius } from '@sirius/sdk'
const client = new Sirius(apiKey)
await client.members.create({ name })

New here? Read the installation guide.

Import & use
import { Code13 } from "@/components/beste/piece/code13";

<Code13
  filename="members.ts"
  lines={[
    [
      {
        "text": "import",
        "tone": "keyword"
      },
      {
        "text": " { Sirius } "
      },
      {
        "text": "from",
        "tone": "keyword"
      },
      {
        "text": " "
      },
      {
        "text": "'@sirius/sdk'",
        "tone": "string"
      }
    ],
    [],
    [
      {
        "text": "const",
        "tone": "keyword"
      },
      {
        "text": " client = "
      },
      {
        "text": "new",
        "tone": "keyword"
      },
      {
        "text": " Sirius(apiKey)"
      }
    ],
    [
      {
        "text": "await",
        "tone": "keyword"
      },
      {
        "text": " client.members."
      },
      {
        "text": "create",
        "tone": "fn"
      },
      {
        "text": "({ name })"
      }
    ]
  ]}
/>

More Code pieces

View all Code
greet.ts
export function greet(name: string) {
return `Hello, ${name}!`;
}
 
console.log(greet("Beste"));

Code Snippet Card

Dark editor card with three traffic-light dots, a filename tab, and line-numbered code.

function greet(name) {
return 'Hi ' + name;
return `Hello, ${name}!`;
}

Diff Snippet

Compact diff card with added, removed, and context lines tinted in emerald and rose.

const greeting = "Hello, Beste!";ts

Code Line

One-line code snippet with a monospace pill and a tiny language tag on the right.

{
"name":"Beste",
"version":"1.0.0",
"active":true,
"count":42,
"owner":null
}

JSON Snippet

Pretty-printed JSON object with sky keys, emerald strings, and amber numerics.

const user = await fetchUser("42");

Tokenized Line

Single-line snippet with keywords, strings, and function names colored by semantic token kind.

TypeError: Cannot read 'name' of undefined
greet(src/utils.ts:14:12)
handler(src/server.ts:42:8)
processRequest(src/api.ts:88:4)

Stack Trace

Error headline followed by a few stack frames with file paths and amber line and column numbers.

Markdown version