> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kamu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> Common UI elements used in documentation

# Typography

export const Diagram = ({src, alt}) => {
  return <div style={{
    display: "flex",
    "flex-direction": "column",
    "align-items": "center"
  }}>
    <img src={src} alt={alt} style={{
    background: "#dddddd",
    "margin-bottom": 0
  }} />
    <span>{alt}</span>
  </div>;
};

export const YouTubeList = ({id}) => {
  const src = `https://www.youtube.com/embed/videoseries?list=${id}`;
  return <iframe className="w-full aspect-video rounded-xl" src={src} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>;
};

export const YouTube = ({id, width}) => {
  const src = `https://www.youtube.com/embed/${id}`;
  return <iframe className="w-full aspect-video rounded-xl" src={src} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen width={width}></iframe>;
};

export const Schema = ({t, id}) => {
  const anchor = id ? id : t.toLowerCase().replace(/\s+/g, "-");
  const link = `/odf/schemas#${anchor}`;
  return <a class="schema-object" href={link}>{t}</a>;
};

export const Term = ({t, id}) => {
  const anchor = id ? id : t.toLowerCase().replace(/\s+/g, "-");
  const link = `/general/glossary#${anchor}`;
  return <a class="glossary-term" href={link}>{t}</a>;
};

This section provides examples of all style elements available to documentation authors and the guidelines on using them.

## Links

We have special types of links to refer readers to:

* definitions of terms in the [Glossary](/general/glossary)
* schemas in the [ODF Schemas Reference](/odf/schemas)

**Input:**

```
import {Term, Schema} from '/components/common.jsx'

Raw data is stored in <Term t="slices" id="data-slice"/> that
are linked from <Schema t="MetadataBlock"/>s.
```

**Result:**

Raw data is stored in <Term t="slices" id="data-slice" /> that are linked from <Schema t="MetadataBlock" />s.

## Code Blocks

**Input:**

````mdx theme={null} theme={null}
```js
const client = OdfClient::new("odf+https://localhost:8080");
```
````

**Result:**

```js theme={null}
const client = OdfClient::new("odf+https://localhost:8080");
```

## Text Blocks

**Input:**

```markdown theme={null}
<Tip>
Tip block
</Tip>

<Note>
Note block
</Note>

<Info>
Info block
</Info>

<Warning>
Warning block
</Warning>

<Danger>
Danger block
</Danger>
```

**Result:**

<Tip>
  Tip block
</Tip>

<Note>
  Note block
</Note>

<Info>
  Info block
</Info>

<Warning>
  Warning block
</Warning>

<Danger>
  Danger block
</Danger>

## Tables

Input:

```markdown theme={null}
| Name | Description |
| ---- | :---------: |
| Foo  |    Test     |
| Bar  |    Test     |
```

Result:

| Name | Description |
| ---- | :---------: |
| Foo  |     Test    |
| Bar  |     Test    |

## Tabs

**Input:**

```markdown theme={null}
<Tabs>
  <Tab title="First tab">
    Tab 1 content with plain text
  </Tab>

  <Tab title="Second tab">
    Tab 2 with markdown
    - as
    - list
  </Tab>

  <Tab title="Third tab">
    <Info>Tab 3 content with rich elements</Info>
  </Tab>
</Tabs>
```

**Result:**

<Tabs>
  <Tab title="First tab">
    Tab 1 content with plain text
  </Tab>

  <Tab title="Second tab">
    Tab 2 with markdown

    * as
    * list
  </Tab>

  <Tab title="Third tab">
    <Info>Tab 3 content with rich elements</Info>
  </Tab>
</Tabs>

## Static Image

**Input:**

```markdown theme={null}
<img 
  src="/images/kamu-logo-dark.svg" 
  alt="Kamu logo"
  style={{width: "30%"}}
  className="rounded-lg"
/>
```

Result:

<img src="https://mintcdn.com/kamu/j1tx5fgzyFHd1DYS/images/kamu-logo-dark.svg?fit=max&auto=format&n=j1tx5fgzyFHd1DYS&q=85&s=8c6d0d7ffa23ef050859453f64354192" alt="Kamu logo" style={{width: "30%"}} className="rounded-lg" width="935" height="224" data-path="images/kamu-logo-dark.svg" />

## YouTube Video

**Input:**

```markdown theme={null}
import {YouTube} from '/components/common.jsx'

<YouTube id="hN_vpHYmwi0"/>
```

**Result:**

<YouTube id="hN_vpHYmwi0" />

## YouTube Playlist

**Input:**

```markdown theme={null}
import {YouTubeList} from '/components/common.jsx'

<YouTubeList id="PLV91cS45lwVG20Hicztbv7hsjN6x69MJk"/>
```

**Result:**

<YouTubeList id="PLV91cS45lwVG20Hicztbv7hsjN6x69MJk" />

## Mermaid Diagrams

**Input:**

````mdx theme={null} theme={null}
```mermaid
sequenceDiagram
    Alice ->> Bob: Hello Bob, how are you?
    Bob-->>John: How about you John?
    Bob--x Alice: I am good thanks!
    Bob-x John: I am good thanks!
    Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.

    Bob-->Alice: Checking with John...
    Alice->John: Yes... John, how are you?
```
````

**Result:**

```mermaid theme={null}
sequenceDiagram
    Alice ->> Bob: Hello Bob, how are you?
    Bob-->>John: How about you John?
    Bob--x Alice: I am good thanks!
    Bob-x John: I am good thanks!
    Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.

    Bob-->Alice: Checking with John...
    Alice->John: Yes... John, how are you?

```

See more examples [here](https://mermaid.js.org/syntax/examples.html).
