MCPcopy Create free account
hub / github.com/kobaltedev/kobalte / CustomValueLabelExample

Function CustomValueLabelExample

apps/docs/src/examples/slider.tsx:126–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124}
125
126export function CustomValueLabelExample() {
127 return (
128 <Slider
129 class={style.SliderRoot}
130 minValue={10}
131 maxValue={2000}
132 defaultValue={[20, 500]}
133 getValueLabel={(params) => `$${params.values[0]} - $${params.values[1]}`}
134 >
135 <div class={style.SliderLabel}>
136 <Slider.Label>Money</Slider.Label>
137 <Slider.ValueLabel />
138 </div>
139 <Slider.Track class={style.SliderTrack}>
140 <Slider.Fill class={style.SliderRange} />
141 <Slider.Thumb class={style.SliderThumb}>
142 <Slider.Input />
143 </Slider.Thumb>
144 <Slider.Thumb class={style.SliderThumb}>
145 <Slider.Input />
146 </Slider.Thumb>
147 </Slider.Track>
148 </Slider>
149 );
150}
151
152export function ControlledExample() {
153 const [values, setValues] = createSignal<number[]>([40]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected