> For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt.

# slider

滑块组件，支持在指定范围内选择连续或离散数值。

<iframe src="https://developer.doubao.com/docs-preview/component-simulator/?caseId=slider"
  title="组件示例 slider"
  width="100%"
  height="700"
  loading="lazy"
  style="width:100%;height:700px;border:0;border-radius:16px;overflow:hidden;"
></iframe>

## 扫码预览

![扫码预览 slider](https://api.qrserver.com/v1/create-qr-code/?size=200x200\&data=doubao%3A%2F%2Fdoubao_apps%3Fapp_id%3Ddb_1McM5Ni%26path%3D%252Fpages%252Fcomponent%252Fslider%252Findex)

## Props

<table>
<thead>
<tr><th width="140">属性名</th><th width="240">类型</th><th width="120">默认值</th><th width="80">必填</th><th width="360">说明</th></tr>
</thead>
<tbody>
<tr><td>className</td><td><code>string</code></td><td>-</td><td>否</td><td>组件类名。</td></tr>
<tr><td>disabled</td><td><code>boolean</code></td><td>false</td><td>否</td><td>是否禁用</td></tr>
<tr><td>key</td><td><code>string | number | null</code></td><td>-</td><td>否</td><td>React key 属性</td></tr>
<tr><td>max</td><td><code>number</code></td><td>100</td><td>否</td><td>最大值</td></tr>
<tr><td>min</td><td><code>number</code></td><td>0</td><td>否</td><td>最小值</td></tr>
<tr><td>onChange</td><td><code>(value: number) =&gt; void</code></td><td>-</td><td>否</td><td>数值变化的回调</td></tr>
<tr><td>showValue</td><td><code>boolean</code></td><td>true</td><td>否</td><td>是否展示数值</td></tr>
<tr><td>style</td><td><code>CSSProperties</code></td><td>-</td><td>否</td><td>组件样式。</td></tr>
<tr><td>value</td><td><code>number</code></td><td>-</td><td>是</td><td>当前数值（必填，只支持受控用法）</td></tr>
</tbody>
</table>
