Code
To use only Fire UI code feature, copy and paste the stylesheet link into your head
element to load Fire UI code CSS.
<link rel="stylesheet" type="text/css" href="https://unpkg.com/@fire-ui/fire-ui@0.1.1/src/feature/Code/code.css">
How to use
To display inline code, simply use <code>
tag element in your HTML. Use <pre>
tag element in your HTML
for multiline code.
NOTE that you must remember to replace <
and >
with <
and >
or
it will rendered as HTML
Example
Code
tag
<script>alert("Hello World");</script>
<code><script>alert("Hello World");</script></code>
Pre
tag
<!-- Fire UI has not released yet --> <!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Fire UI CSS --> <link rel="stylesheet" type="text/css" href=""> <!-- Fire UI Javascript --> <script src=""></script> <title>Hello, world!</title> </head> <body> <h1>Hello, world!</h1> </body> </html>
<pre> <!-- Fire UI has not released yet --> <!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Fire UI CSS --> <link rel="stylesheet" type="text/css" href=""> <!-- Fire UI Javascript --> <script src=""></script> <title>Hello, world!</title> </head> <body> <h1>Hello, world!</h1> </body> </html> </pre>