Code Block

A token-styled code container with a language label and a built-in CopyButton. Supports line numbers and horizontal scroll for long lines. Zero syntax-highlighting dependencies — drop in a highlighter library on top if needed.

Shell command

CopyButton is composed directly into the header. Language label is optional.

bash
npm install @karigiri-kit/core

JSX / TSX

tsx
import { Button, Card, PromptInput } from '@karigiri-kit/core'
import '@karigiri-kit/core/dist/style.css'

export default function App() {
  const [value, setValue] = useState('')
  return (
    <Card>
      <PromptInput
        value={value}
        onChange={setValue}
        onSubmit={v => console.log(v)}
      />
    </Card>
  )
}

With line numbers

Pass showLineNumbers for longer snippets.

tsx
import { Button, Card, PromptInput } from '@karigiri-kit/core'
import '@karigiri-kit/core/dist/style.css'

export default function App() {
  const [value, setValue] = useState('')
  return (
    <Card>
      <PromptInput
        value={value}
        onChange={setValue}
        onSubmit={v => console.log(v)}
      />
    </Card>
  )
}

CSS (rebrand example)

css
:root {
  --kg-color-primary:        #6366f1;
  --kg-color-primary-hover:  #4f46e5;
  --kg-color-primary-subtle: #eef2ff;
  --kg-font-sans:            'Inter', sans-serif;
  --kg-radius-md:            0.75rem;
}