SenUI Logo

Syntax-highlighted code, server-rendered, no flash.

SenCode wraps Shiki to ship pre-highlighted markup from the server. No client bundle. Pick a theme, pick a language, drop the snippet in.

import { SenButton } from 'sen-ui'

export default function Example() {
  return <SenButton>Click Me</SenButton>
}

Code as text — readable first, decorated second.

Four themes, one component.

All themes are preloaded so switching is instant — no extra fetch, no client-side highlight pass.

theme

catppuccin-macchiato

Soft pastel default — calm contrast for long reads.

function greet(name: string): string {
  return `Hello, ${name}!`
}

console.log(greet('World'))

theme

dark-plus

VS Code feel — familiar to most developers.

function greet(name: string): string {
  return `Hello, ${name}!`
}

console.log(greet('World'))

theme

one-dark-pro

Atom heritage — punchy syntax, deep navy ground.

function greet(name: string): string {
  return `Hello, ${name}!`
}

console.log(greet('World'))

theme

monokai

High-contrast classic — reads great on projectors and slides.

function greet(name: string): string {
  return `Hello, ${name}!`
}

console.log(greet('World'))

Languages

Preloaded for fast SSR. Use what fits the snippet.

  • tsx
  • jsx
  • ts
  • js

maxHeight

Cap the block when a snippet would otherwise dominate the page — the inner area scrolls, the copy button stays pinned.

import { useEffect, useState } from 'react'

type User = { id: number; name: string }

export function UserList() {
  const [users, setUsers] = useState<User[]>([])

  useEffect(() => {
    fetch('/api/users')
      .then((res) => res.json())
      .then((data) => setUsers(data))
  }, [])

  return (
    <ul>
      {users.map((u) => (
        <li key={u.id}>{u.name}</li>
      ))}
    </ul>
  )
}

Server component

Rendered async at the server. The result is plain HTML — no client JS needed for the highlight, only for the copy button.

Copy built in

Top-right copy button uses the Clipboard API — no extra config and no extra dependency to install.

Drop-in usage

The whole API surface in one snippet — code in, syntax out.

import { SenCode } from 'sen-ui'

export default function Page() {
  return (
    <SenCode
      code={`const greeting = 'hello world'`}
      language="ts"
      theme="catppuccin-macchiato"
      maxHeight="320px"
    />
  )
}