Open this example in the interactive library
Live preview
Source code
// components/WhitespaceRevealView.tsx
export default function WhitespaceRevealView({
source = "Copper Studio North",
}: { source?: string } = {}) {
return (
<pre>
{source.replaceAll(" ", "·").replaceAll("\t", "→").replaceAll("\n", "↵\n")}
</pre>
);
}
