Skip to content

Code

Inline code and code blocks in the noodle's monospace font.

Inline and block

Set the design with data-noodle on the root element.

<html data-noodle="udon" data-mode="dark">
  <button class="mn-btn">Hello</button>
</html>

Installation

Everything ships in one stylesheet. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">

Prefer to own the files? /r/code.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-codeInline <code>.
mn-preBlock <pre>.

Accessibility

  • Code blocks scroll horizontally; they are focusable only if you add tabindex="0", which you should for long blocks.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page