Skip to main content

Extended Components

You can use these markdown or React components for better look and understanding.

Emoji

Thumb Up! :+1:
Example 1 :rage: :smiley: :scream: :heart: :fire: :point_left:
Example 2 :ok: :arrow_forward: :new: :recycle: :clock1: :bangbang: :o: :x: :heavy_check_mark: :white_check_mark: :red_circle:

Thumb Up! 👍

Example 1 😡 😃 😱 ❤️ 🔥 👈

Example 2 🆗 ▶️ 🆕 ♻️ 🕐 ‼️ ⭕ ❌ ✔️ ✅ 🔴

NOTE

you can find complete list here: https://gist.github.com/rxaviers/7360908

Keyboard Tag

Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy text

Press Ctrl+C to copy text

Details

Markdown can embed HTML elements, and details HTML elements are beautifully styled:

Details element example

<details>
<summary>Toggle me!</summary>
<div>
<div>This is the detailed content</div>
</div>
</details>
Toggle me!
This is the detailed content

Math Equations

Mathematical equations can be rendered using KaTeX. Please read KaTeX documentation for more details.

Inline

Write inline math equations by wrapping LaTeX equations between $:

Let $f\colon[a,b]\to\R$ be Riemann integrable. Let $F\colon[a,b]\to\R$ be
$F(x)=\int_{a}^{x} f(t)\,dt$. Then $F$ is continuous, and at all $x$ such that
$f$ is continuous at $x$, $F$ is differentiable at $x$ with $F'(x)=f(x)$.

Let f ⁣:[a,b]Rf\colon[a,b]\to\R be Riemann integrable. Let F ⁣:[a,b]RF\colon[a,b]\to\R be F(x)=axf(t)dtF(x)=\int_{a}^{x} f(t)\,dt. Then FF is continuous, and at all xx such that ff is continuous at xx, FF is differentiable at xx with F(x)=f(x)F'(x)=f(x).

Blocks

For equation block or display mode, use math code block:

```math
I = \int_0^{2\pi} \sin(x)\,dx
```
I=02πsin(x)dxI = \int_0^{2\pi} \sin(x)\,dx

Code blocks

You can add a title to the code block by adding a title key after the language (leave a space between them).

```jsx title="/src/components/HelloCodeTitle.js"
function HelloCodeTitle(props) {
return <h1>Hello, {props.name}</h1>;
}
```

Show

/src/components/HelloCodeTitle.js
function HelloCodeTitle(props) {
return <h1>Hello, {props.name}</h1>;
}

Line highlighting

You can use comments with highlight-next-line, highlight-start, and highlight-end to select which lines are highlighted.

```js
function HighlightSomeText(highlight) {
if (highlight) {
// highlight-next-line
return 'This text is highlighted!';
}

return 'Nothing highlighted';
}

function HighlightMoreText(highlight) {
// highlight-start
if (highlight) {
return 'This range is highlighted!';
}
// highlight-end

return 'Nothing highlighted';
// This will error
val a = a;
}
```

Show

function HighlightSomeText(highlight) {
if (highlight) {
return 'This text is highlighted!';
}

return 'Nothing highlighted';
}

function HighlightMoreText(highlight) {
if (highlight) {
return 'This range is highlighted!';
}

return 'Nothing highlighted';
val a = a;
}

You can also specify highlighted line ranges within the language meta string (leave a space after the language). To highlight multiple lines, separate the line numbers by commas or use the range syntax to select a chunk of lines. This feature uses the parse-number-range library and you can find more syntax on their project details.

```jsx {1,4-6,11}
import React from 'react';

function MyComponent(props) {
if (props.isBar) {
return <div>Bar</div>;
}

return <div>Foo</div>;
}

export default MyComponent;
```

Show

import React from 'react';

function MyComponent(props) {
if (props.isBar) {
return <div>Bar</div>;
}

return <div>Foo</div>;
}

export default MyComponent;

Line numbering

You can enable line numbering for your code block by using showLineNumbers key within the language meta string (don't forget to add space directly before the key).

```jsx {1,4-6,11} showLineNumbers
import React from 'react';

function MyComponent(props) {
if (props.isBar) {
return <div>Bar</div>;
}

return <div>Foo</div>;
}

export default MyComponent;
```

Show

import React from 'react';

function MyComponent(props) {
if (props.isBar) {
return <div>Bar</div>;
}

return <div>Foo</div>;
}

export default MyComponent;

Github Alerts Quotes

> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

NOTE

Useful information that users should know, even when skimming content.

TIP

Helpful advice for doing things better or more easily.

IMPORTANT

Key information users need to know to achieve their goal.

WARNING

Urgent info that needs immediate user attention to avoid problems.

CAUTION

Advises about risks or negative outcomes of certain actions.

Admonitions

In addition to the basic Markdown syntax, we have a special admonitions syntax by wrapping text with a set of 3 colons, followed by a label denoting its type.

Example:

:::note

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::

:::tip

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::

:::info

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::

:::warning

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::

:::danger

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

:::
note

Some content with Markdown syntax. Check this api.

tip

Some content with Markdown syntax. Check this api.

info

Some content with Markdown syntax. Check this api.

warning

Some content with Markdown syntax. Check this api.

danger

Some content with Markdown syntax. Check this api.

Specifying title

You may also specify an optional title.

:::note[Your Title **with** some _Markdown_ `syntax`!]

Some **content** with some _Markdown_ `syntax`.

:::

Images

You can display images in three different ways: Markdown syntax, CJS require, or ES imports syntax.

Display images using simple Markdown syntax:

![Example banner](./assets/docusaurus-asset-example-banner.png)

CommonJs

<img
src={require('./assets/docusaurus-asset-example-banner.png').default}
alt="Example banner"
/>

JSX

import myImageUrl from './assets/docusaurus-asset-example-banner.png';

<img src={myImageUrl} alt="Example banner" />;

Files

In the same way, you can link to existing assets by require'ing them and using the returned URL in videos, a anchor links, etc.

# My Markdown page

<a target="\_blank" href={require('./assets/docusaurus-asset-example.docx').default}> Download this docx </a>

or

[Download this docx using Markdown](./assets/docusaurus-asset-example.docx)