Codeblock
Codeblock displays literal source with syntax highlighting and a copy action. pass the source as a string so angle brackets and braces stay code rather than becoming part of your page.
reading-list.js
const readingList = ["The balcony garden"];
console.log(readingList.length);usage
svelte
<script>
import { Codeblock } from '@ciabi/loafkit-ui';
const code = `const readingList = ["The balcony garden"];
console.log(readingList.length);`;
</script>
<Codeblock {code} language="javascript" title="reading-list.js" />