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

सिलेक्ट फ़ील्ड

लोगों को बंद लिस्ट में से एक मान चुनने देता है, फ़ॉर्म के एक पूरे फ़ील्ड के रूप में — एक लेबल जो बता सकता है कि फ़ील्ड ज़रूरी है या वैकल्पिक, एक ट्रिगर जो चुना हुआ विकल्प दिखाता है और विकल्पों की लिस्ट खोलता है, और नीचे सहायता या त्रुटि की एक पंक्ति — जो सहायक तकनीक के लिए आपस में जुड़े हैं और फ़ॉर्म में एक कंट्रोल के रूप में हिस्सा लेते हैं।

content_copyMarkdown में देखें
श्रेणी
चयन
टोकन
comp.field
स्तर
संयोजित
इनसे बना है
Field, Select

अवलोकन

Web
tanrei-select-field
schedule
SwiftUI
TanreiSelectField
radio_button_unchecked
Jetpack Compose
TanreiSelectField
radio_button_unchecked
Flutter
TanreiSelectField
radio_button_unchecked
React Native
SelectField
radio_button_unchecked
वे वेरिएंट जो इनमें शामिल नहीं
tanrei: filled, outlined

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

एक ज़रूरी सिलेक्ट फ़ील्ड, और एक जो ग्रुप में बँटा है और जिसमें फ़ील्ड की पहचान के लिए एक ग्लिफ़ है

कनाडाफ़्रांसजापानकेन्यान्यूज़ीलैंडpublicटोक्योसियोललिस्बनबर्लिन

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

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

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

वेब पर यह <tanrei-select-field> है, जिसके चाइल्ड <tanrei-option> हैं। बाक़ी प्लैटफ़ॉर्म ने इसे अभी इम्प्लीमेंट नहीं किया है।

इस्तेमाल

विकल्प सिलेक्ट फ़ील्ड के चाइल्ड हैं: हर एक का एक मान और एक लेबल होता है। value बताता है कि कौन-सा विकल्प चुना हुआ है। change और toggle सिलेक्ट के अपने इवेंट हैं, और जब इनमें से कोई सुना जाता है, तब फ़ील्ड के value और open में नए मान आ चुके होते हैं।

<form>
  <tanrei-select-field name="country" label="देश" value="jp" required required-text="ज़रूरी"
    supporting-text="आपके इनवॉइस इसी देश के पते पर भेजे जाते हैं।">
    <tanrei-option value="ca">कनाडा</tanrei-option>
    <tanrei-option value="jp">जापान</tanrei-option>
  </tanrei-select-field>
</form>

<!-- ग्रुप में बँटा हुआ, लेबल के नीचे एक पंक्ति और फ़ील्ड की पहचान के लिए एक ग्लिफ़ के साथ। -->
<tanrei-select-field label="टाइम ज़ोन" value="Europe/Lisbon">
  <span slot="leading-icon">public</span>
  <tanrei-option-group label="एशिया">
    <tanrei-option value="Asia/Tokyo" supporting-text="UTC+9">टोक्यो</tanrei-option>
  </tanrei-option-group>
  <tanrei-option-group label="यूरोप">
    <tanrei-option value="Europe/Lisbon" supporting-text="UTC+0">लिस्बन</tanrei-option>
  </tanrei-option-group>
</tanrei-select-field>

<script type="module">
  import '@tanrei/web/components/select-field';

  const country = document.querySelector('[name="country"]');
  // व्यक्ति ने कोई दूसरा विकल्प चुना। value में पहले से नया मान है।
  country.addEventListener('change', () => save(country.value));
  // व्यक्ति ने खोला या बंद किया; बंद होने पर कारण भी आता है।
  country.addEventListener('toggle', (e) => console.log(e.detail.open, e.detail.reason));
  // वैलिडेशन आपका काम है: सिलेक्ट फ़ील्ड ख़ुद कभी error सेट नहीं करता।
  country.error = submitted && !ships(country.value);
  country.errorText = 'हम अभी वहाँ डिलीवरी नहीं करते। कोई दूसरा देश चुनें।';
</script>
import { Option, SelectField } from '@tanrei/react';

<SelectField label="देश" value={country} required requiredText="ज़रूरी" onChange={(event) => setCountry(event.currentTarget.value)}>
  <Option value="ca">कनाडा</Option>
  <Option value="jp">जापान</Option>
</SelectField>

एक स्तर नीचे

वही फ़ील्ड, अपने दोनों सदस्यों से हाथ से लिखा हुआ, वही तस्वीर है और सहायक तकनीक के लिए वही कंट्रोल:

<tanrei-field label="देश" required required-text="ज़रूरी"
  supporting-text="आपके इनवॉइस इसी देश के पते पर भेजे जाते हैं।">
  <tanrei-select name="country" placeholder="देश चुनें">
    <tanrei-option value="jp">जापान</tanrei-option>
    <tanrei-option value="ke">केन्या</tanrei-option>
  </tanrei-select>
</tanrei-field>

वही फ़ील्ड हाथ से लिखा हुआ: एक फ़ील्ड, जिसके भीतर एक सिलेक्ट है

जापानकेन्या

एक स्तर नीचे तब जाएँ जब आपको ऐसी व्यवस्था चाहिए जो सिलेक्ट फ़ील्ड नहीं देता:

आपको चाहिए इस्तेमाल करें
लेबल, बॉक्स, सहायता और त्रुटि सिलेक्ट फ़ील्ड
फ़्रेम के भीतर, बॉक्स के बग़ल में या उसके नीचे अपनी कोई चीज़ एक फ़ील्ड, जिसके भीतर एक सिलेक्ट और आपका अपना एलिमेंट है
सिर्फ़ बॉक्स, जहाँ उसका लेबल कहीं और है: किसी बार में थीम, टूलबार में सॉर्ट का क्रम, टेबल का कोई सेल अकेला सिलेक्ट, जिसे नाम उसके अपने label से मिलता है
इतनी लंबी लिस्ट कि लोग स्क्रॉल करने के बजाय टाइप करना चाहेंगे कॉम्बोबॉक्स

एक स्तर नीचे जो बदलता है, वह यह है कि कौन-सी बात कहाँ कही जाती है। name, value और विकल्प सिलेक्ट पर होते हैं, जो तब वह कंट्रोल है जो फ़ॉर्म को मिलता है, और उसके इवेंट उसी पर सुने जाते हैं। label, error और disabled फ़ील्ड पर ही रहते हैं, जो उन्हें कंट्रोल तक पहुँचाता है: सिलेक्ट के अपने सेट न करें।

स्पेक

एक अक्षम विकल्प के साथ सहायक टेक्स्ट, वैकल्पिक, एक त्रुटि, सिर्फ़ पढ़ने के लिए और अक्षम

मुफ़्तटीमएंटरप्राइज़यूरोप, मध्य पूर्व और अफ़्रीकाएशिया और प्रशांतजापानकेन्याजापानकेन्याजापानकेन्या

Filled और outlined: फ़ील्ड का लेबल सिलेक्ट के बॉक्स में फ़्लोट होता है, और ज़रूरी फ़ील्ड के लिए तारांकन आता है

जापानकेन्याजापानकेन्या
m3-like के साथ

हर सदस्य क्या देता है

पहलू फ़ील्ड से सिलेक्ट से
प्रॉपर्टी label, labelHidden, supportingText, errorText, error, disabled, required, optional, requiredMark, requiredText, optionalText variant, size, value, placeholder, readOnly, open, separation, iconSpace, status, statusText, emptyText
इवेंट — change, toggle
स्लॉट label-icon leading-icon, और विकल्प
टोकन comp.field.* बॉक्स के लिए comp.input-box.*, जिन्हें हर इनपुट बॉक्स पढ़ता है; लिस्ट के लिए comp.select.*

सिलेक्ट के अपने label, labelHidden, error और disabled होते हैं। वे सिलेक्ट फ़ील्ड की प्रॉपर्टी नहीं हैं: फ़ील्ड का label कंट्रोल को नाम देता है, उसका error बॉक्स को त्रुटि की अवस्था में लाता है और उसका disabled उसे अक्षम करता है। इसलिए आप इनमें से हर एक को एक ही बार सेट करते हैं, सिलेक्ट फ़ील्ड पर, और उसका लेबल कंट्रोल के साथ बदलता है।

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

ट्रिगर और लिस्ट क्या करते हैं, यानी खुलना, ऐरो कुंजियाँ, टाइप करना, चुनना, ग्रुप, यह सिलेक्ट के पेज पर है। फ़्रेम क्या करता है, यानी ज़रूरी का निशान, सहायता, त्रुटि और वह कैसे पढ़कर सुनाई जाती है, यह फ़ील्ड के पेज पर है।

किसी एक फ़ील्ड को अलग करना

सिलेक्ट फ़ील्ड का अपना कोई टोकन नहीं है। उसका फ़्रेम फ़ील्ड के टोकन पढ़ता है, और उसका बॉक्स और उसकी लिस्ट सिलेक्ट के, वे जहाँ भी सेट हों। किसी एक इंस्टेंस को बदलने के लिए, उस पर सदस्य का टोकन सेट करें:

<tanrei-select-field label="देश"
  style="--tanrei-comp-field-label-gap: 12px"></tanrei-select-field>

संरचना

संरचना

वेब पैकेज जिस तरह फ़िक्स्चर stacked-empty बनाता है, उसी के ऊपर बनाया गया।
भाग विवरण
1 field The Field: the label row with its glyph and its requirement mark, and the supporting row with the help and the error text. In a look whose select floats the label it draws no label row.
2 select The select, as the Field's one control: the trigger with the value it shows, its leading icon and its chevron, the label that floats in it in the looks that float one, and the list of options that opens from it.

प्रॉपर्टी

प्रॉपर्टी टाइप डिफ़ॉल्ट विवरण
variant stacked | filled | outlined "stacked" The text input's three looks, so that a select is drawn as the text inputs beside it. Stacked is a filled box that shows focus and error with a line inside its edge and draws no label: the label of the Field that frames it stands above it. Filled and outlined float the label inside the box. Use one style per form. A design system may leave some out (the Tanrei system ships stacked only) or add values. — Select
size small | medium | large "medium" Minimum height of the container: stacked 32 / 40 / 56, as tall as a Button of the same size, so that the box and a Button side by side in one row stand as tall as each other; filled and outlined 40 / 48 / 56, which hold the label that floats inside them. The text input's three sizes: medium and large for forms, small for a select in an app bar, a toolbar or a dense row of controls, where nothing frames it. The hit area always meets the minimum target. A design system may add values. — Select
value string "" The value of the chosen option. The select shows that option's label; while value names no option it shows the placeholder. An option whose value is the empty string is a choice like any other ("None", "Any") and is the chosen one while value is empty. — Select
label string "" Names the control, visibly and to assistive technology. Required, unless the control names itself (a checkbox or a switch with its own label): then leave it empty and the field adds only help and an error. — Field Names the select. In a filled or outlined look the select draws it, floating in its box, and the Field draws no label row (FLD-25, SEL-15).
labelHidden boolean false Does not draw the label, which stays the accessible name. For a control whose visible label is elsewhere (a table column, a toolbar). — Field Hides the label wherever it would be drawn: the Field's row, or the select's floating label (FLD-25).
placeholder string "" A hint shown while nothing is chosen and the label is not in the line ("Choose a country"). Never a replacement for label, and never a choice. — Select
supportingText string "" Help shown below the control and given to assistive technology as the control's description. While the field is in error it gives way to errorText, unless the design system keeps both (comp.field.error-text.placement append). — Field
errorText string "" Shown while error is true, in supportingText's place — or below it, which then stays, where the design system's comp.field.error-text.placement is append: what is wrong and how to put it right, in words. — Field
error boolean false Puts the field in the error condition: the error text is drawn, the control is exposed as invalid and, where it has an error condition of its own, drawn in it. What a value means is the product's to validate; the field never sets this itself. — Field The Field puts its select in the select's own error condition (FLD-8, SEL-9).
disabled boolean false Disables the control and draws the frame as disabled. Disable a framed control here, not on the control, so that its label follows. — Field The Field disables its select (FLD-14, SEL-46); the select field is then left out of its form (SEF-2).
readOnly boolean false The value is shown, can be focused and is submitted, but cannot be changed: the list does not open and no chevron is drawn. — Select
required boolean false What the form asks of the control: true exposes it as required and draws the required mark beside the label. It never validates: a missing answer is the product's to report with error. — Field The Field exposes its select as required (FLD-10, SEL-11).
optional boolean false Draws the optional tag after the label and adds optionalText to the control's description, because assistive technology has no state for it. Ignored while required is true: a control is never both. — Field
requiredMark auto | tag | asterisk | none "auto" How this control shows that it is required: tag is a small filled Tag with requiredText, asterisk is "*" after the label, none draws nothing and keeps the semantics. Auto takes comp.field.requirement.mark, which follows sys.behavior.requirement-mark, the system's one answer. Ignored unless required is true. — Field
requiredText string "" The text of the required tag, in the product's language ("Required", "必須"). The product's: Tanrei has no word for it. Empty reads the product's words; with neither, FLD-24 says what is drawn. — Field
optionalText string "" The text of the optional tag, in the product's language ("Optional", "任意"); also read to assistive technology as part of the description. The product's: Tanrei has no word for it. Empty reads the product's words. — Field
open boolean false Whether the list is shown. The select opens and closes itself and emits toggle; the product may also set it. Ignored while the select is disabled or read-only or has nothing to show: no option, no status row and no empty text (SEL-61). — Select
separation auto | divider | gap "auto" How a group of options is told from what is next to it. divider: a line between them. gap: empty space and no line. Auto takes comp.select.separation, which follows the design system's choice. — Select
iconSpace auto | always | never "auto" Whether an option keeps the room of the leading icon column where it has no icon, so that the labels of a section start on one line — a section being an option group, or a run of adjacent options outside any group. auto: an option keeps the column while another option of its section has a leading icon, so that a section without icons starts its labels where the row's content starts. always: every option keeps it. never: only an option that has an icon has the column. The menu's iconSpace, with the same values and default (SEL-66). — Select
density regular | compact "regular" How much room an option of the list takes: its least height, its paddings, the gap between its columns and the size of its glyphs (the leading icon, the check), and never its text style. regular (a 48 row in the default system) is for a product used by touch as well as by pointer; compact (a 32 row with 20 glyphs, the menu's compact row) is for a tool used with a pointer, whose lists are long. For touch an option is never lower than the touch target in either (SEL-37). The field's own box is not changed: its height is size's. A design system may add values. — Select
status idle | loading | error "idle" What the product's source of options is doing, which the product sets: idle (the options given are final), loading (options are on their way: the status row shows a loading indicator and the list is marked busy) or error (the source failed: the status row shows statusText in the error color, announced at once). The combobox's and the search's values, with the same meaning. The select never loads anything itself. — Select
statusText string "" The status row's text, in the product's language, read to assistive technology when the list opens and when it changes: a count ("20 of 340 projects shown"), that loading failed ("Projects could not be loaded"), or, while status is loading, the loading indicator's name ("Loading projects"). Empty draws no status row unless status is loading. — Select
emptyText string "" Shown in the list while the select holds no option, status is idle and statusText is empty, in the product's language ("No projects yet"), so that the select still opens and says why there is nothing to choose. The product's: Tanrei has no words for it. Empty reads the product's words (noOptionsText); with neither, the select has nothing to show and does not open (SEL-61), and it is reported. — Select

स्लॉट

स्लॉट विवरण
leading-icon A glyph at the start of the container that stands for the field whatever is chosen (a globe before a language). It takes the place of the chosen option's own glyph. — Select
label-icon A glyph before the label. — Field

इवेंट

इवेंट विवरण
change The person chose an option whose value differs from the select's; carries the new value. Not emitted when the product sets value, when the chosen option is chosen again, or while the person only moves through the list. — Select
toggle The list was opened or closed by the person; carries the new open and, for a close, the reason: select, escape, back, outside, focus-out, anchor-hidden, press or tab (in the platform's casing). After a choice it follows change. — Select

आइटम

वे आइटम के प्रकार जिन्हें कंपोनेंट दोहराता है। फ़िक्स्चर अपने आइटम क्रम से सूचीबद्ध करता है; हर प्लैटफ़ॉर्म हर प्रकार को अपने तरीक़े से नाम देता है।

option

One choice of the select: a label, the value it stands for, and optionally a supporting line and a glyph.

प्रॉपर्टी टाइप डिफ़ॉल्ट विवरण
label string "" The option's text and its accessible name; the container shows it once the option is chosen. Required.
value string "" Identifies the choice: the option is the chosen one while the select's value equals it. Unique within the select. The empty string is a value like any other, for an option that stands for no choice ("None").
supportingText string "" A line below the label that says more about the choice. Shown in the list, not in the container.
leadingIcon string "" The name of an icon (a glyph of the system's icon set) before the label; the container shows it too while the option is chosen and the select has no leading icon of its own.
disabled boolean false Prevents the option from being chosen. It stays reachable with the arrow keys.
स्पेक Web SwiftUI Jetpack Compose Flutter React Native
आइटम tanrei-option TanreiSelectOption TanreiSelectOption TanreiSelectOption SelectOption
label · प्रॉपर्टी label title text label label
value · प्रॉपर्टी value tag value value value
supportingText · प्रॉपर्टी supportingText supportingText supportingText supportingText supportingText
leadingIcon · प्रॉपर्टी leadingIcon leadingIcon leadingIcon leadingIcon leadingIcon
disabled · प्रॉपर्टी disabled disabled enabled enabled disabled
टिप्पणियाँ <tanrei-option> children of <tanrei-select-field>, exactly as of <tanrei-select>: the product's elements in the light DOM, passed to the select inside through the default slot and read by it as data (web-options.md). The select's own option, under the same name: the select field passes it to its select and reads nothing of it. The select's own option, under the same name: the select field passes it to its select and reads nothing of it. The select's own option, under the same name: the select field passes it to its select and reads nothing of it. The select's own option, under the same name: the select field passes it to its select and reads nothing of it.

option-group · ग्रुप — इसमें आइटम होते हैं

A run of related options, optionally titled. The select separates a group from what is next to it by a divider or a gap.

प्रॉपर्टी टाइप डिफ़ॉल्ट विवरण
title string "" A short heading drawn above the group's options, which also names the group; empty draws none and leaves the group unnamed.
स्पेक Web SwiftUI Jetpack Compose Flutter React Native
आइटम tanrei-option-group TanreiSelectSection TanreiSelectGroup TanreiSelectGroup SelectOptionGroup
title · प्रॉपर्टी label title title title title
टिप्पणियाँ As the option: the same element, the product's child, with its options inside it. The select's own option group, under the same name: the select field passes it to its select and reads nothing of it. The select's own option group, under the same name: the select field passes it to its select and reads nothing of it. The select's own option group, under the same name: the select field passes it to its select and reads nothing of it. The select's own option group, under the same name: the select field passes it to its select and reads nothing of it.

स्टेट

व्यवहार

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

ID आवश्यकता
SEF-1 THE select field SHALL be a Field that frames one select, and nothing else. It SHALL give label, labelHidden, supportingText, errorText, error, disabled, required, optional, requiredMark, requiredText and optionalText to its Field and every other prop to its select, each unchanged; SHALL hold the label-icon slot for its Field and the leading-icon slot for its select; SHALL give its select every option and option group the product gives it, in the order given, as that select's own items, read, drawn and chosen by the select (SEL-17, SEL-31 to SEL-45); and SHALL emit its select's events as its own, each once. It SHALL draw no part of its own, hold no state of its own and have no token of its own: what it shows, how it behaves and what it exposes to assistive technology SHALL be exactly what that Field and that select do when a product places the one in the other (FLD-1 to FLD-28; SEL-1 to SEL-64) — the label row and its requirement mark (FLD-2 to FLD-6), or the label that floats in the box with the Field's row left out (FLD-25, SEL-15, SEL-7); the supporting row and the error, started where the value starts (FLD-7 to FLD-9, FLD-26); the rows drawn focused while the list is open (FLD-13, SEL-20); the name, the description and the states (FLD-10, FLD-11, FLD-14, SEL-11); and the width, which is the Field's and which the select fills (FLD-1, SEL-49).
SEF-2 WHERE the platform has forms (the web) THE select field SHALL be the one control the form sees: it SHALL take name, submit its select's value, reset to the value it was first given, restore it on navigation, report to the form's constraint validation exactly what its select would report there (SEL-11), be submitted WHILE readOnly is true (SEL-47), and be left out WHILE disabled is true or a disabled group of the form holds it (SEL-46); its select and its Field SHALL take no part in the form themselves.
SEF-3 WHEN the select field is given focus — by the product, by a press on its label row (FLD-12), or by a form that reports its validity — THE select field SHALL pass the focus to its select's container and SHALL add no stop to the focus order: the one stop inside it is its select's (SEL-13). WHILE focus is anywhere inside it, or its select's list is open, THE select field SHALL count as focused for its Field (FLD-13).
SEF-4 IF the select field is placed in a Field THE select field SHALL in debug builds report that it is a field already and that the bare control is the select, and both SHALL still render (FLD-15). WHILE it stands in a field group THE select field SHALL follow that group's disabled, through its own Field, and take nothing else from the group (FGR-20).
SEF-5 THE select field SHALL have no words of its own and SHALL read none: requiredText and optionalText are read by its Field (FLD-24), emptyText by its select (SEL-62), each from the instance's prop and then from the product's words.
SEF-6 WHERE the platform has ARIA attributes (the web), WHEN the product sets an aria- attribute on the host, by the attribute or by the ARIA property that reflects it, THE select field SHALL move it to the data-aria- attribute of the same name, so that the host is no second node with its name, description or state, and SHALL expose it on the element that carries its role — an id reference by the elements it names in the host's tree or a tree around it, an error message as part of the description while the select field is invalid — except those the select field owns (aria-label, aria-labelledby, aria-disabled, aria-haspopup, aria-expanded, aria-controls), which it SHALL move and not expose: its name is label (SEF-1). WHEN the product removes the aria- attribute or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaDescribedByElements…) to null, THE select field SHALL take it off that element. WHEN the product sets an aria- attribute the select field owns THE select field SHALL report it in debug builds.

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

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

स्पेक Web SwiftUI Jetpack Compose Flutter React Native
कंपोनेंट tanrei-select-field TanreiSelectField TanreiSelectField TanreiSelectField SelectField
variant · प्रॉपर्टी variant variant variant variant variant
size · प्रॉपर्टी size size size size size
value · प्रॉपर्टी value selection value value value
label · प्रॉपर्टी label label label labelText label
labelHidden · प्रॉपर्टी labelHidden labelsHidden labelHidden labelHidden labelHidden
placeholder · प्रॉपर्टी placeholder prompt placeholder hintText placeholder
supportingText · प्रॉपर्टी supportingText supportingText supportingText helperText supportingText
errorText · प्रॉपर्टी errorText errorText errorText errorText errorText
error · प्रॉपर्टी error error isError isError error
disabled · प्रॉपर्टी disabled disabled enabled enabled disabled
readOnly · प्रॉपर्टी readOnly readOnly readOnly readOnly readOnly
required · प्रॉपर्टी required isRequired required required required
optional · प्रॉपर्टी optional isOptional optional optional optional
requiredMark · प्रॉपर्टी requiredMark requiredMark requiredMark requiredMark requiredMark
requiredText · प्रॉपर्टी requiredText requiredText requiredText requiredText requiredText
optionalText · प्रॉपर्टी optionalText optionalText optionalText optionalText optionalText
open · प्रॉपर्टी open isPresented expanded controller open
separation · प्रॉपर्टी separation separation separation separation separation
iconSpace · प्रॉपर्टी iconSpace iconSpace iconSpace iconSpace iconSpace
density · प्रॉपर्टी density density density density density
status · प्रॉपर्टी status status status status status
statusText · प्रॉपर्टी statusText statusText statusText statusText statusText
emptyText · प्रॉपर्टी emptyText emptyText emptyText emptyText emptyText
change · इवेंट change selection onValueChange onChanged onValueChange
toggle · इवेंट toggle isPresented onExpandedChange onOpenChanged onOpenChange
टिप्पणियाँ The tag tanrei-select-field, the class TanreiSelectField, the React name SelectField. It takes every attribute, property, event and child of the select and of its Field, under the same names. The element is composed as every field element is; what follows is what is particular to it. Members: <tanrei-field> holding one <tanrei-select> in its default slot; the product places none, and gives the options. The host is display: block, as the Field is. Value member: tanrei-select. The host is the form's element — name, the value and its state, validity anchored on the select's trigger, reset to the value attribute, restore, form, a disabled fieldset — and the select inside has no name. Props, set as properties on the member each is from. On the Field: label, labelHidden, supportingText, errorText, error, disabled, required, optional, requiredMark, requiredText, optionalText. On the select: variant, size, value, placeholder, readOnly, open, separation, iconSpace, status, statusText, emptyText, and inline, the select's attribute for tests and fixtures, which is no prop of the spec and is passed on so that an open fixture and its twin are staged alike. Attributes are the members' own: kebab-case, except readonly. Props of one name on both members — label, labelHidden, error, disabled — are the Field's; the select's are never set by the element and reach the select through the connection. Events: change is the select's own composed, bubbling Event and leaves by itself with the host as its target. toggle is the select's CustomEvent, composed and not bubbling: it is heard on the host, as on any shadow host, and by no ancestor. Two props are the select's at every moment and are read through to it, never copied — value (the element's value is its value member's) and open, by the same accessor, as the combobox field reads its three — so each is already new in every listener of change and of toggle, capturing or bubbling, and when open is taken back with no event. No listener of the element's takes either. None is stopped and none is copied. Slots: label-icon is passed to the Field and leading-icon to the select, each by a slot element of the same name rendered only while the host has a child for it. The default slot is passed to the select — <tanrei-select><slot></slot></tanrei-select> — and is always rendered, where a field element otherwise has no default slot: the product's <tanrei-option> and <tanrei-option-group> children are assigned to it, and the select reads them through it. A child that is neither, and has no slot name the element has, is not rendered and is reported in a debug build. Parts: the member hosts are field and select. Exported from the Field: label, label-icon, requirement-label, supporting-text, counter (never drawn here). Exported from the select: container, outline, active-indicator, label, requirement-label, value, placeholder, leading-icon, chevron, list, option, option-label, option-supporting-text, option-leading-icon, mark, group, group-title, divider, status. Two names collide, label and requirement-label. Each is exported with its member's name before it, always (field-label, select-label, field-requirement-label, select-requirement-label), and under the bare name from both members as well, because the two are one thing to a person and are never drawn at once: FLD-25 is the sentence that holds it. Focus: the shadow root does not delegate. focus() and blur() call the select's; a press on the label row focuses the trigger by FLD-12 and opens nothing, a press on the trigger opens the list, and a press on the help does nothing. The list is the select's own popover in the top layer: it is placed against the trigger, both in the select's shadow tree, and a press on the Field's rows is a press outside it (SEL-27). The connection is the Field's with its control, with one value more upward, drawnFocused (SEL-63, FLD-13), the same value the combobox says; the element takes no part in it. Parts and tokens of its own: none. The element writes no custom property: --tanrei-comp-field-*, --tanrei-comp-input-box-* and --tanrei-comp-select-* reach the members by inheritance, and one select field is set apart by setting any of them on the element. What its twin cannot do that it does: nothing. The twin: <tanrei-field label="Country" required supporting-text="Where your invoices are addressed."><tanrei-select name="country" value="jp"><tanrei-option value="jp">Japan</tanrei-option></tanrei-select></tanrei-field>. Before the element is defined its options are running text in the page, as a select's are: hide tanrei-select-field:not(:defined) > * and reserve the block size. Words: none of its own; required-text and optional-text left empty are read by the Field from the product's words. TanreiSelectField("Country", selection: $country, supportingText: "…") { TanreiSelectOption("Japan").tag("jp") … }: a view whose body is TanreiField(…) { TanreiSelect(selection:) { options } } with each argument passed to the member it is from, and nothing else. The option content is the select's own, passed through as a view builder. labelHidden follows .labelsHidden() and disabled follows .disabled(_:), both read by the Field. The product's words are read by the Field from the \.tanreiWords environment value. Not built on this platform yet, nor is the select itself. TanreiSelectField(value, onValueChange, label, supportingText = …) { TanreiSelectOption("Japan", "jp") … }: a composable that calls TanreiField(…) { TanreiSelect(…) { content() } } with each argument passed to the member it is from, and nothing else; the content lambda is the select's. enabled is the inverse flag and isError keeps Compose's name, both the Field's. The product's words are read by the Field from LocalTanreiWords. Not built on this platform yet, nor is the select itself. TanreiSelectField(value:, onChanged:, labelText:, helperText:, options: […]): a widget that builds TanreiField(child: TanreiSelect(…)) with each argument passed to the member it is from, and nothing else; labelText, hintText, helperText, errorText and enabled keep InputDecoration's names. TanreiSelectFormField wraps it as a FormField<String> (validator, onSaved, autovalidateMode), which is how a Flutter form takes part, and its errorText is the Field's. The product's words are read by the Field from the TanreiWords inherited widget. Not built on this platform yet, nor is the select itself. <SelectField label="Country" value={value} onValueChange={setValue} supportingText="…" options={[…]} />: a component that renders <Field …><Select … /></Field> with each prop passed to the member it is from, and nothing else; options is the select's array. The product's words are read by the Field from the TanreiWordsProvider context. Not built on this platform yet, nor is the select itself.

टोकन

टोकन किसका एलियास रिज़ॉल्व किया गया मान (लाइट)
--tanrei-comp-field-counter-gap sys.space.space200 16px
--tanrei-comp-field-error-text-gap sys.space.space50 4px
--tanrei-comp-field-error-text-placement — 0
--tanrei-comp-field-label-icon-gap sys.space.space100 8px
--tanrei-comp-field-label-icon-size sys.icon.small 20px
--tanrei-comp-field-label-gap sys.space.space100 8px
--tanrei-comp-field-motion-state-duration sys.motion.role.state.default 250ms
--tanrei-comp-field-motion-state-easing sys.motion.easing.state cubic-bezier(0.2, 0, 0, 1)
--tanrei-comp-field-requirement-asterisk-gap sys.space.space25 2px
--tanrei-comp-field-requirement-gap sys.space.space100 8px
--tanrei-comp-field-requirement-mark sys.behavior.requirement-mark 0
--tanrei-comp-field-standard-counter-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-field-standard-disabled-counter-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-error-text-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-error-counter-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-error-label-icon-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-error-label-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-error-required-asterisk-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-error-supporting-text-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-error-value-text-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-label-icon-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-label-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-required-asterisk-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-supporting-text-color — #1b1b1b · 38%
--tanrei-comp-field-standard-disabled-value-text-color — #1b1b1b · 38%
--tanrei-comp-field-standard-error-text-color sys.color.error #cd262f
--tanrei-comp-field-standard-error-counter-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-field-standard-error-label-icon-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-field-standard-error-label-color sys.color.on-surface #1b1b1b
--tanrei-comp-field-standard-error-required-asterisk-color sys.color.primary #1b1b1b
--tanrei-comp-field-standard-error-supporting-text-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-field-standard-error-value-text-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-field-standard-focused-counter-color — #4b4b4b
--tanrei-comp-field-standard-focused-error-text-color — #cd262f
--tanrei-comp-field-standard-focused-error-counter-color — #4b4b4b
--tanrei-comp-field-standard-focused-error-label-icon-color — #4b4b4b
--tanrei-comp-field-standard-focused-error-label-color — #1b1b1b
--tanrei-comp-field-standard-focused-error-required-asterisk-color — #1b1b1b
--tanrei-comp-field-standard-focused-error-supporting-text-color — #4b4b4b
--tanrei-comp-field-standard-focused-error-value-text-color — #4b4b4b
--tanrei-comp-field-standard-focused-label-icon-color — #4b4b4b
--tanrei-comp-field-standard-focused-label-color — #1b1b1b
--tanrei-comp-field-standard-focused-required-asterisk-color — #1b1b1b
--tanrei-comp-field-standard-focused-supporting-text-color — #4b4b4b
--tanrei-comp-field-standard-focused-value-text-color — #4b4b4b
--tanrei-comp-field-standard-label-icon-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-field-standard-label-color sys.color.on-surface #1b1b1b
--tanrei-comp-field-standard-required-asterisk-color sys.color.primary #1b1b1b
--tanrei-comp-field-standard-supporting-text-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-field-standard-value-text-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-field-supporting-text-gap sys.space.space50 4px
--tanrei-comp-field-value-text-gap sys.space.space200 16px
--tanrei-comp-field-label-typescale sys.typescale.label 500 14px/1.4286
--tanrei-comp-field-supporting-text-typescale sys.typescale.label-small 500 12px/1.3333
--tanrei-comp-field-value-text-typescale sys.typescale.label 500 14px/1.4286

फ़िक्स्चर

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

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

वेब क्या अलग ढंग से बनाता है

  • एलिमेंट के शैडो रूट में एक <tanrei-field> रहता है, जिसके भीतर एक <tanrei-select> है, और कुछ नहीं। एलिमेंट को इंपोर्ट करने से दोनों डिफ़ाइन हो जाते हैं।
  • विकल्प <tanrei-select-field> के चाइल्ड के रूप में आपके ही रहते हैं। वे कभी हटाकर कहीं और नहीं रखे जाते और कॉपी नहीं किए जाते: वे भीतर के सिलेक्ट तक एक स्लॉट से पहुँचते हैं, और जब वे बदलते हैं तो सिलेक्ट उन्हें दोबारा पढ़ता है। उन्हें हाथ से बदलना (replaceChildren()) वैसे ही काम करता है जैसे सिलेक्ट पर।
  • यह फ़ॉर्म से जुड़ा एलिमेंट है। वह name और form लेता है, सिर्फ़ मान सबमिट करता है (अक्षम रहते कुछ नहीं, और सिर्फ़ पढ़ने के लिए होने पर भी सबमिट करता है), रीसेट होने पर value ऐट्रिब्यूट पर लौटता है, अक्षम <fieldset> के साथ अक्षम होता है, और जब तक required सेट है और मान ख़ाली है, फ़ॉर्म को बताता है कि मान नहीं है। उसके दोनों सदस्य फ़ॉर्म में कोई एंट्री नहीं जोड़ते।
  • change सिलेक्ट का composed और बबल होने वाला इवेंट है। toggle सिलेक्ट का CustomEvent है, जिसके साथ detail.open और detail.reason आते हैं: वह composed है और बबल नहीं होता, इसलिए वह एलिमेंट पर सुना जाता है और <details> जैसे किसी पूर्वज एलिमेंट पर कभी नहीं। इनका टार्गेट यही एलिमेंट है, और हर लिसनर में event.target.value और event.target.open में नए मान होते हैं।
  • भाग: field और select दोनों सदस्य हैं। उनके अपने भागों के नाम यहाँ वही हैं जो एक स्तर नीचे हैं: label-icon, supporting-text; container, outline, active-indicator, value, placeholder, leading-icon, chevron, list, option, option-label, option-supporting-text, option-leading-icon, mark, group, group-title, divider, status। label और requirement-label दोनों में से वह हैं जो दिखाया जाता है, यानी फ़ील्ड की पंक्ति या सिलेक्ट का फ़्लोट होता लेबल, और field-label, select-label, field-requirement-label और select-requirement-label सिर्फ़ किसी एक सदस्य के भाग के नाम हैं।
  • एलिमेंट पर ख़ुद फ़ोकस नहीं जा सकता: focus() ट्रिगर पर जाता है, और पेज का अपना <label for> फ़ोकस वहीं ले जाता है। लेबल की पंक्ति पर दबाने से फ़ोकस ट्रिगर पर आता है और कुछ नहीं खुलता; ट्रिगर पर दबाने से लिस्ट खुलती है; सहायता पर दबाने से कुछ नहीं होता।
  • एलिमेंट का कोई रोल नहीं है। उसे label से नाम दें, और जहाँ लेबल कहीं और दिखाया गया है वहाँ साथ में label-hidden दें। उसे aria-label से कभी नाम न दें, जो यहाँ किसी चीज़ को नाम नहीं देता।
  • ऐट्रिब्यूट सदस्यों के अपने हैं: label-hidden, supporting-text, error-text, required-mark, required-text, optional-text, readonly।
  • जो चाइल्ड न विकल्प है, न विकल्पों का ग्रुप, न label-icon या leading-icon के लिए ग्लिफ़, वह नहीं दिखाया जाता; डीबग बिल्ड यह बताता है।
  • एलिमेंट के डिफ़ाइन होने से पहले उसके विकल्प चलता टेक्स्ट होते हैं। tanrei-select-field:not(:defined) > * को छिपाएँ और ऊँचाई के लिए जगह रखें। जिस पेज को स्क्रिप्ट के बिना काम करना है, वह अपने <label> के साथ नेटिव <select> इस्तेमाल करता है।

दिशानिर्देश

करें

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

न करें

  • किसी बार या टूलबार में labelHidden वाला सिलेक्ट फ़ील्ड इस्तेमाल न करें। वह अकेला सिलेक्ट है, जिसे नाम उसके अपने label से मिलता है।
  • प्लेसहोल्डर को लेबल की तरह इस्तेमाल न करें। कुछ चुनते ही वह ग़ायब हो जाता है।
  • बिना बताए change पर किसी दूसरे पेज पर न ले जाएँ, फ़ॉर्म सबमिट न करें और कुछ न हटाएँ। लोग लिस्ट को पढ़ने के लिए उसमें आगे-पीछे जाते हैं।
  • सिलेक्ट फ़ील्ड को फ़ील्ड के भीतर न रखें। वह पहले से एक फ़ील्ड है; डीबग बिल्ड यह बताता है। फ़ील्ड जिस कंट्रोल को फ़्रेम देता है, वह सिलेक्ट है।
  • उसे aria-label से नाम न दें। जहाँ कोई लेबल नहीं दिखाना है, वहाँ label और labelHidden दें।

सुलभता

रोल
combobox
लेबलिंग
The select field adds nothing to what its members expose and coordinates nothing: the Field gives the select its name, its description and its required, invalid and disabled states (FLD-8, FLD-10, FLD-11, FLD-14), and the select carries them on its own trigger and names its list by the same name (SEL-11, SEL-48). Assistive technology meets one control that opens a list of choices, named by label, with the chosen option's label as its value — exactly as it meets a Field around a select written by hand.
न्यूनतम टार्गेट
दिखने वाला आकार छोटा होने पर भी हिट एरिया न्यूनतम टार्गेट साइज़ को पूरा करता है। minimum 32px · pointer 44px · spacing 8px · touch 48px

कीबोर्ड

कुंजियाँ क्रिया
Every key The select's (its accessibility block; SEL-23, SEL-27, SEL-28, SEL-31, SEL-33, SEL-34). The select field handles no key and adds no focus stop (SEF-3).

टिप्पणियाँ

  • One level down is the same thing: a Field with a select in it, holding the same options. Every fixture has that pair as its twin, and the accessibility tree of the two is the same (SEF-1).
  • On the web the two members stand in the select field's own shadow root, so the form meets the select field and not the select (SEF-2), focus passes through to the trigger (SEF-3), and the options, which stay the product's children, reach the select through a slot and are read by it as data.
  • A select with no visible label of its own — in a header, a toolbar, a column of a table — is the bare select, named by its own label, not a select field with labelHidden.

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

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

  • यह एक ऐसा कॉम्बोबॉक्स है जिसमें टाइप करके संपादन नहीं किया जा सकता, यानी सिलेक्ट का। उसका नाम label है, चाहे वह दिखाया गया हो या नहीं; उसका विवरण दिखाया जा रहा सहायक या त्रुटि टेक्स्ट है, और जब तक फ़ील्ड वैकल्पिक है, उसके साथ वैकल्पिक का टेक्स्ट।
  • जब तक error true है, वह अमान्य के रूप में दिया जाता है; जब तक required सेट है, ज़रूरी के रूप में; जब तक disabled true है, अक्षम के रूप में; जब तक readOnly true है, सिर्फ़ पढ़ने वाले के रूप में; और जब तक उसकी लिस्ट खुली है, फैले हुए (expanded) के रूप में।
  • नाम, विवरण और स्टेट ठीक वैसे ही जोड़े जाते हैं जैसे फ़ील्ड उन्हें अपने भीतर के किसी भी कंट्रोल से जोड़ता है। एक स्तर नीचे, हाथ से लिखा गया फ़ील्ड वही कंट्रोल है।
  • दिखने वाला लेबल, ज़रूरी या वैकल्पिक का निशान और ग्लिफ़ सहायक तकनीक को दूसरी बार नहीं दिए जाते।
  • यह Tab कुंजी के लिए एक ही पड़ाव है। लेबल पर दबाने से फ़ोकस ट्रिगर पर आता है और कुछ नहीं खुलता; सहायता पर दबाने से कुछ नहीं होता।
  • जो त्रुटि फ़ोकस के सिलेक्ट फ़ील्ड में रहते हुए आती है, उसे उसका फ़ील्ड सदस्य एक बार, बिना टोके (polite), पढ़कर सुनाता है।
  • लिस्ट की हर चीज़, यानी सक्रिय विकल्प, विकल्पों के नाम, विवरण और स्टेट, और ग्रुप, सिलेक्ट की है, जैसा सिलेक्ट के पेज पर है।
  • दिशा, बड़ा किया गया टेक्स्ट और फ़ोर्स्ड कलर्स, इन सबको हर सदस्य अपने ढंग से सँभालता है।
  • इसके अपने कोई शब्द नहीं हैं। requiredText और optionalText ख़ाली छोड़े जाएँ तो फ़ील्ड उन्हें प्रॉडक्ट के शब्दों से पढ़ता है।

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

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

  • हर सिलेक्ट फ़ील्ड को label दें, और हर विकल्प को एक लेबल।
  • मान को ख़ुद वैलिडेट करें, error सेट करें, और errorText ऐसा लिखें कि वह बताए कि जवाब कैसे ठीक किया जाए।
  • ज़रूरी या वैकल्पिक होने के शब्द दें: सिलेक्ट फ़ील्ड पर required-text और optional-text, या setWords({ requiredText, optionalText }) से पूरे प्रॉडक्ट के लिए एक बार। Tanrei अपना कोई शब्द साथ नहीं देता: requiredText के बिना टैग की जगह तारांकन दिखता है, और optionalText के बिना न कोई टैग दिखता है, न कुछ कहा जाता है। देखें प्रॉडक्ट के शब्द।
  • एक सिलेक्ट फ़ील्ड के भीतर विकल्पों के मान अलग-अलग रखें।