सीधे मुख्य कॉन्टेंट पर जाएँ
menumenu tanreiexpand_morecontrasttranslate
tanreiexpand_more
शुरुआत करेंWebReactSwiftUIJetpack ComposeFlutterReact Nativeप्रीसेटआपका अपना डिज़ाइन सिस्टमAI एजेंट के साथ Tanrei का इस्तेमालब्रांडडिज़ाइन टोकनडिज़ाइन सिस्टम और कस्टमाइज़ेशनTheme Studioरंगटाइपोग्राफ़ीआइकनशेपएलिवेशनमोशनइंटरैक्शन स्टेटव्यवहारलेआउटसुलभताशब्दकलर टोकनटाइप स्केल टोकनशेप टोकनएलिवेशन टोकनमोशन टोकनस्टेट टोकनस्पेस और माप के टोकनकंपोनेंटबटनमुख्य ऐक्शन बटनसेगमेंटेड बटनबटन ग्रुपमेन्यू वाला बटनटूलबारकॉपी बटनचेकबॉक्सरेडियो बटनस्विचचिपमेन्यूस्लाइडरस्लाइडर फ़ील्डकैलेंडरDateTimePickerफ़ील्ड ग्रुपरेडियो ग्रुपचेकबॉक्स ग्रुपसिलेक्टसिलेक्ट फ़ील्डमेन्यू बारफ़ाइल अपलोडफ़ाइल पिकर उन्नतड्रॉप ज़ोनटेक्स्ट इनपुट उन्नतटेक्स्ट फ़ील्डचिप फ़ील्डफ़ील्डकॉम्बोबॉक्स उन्नतकॉम्बोबॉक्स फ़ील्डनंबर इनपुट उन्नतनंबर फ़ील्डकलर इनपुट उन्नतकलर फ़ील्डवन-टाइम कोड इनपुट उन्नतवन-टाइम कोड फ़ील्डएम्बेडेड टेक्स्ट इनपुट उन्नतचैट कंपोज़रकार्डडिवाइडरमोडल लेयर उन्नतडायलॉगलिस्टलिस्ट पंक्तिबॉटम शीटसाइड शीटकैरसेलकोड ब्लॉकटेबलपॉपओवरचरणअकॉर्डियनडिस्क्रिप्शन लिस्टफ़िगरऐप शेलपेज हेडरट्री व्यूटाइमलाइनइमेज प्रीव्यूसाइज़ हैंडलसाइज़ बदलने वाला फ़्रेमस्क्रॉल एरियाबैजप्रोग्रेस इंडिकेटरमीटरनंबर टिकरलोडिंग इंडिकेटरस्नैकबारटूलटिपकीबोर्ड शॉर्टकटटैगइनलाइन कोडकॉलआउटअवतारख़ाली स्टेटटैग ग्रुपस्केलेटनफ़ाइल आइटमस्वॉचमार्की टेक्स्टटैबटैब व्यूऐप बारनेविगेशन बारनेविगेशन ड्रॉअरखोजलिंकपेजिनेशनपिछला और अगला लिंकस्टेपरब्रेडक्रंबविषय सूचीलिंक कार्डFAB मेन्यूस्थितिTanrei कैसे बनता हैयोगदानलाइसेंस और श्रेय
होमकंपोनेंटसाइज़ बदलने वाला फ़्रेम

साइज़ बदलने वाला फ़्रेम

एक बॉक्स जिसकी चौड़ाई और ऊँचाई कोई उसके किनारे या कोने के हैंडल से, कीबोर्ड से, या एक बार दबाकर बदलता है। outlined रूप में यह वह जगह है जहाँ किसी प्रीव्यू को फ़ोन की और लैपटॉप की चौड़ाई पर जाँचा जाता है; plain रूप में यह नेविगेशन ड्रॉअर या साइडबार का किनारा है।

content_copyMarkdown में देखें
श्रेणी
कंटेनमेंट
टोकन
comp.resizable-frame
स्तर
संयोजित
इनसे बना है
Handle

अवलोकन

Web
tanrei-resizable-frame
clock_loader_40
SwiftUI
TanreiResizableFrame
radio_button_unchecked
Jetpack Compose
TanreiResizableFrame
radio_button_unchecked
Flutter
TanreiResizableFrame
radio_button_unchecked
React Native
ResizableFrame
radio_button_unchecked

इससे जनरेट किया गया: docs/status/status.json, specs/resizable-frame.spec.json

एक प्रीव्यू जिसका साइज़ कोई उसके आख़िरी किनारे, निचले किनारे और कोने से बदलता है

कोई हैंडल खींचें, या Tab से किसी हैंडल पर जाकर ऐरो कुंजियाँ इस्तेमाल करें।

साइज़ बदलने वाला फ़्रेम अपने भीतर की चीज़ को ऐसी चौड़ाई और ऊँचाई देता है जिसे कोई बदल सकता है। उसके हैंडल साइज़ हैंडल हैं: खींचने पर वे साइज़ बदलते हैं; कीबोर्ड से हिलाने पर एक-एक कदम बदलते हैं; बिना खींचे दबाने पर सबसे बड़े साइज़ और उससे पहले वाले साइज़ के बीच बदलते हैं। फ़्रेम साइज़ रखता है, जब कोई साइज़ बदल दे तो आपको बताता है, और हर हैंडल को साइज़ उसके मान के रूप में देता है, ताकि सहायक तकनीक उसे पढ़ सके।

इसके दो रूप हैं। Outlined गोल कोनों और एक बारीक रेखा वाला बॉक्स है, जिसके हैंडल उसके बाहर रहते हैं ताकि वे कुछ न ढकें: यह जाँचने की जगह कि कोई पेज या कंपोनेंट उसे दी गई जगह के हिसाब से कैसे ढलता है। Plain अपना कुछ नहीं बनाता: कॉन्टेंट अपनी सरफ़ेस ख़ुद बनाता है, और हर हैंडल उसके किनारे पर लगता है, जैसे कोई नेविगेशन ड्रॉअर जिसे कोई लंबे नामों के लिए चौड़ा करता है, या कोई साइडबार जिसे बग़ल के काम के लिए पतला किया जाता है।

वेब पर यह <tanrei-resizable-frame> है। बाक़ी प्लैटफ़ॉर्म ने इसे अभी इम्प्लीमेंट नहीं किया है।

इस्तेमाल

<!-- फ़ोन, टैबलेट और लैपटॉप की चौड़ाई पर जाँचा जाने वाला प्रीव्यू: खींचते समय यह हर चौड़ाई पर स्नैप होता है। -->
<tanrei-resizable-frame width="390" height="640" snap-widths="360 600 1024" width-label="प्रीव्यू की चौड़ाई बदलें">
  <iframe title="प्रीव्यू" src="/preview"></iframe>
</tanrei-resizable-frame>

<!-- लेआउट के आख़िर में एक साइडबार: plain, जिसका साइज़ उसके शुरू के किनारे से बदलता है। -->
<tanrei-resizable-frame id="side" variant="plain" handles="start" min-width="240" max-width="560" size-indicator="none" width-label="साइडबार का साइज़ बदलें">
  <aside>…</aside>
</tanrei-resizable-frame>

<script type="module">
  import '@tanrei/web/components/resizable-frame';
  const side = document.querySelector('#side');
  // व्यक्ति की चुनी चौड़ाई को एक विज़िट से अगली विज़िट तक रखें।
  side.width = Number(localStorage.getItem('side-bar')) || 320;
  side.addEventListener('change', (e) => localStorage.setItem('side-bar', String(e.detail.width)));
</script>
import { ResizableFrame } from '@tanrei/react';

<ResizableFrame
  variant="plain"
  handles={['start']}
  width={width}
  minWidth={240}
  maxWidth={560}
  sizeIndicator="none"
  widthLabel="साइडबार का साइज़ बदलें"
  onChange={(e) => setWidth(e.detail.width)}
>
  <aside>…</aside>
</ResizableFrame>

स्पेक

संरचना

भाग विवरण
1 container The box the content is laid out in, as wide and as tall as the frame's size. Outlined, its corners rounded and edged with one hairline, and the content clipped to it; plain, nothing drawn. It gives the content no fill of its own.
2 content Whatever the product puts in the frame: a component, an embedded document, a layout, a navigation drawer. The frame gives it its width and its height and does nothing else to it.
3 start-handle · वैकल्पिक A Handle (axis horizontal) centred along the start edge: it changes the width from that edge (a side bar at the end of a layout).
4 end-handle · वैकल्पिक A Handle (axis horizontal) centred along the end edge: it changes the width.
5 bottom-handle · वैकल्पिक A Handle (axis vertical) centred along the bottom edge: it changes the height.
6 corner-handle · वैकल्पिक A Handle (axis both, corner bottom-end) at the bottom-end corner: it changes both.
7 size-indicator · वैकल्पिक A small label inside the box at its top-end corner that shows the size as width × height in pixels while a handle is held or has keyboard focus, or always.

प्रॉपर्टी

प्रॉपर्टी टाइप डिफ़ॉल्ट विवरण
variant outlined | plain "outlined" outlined: a box with rounded corners and one hairline, its handles outside it so that they cover nothing — where a person checks how content responds to its room (a preview). plain: no edge and no corners of its own, the content drawing its own surface, and each handle centred on its edge — the edge of a pane (a navigation drawer, a side bar).
handles strings end Which handles the frame draws: any of start, end, bottom and bottom-end, in any combination. start is for content at the end of a layout, which grows toward the start (a side bar); end for content at its start (a preview, a navigation drawer). An empty list draws none, and the frame is a box of the size the product sets.
width number null The width of the box in pixels. Null takes the width the layout gives. A drag, a key or an activation changes it, and the frame keeps the width the person gave until the product sets another; a product that keeps a person's width (a drawer's, from one visit to the next) stores it from change and sets it again.
height number null The height of the box in pixels. Null takes the height the layout gives where it gives one (a row that stretches its items, a grid's cell, a pane beside the page), and the content's height where it does not, within minHeight and maxHeight. Changed as width is.
minWidth number null The least width a person can give. Null takes comp.resizable-frame.container.min-width (320 in the default system: the width at which content must reflow without scrolling sideways, WCAG 1.4.10). A pane sets its own (a navigation drawer's least).
maxWidth number null The greatest width. Null is the width the layout gives the frame.
minHeight number null The least height. Null takes comp.resizable-frame.container.min-height.
maxHeight number null The greatest height. Null is unlimited where the layout lets the frame grow.
snapWidths numbers Widths in whole pixels a drag of a handle that changes the width snaps to (360, 600, 1024: a common phone, a tablet, a small laptop). A width within comp.resizable-frame.snap-distance of one is taken as that one.
step number 10 How many pixels one arrow key changes a size by.
largeStep number 100 How many pixels Shift with an arrow key, Page Up or Page Down changes a size by.
sizeIndicator none | active | always "active" When the size indicator is drawn: never; while a handle is held or has keyboard focus; or all the time. A pane that is not checked for its size (a navigation drawer) sets none.
widthLabel string "" The accessible name of the start and the end handle ("Resize preview width", "Resize navigation"). Required while one of them is drawn.
heightLabel string "" The accessible name of the bottom handle ("Resize preview height"). Required while it is drawn.
cornerLabel string "" The accessible name of the corner handle ("Resize preview"). Required while it is drawn.

स्लॉट

स्लॉट विवरण
default The content: a component, an embedded document, a layout, a navigation drawer. A fixture's string is drawn as plain text in it.

इवेंट

इवेंट विवरण
resize The size changed during a drag; emitted in every frame it changes. Carries width and height in pixels.
change A person finished changing the size: a drag ended, a key changed it, or a handle was activated. Carries width and height. Not emitted when the product sets a size.

स्टेट

व्यवहार

EARS रूप में लिखी गई आवश्यकताएँ। हर प्लैटफ़ॉर्म के इम्प्लीमेंटेशन को इन ID के आधार पर टेस्ट किया जाता है। आवश्यकताओं का पाठ स्पेक फ़ाइल से ज्यों का त्यों, अंग्रेज़ी में दिखाया गया है।

ID आवश्यकता
RSF-1 THE resizable frame SHALL lay out its container as a box of its width and its height — width while it is not null and otherwise the width the layout gives it, height while it is not null and otherwise the height the layout gives it or, where the layout gives none, its content's height — each kept within its least and greatest (minWidth or comp.resizable-frame.container.min-width, and the lesser of maxWidth and the layout's width; minHeight or comp.resizable-frame.container.min-height, and maxHeight), with no fill and no elevation of its own, placed at the start edge of the room the layout gives it, or at its end edge WHILE handles names start and not end, so that the edge a person drags is the one that moves.
RSF-2 WHILE variant is outlined THE resizable frame SHALL draw its container with comp.resizable-frame.container.shape corners eased by sys.shape.corner-smoothing, edged inside with a line comp.resizable-frame.outline.width wide in comp.resizable-frame.outline.color, SHALL lay its content out at the box's width and clip it to the box's shape, and WHILE the content is taller than the box SHALL scroll it inside the box and make the box one focus stop, so that a keyboard scrolls it; WHILE variant is plain THE resizable frame SHALL draw no edge and no corners, SHALL give the content the box's width and height to fill, and SHALL clip nothing: the content draws its own surface and scrolls itself. In both THE resizable frame SHALL style nothing inside the content.
RSF-3 THE resizable frame SHALL draw the handles that handles names and no other: for start and end a Handle with axis horizontal centred along that edge, for bottom a Handle with axis vertical centred along the bottom edge, for bottom-end a Handle with axis both and corner bottom-end at that corner, each at size medium, and each with a hit area that meets the minimum target by its own rule (HDL-5). WHILE variant is outlined each handle SHALL stand outside the box, its box comp.resizable-frame.handle.gap beyond the edge (beyond both edges for the corner), and THE resizable frame SHALL keep room for them outside the box, so that they never cover the content; WHILE variant is plain each handle SHALL be centred on its edge (its corner on the box's corner) and take no room.
RSF-4 WHILE a drag of a handle lasts THE resizable frame SHALL change its width by the inline distance of the end and the corner handle, and by that distance taken the other way for the start handle, and its height by the block distance of the bottom and the corner handle, from the size it had when the drag began, kept within its least and greatest, following the drag without a motion, and SHALL emit resize with the new width and height in every frame the size changes; WHEN the drag ends THE resizable frame SHALL keep the size and emit change once, and none WHERE the size did not change.
RSF-5 WHILE a drag of a handle that changes the width lasts and snapWidths names widths THE resizable frame SHALL take a width within comp.resizable-frame.snap-distance of one of them as that width, and SHALL let the width go on with the drag once it is farther than that.
RSF-6 WHILE a drag of a handle lasts THE resizable frame SHALL keep every embedded document in its content from taking pointer input, so that the drag is not lost when the pointer passes over it, and SHALL give it input again WHEN the drag ends.
RSF-7 WHEN a handle emits step THE resizable frame SHALL change the size the step's axis stands for — the width for the inline axis, the height for the block axis — by step pixels for amount one and by largeStep pixels for amount large, wider toward the edge the handle stands on (toward the end for the end and the corner handle, toward the start for the start handle) and taller downward, and to its least for amount limit with direction −1 (Home) and to its greatest with direction 1 (End), kept within its least and greatest, and SHALL emit change once WHERE the size changed; it SHALL move to the new size over comp.resizable-frame.motion.resize-duration with comp.resizable-frame.motion.resize-easing, and at once where motion is reduced.
RSF-8 WHEN the start or the end handle is activated THE resizable frame SHALL make its width its greatest WHILE it is narrower, and SHALL give it back the width it had before the person last made it the greatest WHILE it already is the greatest (the least width where it had none); the bottom handle SHALL do the same with the height, the content's height standing for the greatest WHILE maxHeight is null; the corner handle SHALL do both. Each SHALL move as RSF-7 says and emit change once, so that no size the frame offers depends on a drag (WCAG 2.5.7).
RSF-9 THE resizable frame SHALL give each handle the value its size stands for — the width in pixels for the start and the end handle, the height for the bottom and the corner handle — with its least and greatest as min and max, and SHALL name the start and the end handle by widthLabel, the bottom handle by heightLabel and the corner handle by cornerLabel; WHILE a drawn handle's label is empty THE resizable frame SHALL still render it, and in debug builds report that it has no accessible name.
RSF-10 WHILE sizeIndicator is always, or sizeIndicator is active and a handle is held by a press or a drag or has keyboard focus, THE resizable frame SHALL draw its size indicator inside the box, comp.resizable-frame.size-indicator.offset from its top and end edges, over the content: the width, the character ×, and the height, in whole pixels written with the platform's digits for the layout's language and without grouping, in comp.resizable-frame.size-indicator.label.typescale and comp.resizable-frame.size-indicator.label.color, on a container comp.resizable-frame.size-indicator.container.height high, padded by comp.resizable-frame.size-indicator.container.padding-inline at its sides, with comp.resizable-frame.size-indicator.container.shape corners, filled with comp.resizable-frame.size-indicator.container.color; it SHALL take no input, and SHALL be hidden from assistive technology, which reads each size as its handle's value.
RSF-11 WHEN the size indicator appears or goes THE resizable frame SHALL fade it in over comp.resizable-frame.motion.indicator-enter-duration with comp.resizable-frame.motion.indicator-enter-easing and out over comp.resizable-frame.motion.indicator-exit-duration with comp.resizable-frame.motion.indicator-exit-easing, and at once where motion is reduced; WHILE a drag lasts it SHALL update the numbers in every frame, without a motion.
RSF-12 WHEN the product sets width or height THE resizable frame SHALL draw the new size at once and SHALL NOT emit resize or change; WHEN the layout's width becomes narrower than the frame's width THE resizable frame SHALL be as wide as the layout allows and keep the width the person gave for when there is room again.
RSF-13 WHERE the layout direction is right-to-left THE resizable frame SHALL mirror its layout: the box at the right of its room (at its left WHILE it stands at the end edge, RSF-1), the end handle on the box's left edge and the start handle on its right, the corner handle at the bottom-left corner, so that a drag away from the box widens it, and the size indicator at the top-left, its numbers still written left to right, the width at the left of the height, as a size is written in every language.
RSF-14 THE resizable frame SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the frame is shown THE resizable frame SHALL draw itself for the new direction at once, without a motion of its own, keeping its size.
RSF-15 WHERE the platform draws with a person's own forced colors THE resizable frame SHALL draw the outlined box's edge in the platform's text color, and its size indicator's text in the platform's text color on the platform's canvas color, with an edge of comp.resizable-frame.outline.width in the text color around it.
RSF-16 IF handles names a value other than start, end, bottom and bottom-end, or variant or sizeIndicator a value the component does not define, THE resizable frame SHALL ignore that handle, draw the variant as outlined or treat the indicator as active, and in debug builds report the unknown value; IF a value of snapWidths is not a whole number of pixels above zero THE resizable frame SHALL ignore it and in debug builds report it.
RSF-17 THE resizable frame SHALL have no words of its own and SHALL read none of the product's words: widthLabel, heightLabel and cornerLabel are about this one frame, and the size indicator is made of digits and a mark.
RSF-18 THE resizable frame SHALL add to the focus order its handles after its content, in the order start, end, bottom, bottom-end, and no other stop of its own but the box while it scrolls (RSF-2).
RSF-19 WHILE variant is outlined and a fine pointer is over the frame — its box or a handle's target — THE resizable frame SHALL draw its handles at rest (the handle's revealed), so that a person who points at a preview sees where to take it; WHILE variant is plain THE resizable frame SHALL leave each handle out of sight until it is used, as the Handle does (HDL-23), so that a pane's edge stays quiet under a pointer that only passes over the pane.

प्लैटफ़ॉर्म के अनुसार नामों का मिलान

पैरिटी का मतलब एक जैसे API नहीं है। हर प्लैटफ़ॉर्म एक ही कॉन्ट्रैक्ट को अपने तरीक़े से व्यक्त करता है।

स्पेक Web SwiftUI Jetpack Compose Flutter React Native
कंपोनेंट tanrei-resizable-frame TanreiResizableFrame TanreiResizableFrame TanreiResizableFrame ResizableFrame
variant · प्रॉपर्टी variant variant variant variant variant
handles · प्रॉपर्टी handles handles handles handles handles
width · प्रॉपर्टी width width width width width
height · प्रॉपर्टी height height height height height
minWidth · प्रॉपर्टी minWidth minWidth minWidth minWidth minWidth
maxWidth · प्रॉपर्टी maxWidth maxWidth maxWidth maxWidth maxWidth
minHeight · प्रॉपर्टी minHeight minHeight minHeight minHeight minHeight
maxHeight · प्रॉपर्टी maxHeight maxHeight maxHeight maxHeight maxHeight
snapWidths · प्रॉपर्टी snapWidths snapWidths snapWidths snapWidths snapWidths
step · प्रॉपर्टी step step step step step
largeStep · प्रॉपर्टी largeStep largeStep largeStep largeStep largeStep
sizeIndicator · प्रॉपर्टी sizeIndicator sizeIndicator sizeIndicator sizeIndicator sizeIndicator
widthLabel · प्रॉपर्टी widthLabel widthLabel widthLabel widthLabel widthLabel
heightLabel · प्रॉपर्टी heightLabel heightLabel heightLabel heightLabel heightLabel
cornerLabel · प्रॉपर्टी cornerLabel cornerLabel cornerLabel cornerLabel cornerLabel
resize · इवेंट resize onResize onResize onResize onResize
change · इवेंट change onChange onChange onChanged onChange
टिप्पणियाँ <tanrei-resizable-frame variant handles="end bottom-end" width height min-width max-width min-height max-height snap-widths="360 600 1024" step large-step size-indicator width-label height-label corner-label> with the content in the default slot. handles and snapWidths are array properties; their attributes are space-separated or a JSON array. The handles are <tanrei-handle> in the shadow root. RSF-6 sets pointer-events: none on every slotted <iframe>, <object> and <embed> (and every one inside the slotted content) between the handles' resizestart and resizeend. resize and change are composed, bubbling CustomEvents with { width, height }; the Handle's own events stay in the shadow root. width and height are Binding<CGFloat?>; snapWidths is [CGFloat]. Content is the view builder. snapWidths: List<Dp>; sizes in Dp. Content is the trailing composable. snapWidths: List<double>. Content is child. snapWidths: number[]. Content is children.

टोकन

टोकन किसका एलियास रिज़ॉल्व किया गया मान (लाइट)
--tanrei-comp-resizable-frame-container-min-height — 200px
--tanrei-comp-resizable-frame-container-min-width — 320px
--tanrei-comp-resizable-frame-container-shape sys.shape.corner.large 12px
--tanrei-comp-resizable-frame-handle-gap sys.space.space100 8px
--tanrei-comp-resizable-frame-motion-indicator-enter-duration sys.motion.role.appear.hint.enter 250ms
--tanrei-comp-resizable-frame-motion-indicator-enter-easing sys.motion.easing.enter cubic-bezier(0.2, 0, 0, 1)
--tanrei-comp-resizable-frame-motion-indicator-exit-duration sys.motion.role.appear.hint.exit 200ms
--tanrei-comp-resizable-frame-motion-indicator-exit-easing sys.motion.easing.exit cubic-bezier(0.3, 0, 1, 1)
--tanrei-comp-resizable-frame-motion-resize-duration sys.motion.role.resize.default 300ms
--tanrei-comp-resizable-frame-motion-resize-easing sys.motion.easing.spatial cubic-bezier(0.2, 0, 0, 1)
--tanrei-comp-resizable-frame-outline-color sys.color.outline-variant #000000 · 8%
--tanrei-comp-resizable-frame-outline-width sys.border.hairline 1px
--tanrei-comp-resizable-frame-size-indicator-container-color sys.color.inverse-surface #1f1f1f
--tanrei-comp-resizable-frame-size-indicator-container-height — 24px
--tanrei-comp-resizable-frame-size-indicator-container-padding-inline sys.space.space100 8px
--tanrei-comp-resizable-frame-size-indicator-container-shape sys.shape.corner.small 6px
--tanrei-comp-resizable-frame-size-indicator-label-color sys.color.inverse-on-surface #f1f1f1
--tanrei-comp-resizable-frame-size-indicator-offset sys.space.space100 8px
--tanrei-comp-resizable-frame-snap-distance sys.space.space100 8px
--tanrei-comp-resizable-frame-size-indicator-label-typescale sys.typescale.code-small 400 12px/1.3333

फ़िक्स्चर

मानक रेंडरिंग। हर प्लैटफ़ॉर्म हर फ़िक्स्चर का स्नैपशॉट एक ही ID से लेता है, ताकि नतीजों की तुलना की जा सके।

इससे जनरेट किया गया: specs/resizable-frame.spec.json, tokens/comp/resizable-frame.tokens.json, design/tokens/

दिशानिर्देश

कब इस्तेमाल करें

वहाँ इस्तेमाल करें जहाँ किसी को किसी चीज़ को अपनी पसंद की जगह देनी हो और देखना हो कि वह उस जगह में कैसी दिखती है: किसी पेज या कंपोनेंट का दूसरी चौड़ाई पर प्रीव्यू, मुख्य कॉन्टेंट के बग़ल का पेन, औज़ारों का पैनल।

आपको चाहिए इस्तेमाल करें
सिर्फ़ किसी फ़ील्ड की अपनी ऊँचाई उसके टेक्स्ट के साथ बढ़े टेक्स्ट फ़ील्ड का अपना कोने वाला हैंडल।
नीचे के किनारे से ऊपर उठने वाली शीट बॉटम शीट, जो अपना ड्रैग हैंडल ख़ुद बनाती है।
कुछ तय साइज़ में से एक चुनना, बीच का कोई नहीं उन्हें बदलने वाला सेगमेंटेड बटन।
दिखने वाली चीज़ को तस्वीर की तरह छोटा करना, उसे कम जगह देना नहीं यह नहीं: साइज़ बदलने वाला फ़्रेम जगह बदलता है, भीतर की चीज़ का स्केल कभी नहीं।

इसके रूप

variant क्या बनाता है किसके लिए
outlined (डिफ़ॉल्ट) गोल कोने और एक बारीक रेखा; हैंडल बॉक्स के बाहर अपनी जगह में। फ़्रेम पर माउस आने पर हैंडल दिखते हैं। प्रीव्यू: कॉन्टेंट पूरा दिखता है, और फ़्रेम का कोई हिस्सा उसे नहीं ढकता।
plain अपना कुछ नहीं: कॉन्टेंट अपनी सरफ़ेस से बॉक्स भरता है। हर हैंडल अपने किनारे पर लगता है और सिर्फ़ तब दिखता है जब पॉइंटर उस पर हो, उस पर फ़ोकस हो या उसे दबाकर रखा गया हो। किसी पेन का किनारा: नेविगेशन ड्रॉअर, साइडबार।

इसके हैंडल

handles कहाँ लगता है क्या बदलता है
end (डिफ़ॉल्ट) आख़िरी किनारा चौड़ाई। लेआउट की शुरुआत में रखे कॉन्टेंट के लिए: प्रीव्यू, नेविगेशन ड्रॉअर।
start शुरू का किनारा चौड़ाई, जो शुरुआत की ओर बढ़ती है। लेआउट के आख़िर में रखे कॉन्टेंट के लिए: साइडबार। तब बॉक्स अपनी जगह के आख़िर में रहता है।
bottom निचला किनारा ऊँचाई।
bottom-end निचला आख़िरी कोना दोनों एक साथ।

इनमें से कोई भी, किसी भी मेल में दें; ख़ाली लिस्ट कोई हैंडल नहीं बनाती, और फ़्रेम आपके तय किए साइज़ का एक बॉक्स रहता है। start और end पेज की दिशा के साथ चलते हैं: दाएँ से बाएँ लेआउट में आख़िरी किनारा बायाँ होता है।

साइज़

width और height बॉक्स का साइज़ हैं, पिक्सल में। जब तक वे null हैं, बॉक्स वह चौड़ाई लेता है जो लेआउट उसे देता है और वह ऊँचाई जो लेआउट देता है, या जहाँ लेआउट कोई ऊँचाई न दे वहाँ कॉन्टेंट की ऊँचाई। जैसे ही कोई हैंडल हिलाता है, साइज़ उस व्यक्ति का हो जाता है, और तब तक बना रहता है जब तक आप कोई दूसरा साइज़ तय न करें। आपका तय किया साइज़ तुरंत बनता है और कोई इवेंट एमिट नहीं करता; संकरा लेआउट बॉक्स को संकरा कर देता है और जगह फिर मिलने पर चौड़ाई लौटा देता है।

सबसे कम चौड़ाई minWidth है, और जब तक आप कुछ तय न करें तब तक 320 पिक्सल: वह चौड़ाई जिस पर कॉन्टेंट को आड़ा स्क्रोल किए बिना नए सिरे से जमना चाहिए। किसी पेन के लिए अपनी चौड़ाई तय करें: नेविगेशन ड्रॉअर की अपनी सबसे कम चौड़ाई होती है। सबसे ज़्यादा चौड़ाई maxWidth है, या वह जगह जो लेआउट देता है। snapWidths वे चौड़ाइयाँ हैं जिनसे गुज़रते समय खींचना उन पर स्नैप होता है, जैसे किसी आम फ़ोन, टैबलेट और छोटे लैपटॉप की चौड़ाई।

यह क्या बताता है

इवेंट कब
resize खींचते समय साइज़ के हर बदलाव पर: width और height।
change जब कोई साइज़ बदल चुका हो: खींचना ख़त्म हुआ, किसी कुंजी ने उसे हिलाया, या किसी हैंडल को बिना खींचे दबाया गया। अगर आप व्यक्ति का साइज़ रखते हैं, तो उसे यहीं सेव करें।

साइज़ इंडिकेटर

जब कोई हैंडल दबाकर रखा गया हो या उस पर कीबोर्ड फ़ोकस हो, तब बॉक्स के ऊपरी आख़िरी कोने में एक छोटा लेबल साइज़ दिखाता है, जैसे “390 × 640”। sizeIndicator को always करने पर यह हर समय दिखता है, उस प्रीव्यू के लिए जिसका साइज़ जाँचा जाता है; और none करने पर कभी नहीं, उस पेन के लिए जिसका साइज़ कोई नहीं पढ़ता। यह पेज की भाषा के अंकों में और हर लेआउट में बाएँ से दाएँ लिखा जाता है, और सहायक तकनीक इसे नहीं पढ़ती: वह इसकी जगह हर हैंडल का मान पढ़ती है।

करें

  • हर बनाए गए हैंडल को ऐसा नाम दें जो बताए कि वह किसका साइज़ बदलता है: widthLabel, heightLabel, cornerLabel (“प्रीव्यू की चौड़ाई बदलें”, “साइडबार का साइज़ बदलें”)।
  • ऐसी सबसे कम चौड़ाई तय करें जिस पर कॉन्टेंट तब भी काम करे, और ऐसी सबसे ज़्यादा चौड़ाई जिसके बाद भी बाक़ी पेज इस्तेमाल हो सके।
  • व्यक्ति का साइज़ वहाँ रखें जहाँ वह फिर लौटेगा: ड्रॉअर या साइडबार की चौड़ाई, change से।

न करें

  • कॉन्टेंट के चारों ओर अपने बनाए साइज़ हैंडल न लगाएँ: यही फ़्रेम इस्तेमाल करें, और पेन के किनारे के लिए plain।
  • कॉन्टेंट को तस्वीर की तरह छोटा करने के लिए इसका इस्तेमाल न करें: यह जगह बदलता है, स्केल नहीं।
  • जहाँ व्यक्ति को किसी पेन का साइज़ बदलना है, वहाँ उसके हैंडल न हटाएँ: जो खींच नहीं सकता, वह कुंजियाँ और दबाना ही इस्तेमाल करता है।

सुलभता

रोल
none (a group of the product's content and its handles); each handle is a focusable separator
लेबलिंग
Each handle is named by its label (widthLabel for the start and the end handle, heightLabel, cornerLabel) and tells its size as its value in pixels, with its least and greatest. The size indicator is hidden: it draws what the handles already tell.
न्यूनतम टार्गेट
दिखने वाला आकार छोटा होने पर भी हिट एरिया न्यूनतम टार्गेट साइज़ को पूरा करता है। minimum 32px · pointer 44px · spacing 8px · touch 48px

कीबोर्ड

कुंजियाँ क्रिया
Tab Moves through the content, then the handles: start, end, bottom, corner.
Arrow keys on a handle Change the size by step pixels; with Shift, by largeStep (HDL-9, RSF-7). On the start handle the arrow toward the start widens.
Page Up / Page Down Change the size by largeStep.
Home / End Give the size its least or its greatest.
Enter / Space Switch between the greatest size and the size before it (RSF-8).

टिप्पणियाँ

  • The default least width, 320, is the width at which content must reflow without a sideways scroll (WCAG 1.4.10), so that a person checking a design can reach that width and no narrower by accident; a product sets minWidth lower for a narrower check, and a pane sets its own.
  • Dragging movements (WCAG 2.5.7): every size is also reachable by activating a handle (the greatest and the one before) and by its keys.
  • The keys follow the window splitter pattern of the ARIA Authoring Practices: each handle is a separator with a value, Home and End give the least and the greatest.

इससे जनरेट किया गया: specs/resizable-frame.spec.json, tokens/sys/measure.tokens.json

कंपोनेंट क्या सँभालता है

  • हर हैंडल फ़ोकस होने वाला सेपरेटर है — ARIA Authoring Practices का विंडो स्प्लिटर — जिसका नाम उसका लेबल है, पिक्सल में साइज़ उसका मान है, और सबसे कम और सबसे ज़्यादा उसका दायरा।
  • फ़ोकस क्रम में हैंडल कॉन्टेंट के बाद आते हैं: शुरू, आख़िर, नीचे, कोना। outlined बॉक्स सिर्फ़ तब फ़ोकस स्टॉप होता है जब उसका कॉन्टेंट उससे ऊँचा हो और स्क्रॉल होता हो।
  • ऐरो कुंजियाँ साइज़ को step पिक्सल बदलती हैं, Shift के साथ ऐरो और Page Up और Page Down largeStep से; Home और End सबसे कम और सबसे ज़्यादा देते हैं। शुरू वाले हैंडल पर शुरुआत की ओर का ऐरो चौड़ा करता है।
  • Enter, Space, या बिना खींचे दबाना सबसे बड़े साइज़ और उससे पहले वाले साइज़ के बीच बदलता है, इसलिए हर साइज़ बिना खींचे मिल सकता है।
  • खींचने के दौरान कॉन्टेंट में एम्बेड किया कोई डॉक्यूमेंट पॉइंटर नहीं लेता, इसलिए पॉइंटर उसके ऊपर से गुज़रे तो भी खींचना नहीं छूटता।
  • साइज़ इंडिकेटर सहायक तकनीक से छिपा रहता है; वह वही दिखाता है जो हैंडल के मान पहले से बताते हैं। जहाँ मोशन कम करने को कहा गया हो, वहाँ कुंजी या दबाने से हुए बदलाव तुरंत हो जाते हैं।
  • फ़ोर्स्ड कलर मोड में outlined किनारा और इंडिकेटर का टेक्स्ट, टेक्स्ट का रंग लेते हैं, और इंडिकेटर की पृष्ठभूमि कैनवस का रंग।

आपको क्या करना है

  • आप जो भी हैंडल बनाते हैं, उसे उसका लेबल दें। उसके बिना भी हैंडल बनता है और काम करता है, और डीबग बिल्ड इसकी रिपोर्ट करता है।
  • पक्का करें कि सबसे कम चौड़ाई से ऊपर, हर उस साइज़ पर कॉन्टेंट काम करता है जिसकी आप अनुमति देते हैं।