---
title: Code drawers
slug: test-archbee/code-drawers
description: This document showcases three practical examples of code drawers, enabling the display of code examples in a visually appealing three-column layout. Including code written in JavaScript and Python, these examples provide a comprehensive demonstration of t
docTags: 
createdAt: 2022-07-04T12:42:31.000Z
---

Code drawers are a great way to show code examples in a three-column layout.

Here's one:‘‘‘

::::CodeDrawer{title="A code drawer" isResponseExpanded="true" autoGeneratedAnchorSlug="a-code-drawer" legacyHash="bv8yEBqP6BipewxkKWdDE"}
:::CodeblockTabsExamples
```javascript
let x, y, z;  // Statement 1
x = 5;        // Statement 2
y = 6;        // Statement 3
z = x + y;    // Statement 4

document.getElementById("demo").innerHTML =
"The value of z is " + z + ".";  
```

```python
# Program to find the sum of all numbers stored in a list

# List of numbers
numbers = [6, 5, 3, 8, 4, 2, 5, 4, 11]

# variable to store the sum
sum = 0

# iterate over the list
for val in numbers:
    sum = sum+val

print("The sum is", sum)
```
:::

:::CodeblockTabsResponses
```javascript
```
:::
::::

Here's another one.

::::CodeDrawer{title="Another code drawer" isResponseExpanded="true" autoGeneratedAnchorSlug="another-code-drawer" legacyHash="266f4B1q_A82lqMkWU8t2"}
:::CodeblockTabsExamples
```javascript
let x, y, z;  // Statement 1
x = 5;        // Statement 2
y = 6;        // Statement 3
z = x + y;    // Statement 4

document.getElementById("demo").innerHTML =
"The value of z is " + z + ".";  
```

```python
# Program to find the sum of all numbers stored in a list

# List of numbers
numbers = [6, 5, 3, 8, 4, 2, 5, 4, 11]

# variable to store the sum
sum = 0

# iterate over the list
for val in numbers:
    sum = sum+val

print("The sum is", sum)
```
:::

:::CodeblockTabsResponses
```javascript
```
:::
::::

And a screenshot while editing:

![](https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/kbx_YaJkagc8DztKeSYkR_code-drawer-light.png "Code drawers")

## Markdown

Use the following Markdown to generate code drawer blocks:

````markdown
### Test codedrawer

::::codedrawer{title="a code drawer"}
:::codeblocktabs-examples
```php
// Some wordpress plugi
 // Add our plugin's option page to the WP admin menu.
  public function add_plugin_options_page() {
    add_options_page(
      'Example Plugin Settings',
      'Example Plugin Settings',
      'manage_options',
      'ex',
      [$this, 'render_admin_page']
    );
  }
```
```go
// Next should be used only inside middleware.
// It executes the pending handlers in the chain inside the calling handler.
// See example in GitHub.
func (c *Context) Next() {
    c.index++
    for c.index < int8(len(c.handlers)) {
        c.handlers[c.index](c)
        c.index++
    }
}
```
```javascript
// demo js
```
:::
:::codeblocktabs-responses
```json
// 404 -  not found
{
  requireFingerprintScope: true,
  maxMachines: 1,
  concurrent: false,
  floating: false,
  protected: true,
  strict: true
}
```
:::
::::
````

***

::::LinkArray
:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-C1IcmVcG0rx4ZLHX6X7V7-20250911-192557.png"}
&#x20;**&#x20;Find other blocks**

Discover new ways and blocks to create stunning and functional documentation pages.

[Check out all blocks](<././Editor Blocks.md>)&#x20;
:::

:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-YRyGGWKsNS1ZZJa5XJy0z-20250911-192608.png"}
\&#xNAN;**&#x20; Need help?  ⬇️**

Use the **blue** **chat bubble&#x20;**&#x66;rom bottom right corner.

Or try **AI Chat** (from search box) for quick answers.
:::

:::LinkArrayItem{headerType="IMAGE" headerImage="https://api.archbee.com/api/optimize/K_JWZranXy1tD6qvlG2v6-MS_ubDHlXgoktt4svD2rL-20250911-192619.png"}
\&#xNAN;**&#x20;  Your opinion matters**

Use the below feedback form, anonymously.

Or ask a question in **Q\&A section** and our team or AI will give you a solution.
:::
::::
