Back to the list

Code container

Display some code to the user. For better experience, add highlight.js.

File to include

@import "components/code-container";
const unslugify = str => {
    return capitalize(str.replaceAll("-", " "))
}
<div class="code-container">
    <pre><code>const unslugify = str => {
        return capitalize(str.replaceAll("-", " "))
    }</code></pre>
</div>