Measured entry
magicui-code-comparison
A client-side React card that renders before-and-after code with Shiki highlighting, diff and focus annotations, theme-aware colors, and a responsive split layout. It ships as a shadcn registry component and relies on Shiki transformers, next-themes, Lucide, Tailwind utility classes, design tokens, and the shared cn helper.



Measured
Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | flagged at 375 |
| Axe critical | 0 |
| Axe serious | 1 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 1886.5 KB (1951.9 KB build, 65.4 KB baseline) |
| Bare mode | FAIL |
| Provider required | NO |
| Demo used | written from the component source API |
What the harness recorded
BARE BUILD
✗ Build failed in 37.45s error during build: [vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/code-comparison.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'
Verdict
A capable documentation-focused comparison card, but its syntax engine is costly and the tested narrow layout overflows. It also needs contrast work. It builds in the prepared harness, yet a bare app fails because it needs a shadcn-style setup, especially the shared utility import.
Use it if
- You need an embedded before-and-after code example in documentation or a product changelog.
- Your app already uses Tailwind, shadcn conventions, and theme-aware syntax highlighting.
- You want Shiki annotations for highlighted, added, removed, or focused lines.
Skip it if
- Your primary audience uses narrow screens where horizontal overflow is unacceptable.
- You have a strict bundle budget and only need a simple static code diff.
- You must ship with no known color-contrast violations.
- Your project does not use Tailwind or shadcn-style aliases and utilities.
Install
| Declared dependencies | shiki, next-themes, @shikijs/transformers |
|---|---|
| Missing on install | none |
| Bare install | fails once the shadcn-style helpers are removed, so it needs that setup |
| Provider | no provider required in the harness |
In a non-shadcn project, add Shiki, the Shiki transformers, next-themes, and Lucide React. Provide a cn class-merging helper at the expected alias or change that import, configure Tailwind with the referenced theme tokens and arbitrary variants, and wire theme context if the app supports light and dark modes.
Source and credit
This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.
Author repository
github.com/magicuidesign/magicuiAlternatives
Other published entries for the card pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- tailark-veil-content-1minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 17.6KB
- Bare
- pass
- Prov
- NO
- tailark-veil-content-2minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 17.6KB
- Bare
- pass
- Prov
- NO
- tailark-mist-content-3minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 24.1KB
- Bare
- pass
- Prov
- NO
- neobrutalism-cardbrutalism
- Renders
- YES
- A11y
- 0
- Gzip
- 29.6KB
- Bare
- pass
- Prov
- NO
- neobrutalism-ncardbrutalism
- Renders
- YES
- A11y
- 0
- Gzip
- 29.6KB
- Bare
- pass
- Prov
- NO
- reui-icon-stackminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 30.1KB
- Bare
- pass
- Prov
- NO