mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 20:19:44 +08:00
593 B
593 B
order | title | ||||
---|---|---|---|---|---|
8 |
|
zh-CN
设置 reverse
可以将滑动条置反。
en-US
Using reverse
to render slider reversely.
import { Slider, Switch } from 'antd';
import React, { useState } from 'react';
const App: React.FC = () => {
const [reverse, setReverse] = useState(true);
return (
<>
<Slider defaultValue={30} reverse={reverse} />
<Slider range defaultValue={[20, 50]} reverse={reverse} />
Reversed: <Switch size="small" checked={reverse} onChange={setReverse} />
</>
);
};
export default App;