---
description: 'A Button component.'
labels: ['label1', 'label2', 'label3']
---

import CodeMirrorInput from './index'
import '@platformuiserver/platformui.assets/css/index.less'

## 该组件是代码在线编辑组件

### 组件使用方式

```js
<div style={{ width: '100%', border: '5px solid #e8e8e8' }}>
  <CodeMirrorInput
    value={`def foo():
  do_some_stuff()
  here
  return None

class Bar:
  __init__(self):
    if True:
      print("True")
    else:
      print("False")

  this_code_makes_no_sense():
    pass

# A comment`}
  />
</div>
```

### Using props to customize the text

Modify the text to see it change live:

```js live
<div style={{ width: '100%', border: '5px solid #e8e8e8' }}>
  <CodeMirrorInput
    value={`def foo():
  do_some_stuff()
  here
  return None

class Bar:
  __init__(self):
    if True:
      print("True")
    else:
      print("False")

  this_code_makes_no_sense():
    pass

# A comment`}
  />
</div>
```

## Properties

| 属性           | 说明 | 类型 | 默认值 | 版本  |
| -------------- | ---- | ---- | ------ | ----- |
| breadcrumbList | Text | Text | Title  | Title |
