---
title: 组件示例
order: 2
---

## 基础用法

```jsx
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { DemoWrapper, SubscreenTitle, config } from '@linkdesign/screen';

const { _cssPrefix } = config;

class App extends Component {
  render() {
    return (
      <DemoWrapper id="demo-SubscreenTitle">
        <SubscreenTitle
          onChange={(key) => { console.log(key); }}
          dataSource={['概览统计', '实时事件', '设备感知']}
          defaultActiveKey="设备感知"
        />
      </DemoWrapper>
    );
  }
}

ReactDOM.render((
  <App />
), mountNode);
```
