Code Snippet Card

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

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

New here? Read the installation guide.

Import & use
import { Code2 } from "@/components/beste/piece/code2";

<Code2
  title="greet.ts"
  lines={[
    "export function greet(name: string) {",
    "  return `Hello, ${name}!`;",
    "}",
    "",
    "console.log(greet(\"Beste\"));"
  ]}
/>

More Code pieces

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

SDK Snippet Card

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

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.

const user = await fetchUser("42");

Tokenized Line

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

{
"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.

# Database
DATABASE_URL=postgres://localhost/beste
REDIS_URL=redis://localhost:6379
# API
API_KEY=sk_test_EXAMPLE_0000
PORT=3000

Env File

Dotenv listing with sky keys, italic muted comments, and grouped sections separated by blank lines.

Markdown version