ui.Slider
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ड्रैग किया जा सकने वाला टारगेट, जो दो संख्यात्मक वैल्यू के बीच रैखिक रूप से होता है. स्लाइडर की वैल्यू, उसके साथ लेबल के तौर पर दिखती है.
इस्तेमाल | रिटर्न |
---|
ui.Slider(min, max, value, step, onChange, direction, disabled, style) | ui.Slider |
आर्ग्यूमेंट | टाइप | विवरण |
---|
min | नंबर, ज़रूरी नहीं | कम से कम वैल्यू. डिफ़ॉल्ट रूप से, यह वैल्यू 0 पर सेट होती है. |
max | नंबर, ज़रूरी नहीं | सबसे बड़ी वैल्यू. डिफ़ॉल्ट वैल्यू 1 होती है. |
value | नंबर, ज़रूरी नहीं | शुरुआती वैल्यू. डिफ़ॉल्ट रूप से, यह वैल्यू 0 पर सेट होती है. |
step | नंबर, ज़रूरी नहीं | स्लाइडर के लिए स्टेप साइज़. डिफ़ॉल्ट रूप से, यह वैल्यू 0.01 पर सेट होती है. |
onChange | फ़ंक्शन, ज़रूरी नहीं है | स्लाइडर की स्थिति बदलने पर ट्रिगर होने वाला कॉलबैक. कॉलबैक को स्लाइडर की मौजूदा वैल्यू और स्लाइडर विजेट पास किया जाता है. |
direction | स्ट्रिंग, ज़रूरी नहीं | स्लाइडर की दिशा. 'हॉरिजॉन्टल' या 'वर्टिकल' में से कोई एक. डिफ़ॉल्ट रूप से, यह 'horizontal' पर सेट होती है. |
disabled | बूलियन, ज़रूरी नहीं | स्लाइडर बंद है या नहीं. डिफ़ॉल्ट रूप से, यह 'गलत' पर सेट होती है. |
style | ऑब्जेक्ट, ज़रूरी नहीं है | सीएसएस की उन स्टाइल का ऑब्जेक्ट जिन्हें इस विजेट के लिए सेट किया जा सकता है. style() फ़ंक्शन का दस्तावेज़ देखें. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe \u003ccode\u003eui.Slider\u003c/code\u003e widget enables users to interactively select a numeric value within a defined range, visually represented by a draggable slider.\u003c/p\u003e\n"],["\u003cp\u003eIt offers customization options like minimum/maximum values, step size, initial value, orientation, and an onChange callback to respond to user interactions.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can further tailor its appearance using custom CSS styles through the \u003ccode\u003estyle\u003c/code\u003e argument.\u003c/p\u003e\n"]]],["The `ui.Slider` component creates a draggable slider between a minimum (`min`) and maximum (`max`) numeric value. It displays the current `value` with a label, adjustable by a defined `step`. The `direction` can be horizontal or vertical. An optional `onChange` function triggers on value changes, passing the current value. The slider can be `disabled`, and `style` properties are customizable. Default values are provided for `min`, `max`, `value`, and `step`.\n"],null,["# ui.Slider\n\n\u003cbr /\u003e\n\nA draggable target that ranges linearly between two numeric values. The value of the slider is displayed as a label alongside it.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------------------------------|-----------|\n| `ui.Slider(`*min* `, `*max* `, `*value* `, `*step* `, `*onChange* `, `*direction* `, `*disabled* `, `*style*`)` | ui.Slider |\n\n| Argument | Type | Details |\n|-------------|--------------------|------------------------------------------------------------------------------------------------------------------------------|\n| `min` | Number, optional | The minimum value. Defaults to 0. |\n| `max` | Number, optional | The maximum value. Defaults to 1. |\n| `value` | Number, optional | The initial value. Defaults to 0. |\n| `step` | Number, optional | The step size for the slider. Defaults to 0.01. |\n| `onChange` | Function, optional | A callback to fire when the slider's state changes. The callback is passed the slider's current value and the slider widget. |\n| `direction` | String, optional | The direction of the slider. One of 'horizontal' or 'vertical'. Defaults to 'horizontal'. |\n| `disabled` | Boolean, optional | Whether the slider is disabled. Defaults to false. |\n| `style` | Object, optional | An object of allowed CSS styles with their values to be set for this widget. See style() documentation. |"]]