@inkset/code
Shiki-powered code block plugin for Inkset.
Install
npm install @inkset/code shiki
Usage
import { Inkset } from "@inkset/react";
import { createCodePlugin } from "@inkset/code";
const plugins = [createCodePlugin({ theme: "github-dark" })];
export const Example = ({ content }: { content: string }) => {
return <Inkset content={content} plugins={plugins} />;
};
Options
theme— primary (dark-mode) shiki theme. Default"github-dark".lightTheme— companion theme rendered under@media (prefers-color-scheme: light).showHeader— language label + copy button bar. Defaulttrue.showCopy— copy button inside the header. Defaulttrue.showLangLabel— language badge on the left of the header. Defaulttrue.wrapLongLines— wrap long lines instead of horizontal scrolling. Defaultfalse.
See the repo root for the broader Inkset architecture and playground examples.