# IndexBar Used for displaying index classification and quick positioning of lists. ## Basic Usage Wrap the `wd-index-bar` component with a fixed-height element. The component's width and height will be the same as the wrapper element. Use `wd-index-anchor` as a child component. Anchors and sidebar will be generated based on the `index` property of the anchor component. ```vue ``` ## Update List Data If the list data needs to be updated, you can refer to this example ::: details View Update List Data Example ::: code-group ```html [vue] ``` ```typescript [typescript] ``` ::: ## IndexBar Attributes | Attribute | Description | Type | Default | Version | |-----------|-------------|------|---------|----------| | sticky | Whether to enable sticky mode | boolean | false | - | | sticky-offset-top | Offset from top in sticky mode | number | 0 | - | | z-index | z-index of sticky mode | number | 1 | - | | highlight-color | Index character highlight color | string | #1989fa | - | ## IndexAnchor Attributes | Attribute | Description | Type | Default | Version | |-----------|-------------|------|---------|----------| | index | Index character | string / number | - | - | ## IndexBar Events | Event Name | Description | Parameters | Version | |------------|-------------|------------|----------| | select | Triggered when an index is selected | index: string / number | - | | change | Triggered when index changes during scrolling | index: string / number | - |