ant-design/components/slider/demo/basic.md
2016-04-14 11:22:53 +08:00

27 lines
515 B
Markdown

---
order: 0
title: 基本
---
基本滑动条。当 `range``true` 时,渲染为双滑块。当 `disabled``true` 时,滑块处于不可用状态。
````jsx
import { Slider } from 'antd';
ReactDOM.render(<div>
<Slider defaultValue={30} />
<Slider range defaultValue={[20, 50]} />
<Slider range defaultValue={[20, 50]} disabled />
</div>
, mountNode);
````
<style>
.code-box-demo .ant-slider {
margin-bottom: 50px;
}
.code-box-demo .ant-slider:last-child {
margin-bottom: 10px;
}
</style>