Expandable
An expandable code block
Install
$ pnpm dlx shadcn@latest add https://docskit.codehike.org/r/expandable?token=*****
Sign in to unlock your token. View pricing for details.
Add the expandable
handler:
@/components/code.handlers.tsx
+import { expandable } from "./expandable"export function getHandlers(options: CodeGroup["options"]) {return [line,+expandable,]}
ExampleTry it in the Playground
content.mdx
```js index.js -ncfunction lorem(ipsum) {const a = 1const b = 2const c = 3const d = 4const e = 5// !expandableconst f = 6const g = 7const h = 8const i = 9const j = 10const k = 11const l = 12}```
preview
index.js
1function lorem(ipsum) {2const a = 13const b = 24const c = 35const d = 46const e = 5