BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Kibo UI Registry/code-block

code-block

kibo-ui-registry/code-block
FreeComponent

Provides syntax highlighting, line numbers, and copy to clipboard functionality for code blocks.

Live preview

live · rendered by the registry
Rendered by Kibo UI Registry on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://www.kibo-ui.com/r/code-block.json

Source

index.tsxwww.kibo-ui.com/r/code-block.json · first 6 KB
1"use client";
2
3import { useControllableState } from "@radix-ui/react-use-controllable-state";
4import {
5 transformerNotationDiff,
6 transformerNotationErrorLevel,
7 transformerNotationFocus,
8 transformerNotationHighlight,
9 transformerNotationWordHighlight,
10} from "@shikijs/transformers";
11import { CheckIcon, CopyIcon } from "lucide-react";
12import type {
13 ComponentProps,
14 HTMLAttributes,
15 ReactElement,
16 ReactNode,
17} from "react";
18import {
19 cloneElement,
20 createContext,
21 useContext,
22 useEffect,
23 useState,
24} from "react";
25import type { IconType } from "react-icons";
26import {
27 SiAstro,
28 SiBiome,
29 SiBower,
30 SiBun,
31 SiC,
32 SiCircleci,
33 SiCoffeescript,
34 SiCplusplus,
35 SiCss3,
36 SiCssmodules,
37 SiDart,
38 SiDocker,
39 SiDocusaurus,
40 SiDotenv,
41 SiEditorconfig,
42 SiEslint,
43 SiGatsby,
44 SiGitignoredotio,
45 SiGnubash,
46 SiGo,
47 SiGraphql,
48 SiGrunt,
49 SiGulp,
50 SiHandlebarsdotjs,
51 SiHtml5,
52 SiJavascript,
53 SiJest,
54 SiJson,
55 SiLess,
56 SiMarkdown,
57 SiMdx,
58 SiMintlify,
59 SiMocha,
60 SiMysql,
61 SiNextdotjs,
62 SiPerl,
63 SiPhp,
64 SiPostcss,
65 SiPrettier,
66 SiPrisma,
67 SiPug,
68 SiPython,
69 SiR,
70 SiReact,
71 SiReadme,
72 SiRedis,
73 SiRemix,
74 SiRive,
75 SiRollupdotjs,
76 SiRuby,
77 SiSanity,
78 SiSass,
79 SiScala,
80 SiSentry,
81 SiShadcnui,
82 SiStorybook,
83 SiStylelint,
84 SiSublimetext,
85 SiSvelte,
86 SiSvg,
87 SiSwift,
88 SiTailwindcss,
89 SiToml,
90 SiTypescript,
91 SiVercel,
92 SiVite,
93 SiVuedotjs,
94 SiWebassembly,
95} from "react-icons/si";
96import {
97 type BundledLanguage,
98 type CodeOptionsMultipleThemes,
99 codeToHtml,
100} from "shiki";
101import { Button } from "@/components/ui/button";
102import {
103 Select,
104 SelectContent,
105 SelectItem,
106 SelectTrigger,
107 SelectValue,
108} from "@/components/ui/select";
109import { cn } from "@/lib/utils";
110
111export type { BundledLanguage } from "shiki";
112
113const filenameIconMap = {
114 ".env": SiDotenv,
115 "*.astro": SiAstro,
116 "biome.json": SiBiome,
117 ".bowerrc": SiBower,
118 "bun.lockb": SiBun,
119 "*.c": SiC,
120 "*.cpp": SiCplusplus,
121 ".circleci/config.yml": SiCircleci,
122 "*.coffee": SiCoffeescript,
123 "*.module.css": SiCssmodules,
124 "*.css": SiCss3,
125 "*.dart": SiDart,
126 Dockerfile: SiDocker,
127 "docusaurus.config.js": SiDocusaurus,
128 ".editorconfig": SiEditorconfig,
129 ".eslintrc": SiEslint,
130 "eslint.config.*": SiEslint,
131 "gatsby-config.*": SiGatsby,
132 ".gitignore": SiGitignoredotio,
133 "*.go": SiGo,
134 "*.graphql": SiGraphql,
135 "*.sh": SiGnubash,
136 "Gruntfile.*": SiGrunt,
137 "gulpfile.*": SiGulp,
138 "*.hbs": SiHandlebarsdotjs,
139 "*.html": SiHtml5,
140// … truncated

What it pulls in

npm packages

  • @radix-ui/react-use-controllable-state
  • @shikijs/transformers
  • lucide-react
  • react-icons
  • shiki

Other registry items

  • button
  • select

Files it writes

  • index.tsx
  • server.tsx

Facts

Registry
Kibo UI Registry
Type
registry:ui
Access
Free
Files written
2
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on Kibo UI Registry www.kibo-ui.com Raw registry item This item as JSON

More from Kibo UI Registry

All 41 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
announcementannouncementKibo UI RegistryComponentsFreeno deps
avatar-stackavatar-stackKibo UI RegistryComponentsFreeno deps
bannerbannerKibo UI RegistryComponentsFree2 deps
calendarcalendarKibo UI RegistryComponentsFree3 deps
choiceboxchoiceboxKibo UI RegistryComponentsFree2 deps
color-pickercolor-pickerKibo UI RegistryComponentsFree3 deps
comboboxcomboboxKibo UI RegistryComponentsFree2 deps
comparisoncomparisonKibo UI RegistryComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex