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

बटन

एक टैप या क्लिक से लोगों को कोई क्रिया करने, किसी चीज़ को चालू-बंद करने या किसी गंतव्य पर जाने देता है।

content_copyMarkdown में देखें
श्रेणी
ऐक्शन
टोकन
comp.button
स्तर
आधार
इनमें उपयोग
Chat composer, Copy button

अवलोकन

Web
tanrei-button
schedule
SwiftUI
TanreiButton
schedule
Jetpack Compose
TanreiButton
schedule
Flutter
TanreiButton
schedule
React Native
Button
schedule

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

वेरिएंट

FilledTonalElevatedOutlinedText

प्लेग्राउंड

Deploy
filledtonalelevatedoutlinedtext
हर कंट्रोल लाइव कंपोनेंट की एक प्रॉपर्टी सेट करता है, और कोड भी उसी के साथ बदलता है। आपकी सेटिंग पेज के पते में रहती है, इसलिए लिंक खोलने पर वही स्थिति दिखती है। यह कोड वेब के लिए है। दूसरे प्लैटफ़ॉर्म के लिए “प्लैटफ़ॉर्म के अनुसार नामों का मिलान” देखें।

इस्तेमाल

Web और React के उदाहरण मौजूदा स्पेक दिखाते हैं। SwiftUI, Compose, Flutter और React Native पीछे हैं: वे अभी बटन का पिछला संशोधन देते हैं, जिसमें सिर्फ़ आइकन वाला रूप और टॉगल एक अलग आइकन बटन हैं, और जिसमें न सिर्फ़ आइकन वाले बटन की चौड़ाइयाँ हैं, न लिंक वाला रूप। जब तक वे बराबरी पर नहीं आते, उनके उदाहरण वही संशोधन दिखाते हैं।

<tanrei-button variant="filled">डिप्लॉय करें</tanrei-button>
<tanrei-button variant="outlined" size="small">रद्द करें</tanrei-button>
<tanrei-button busy busy-label="डिप्लॉय हो रहा है">डिप्लॉय करें</tanrei-button>

<!-- href के साथ यह एक लिंक है, जो उसी बटन के रूप में बनता है। -->
<tanrei-button variant="tonal" href="/pricing/">क़ीमतें देखें</tanrei-button>

<script type="module">
  import '@tanrei/web/components/button';
  document.querySelector('tanrei-button').addEventListener('click', deploy);
</script>
import { Button } from '@tanrei/react';

<Button variant="filled" onClick={deploy}>डिप्लॉय करें</Button>
<Button variant="outlined" size="small" onClick={cancel}>रद्द करें</Button>
<Button disabled>डिप्लॉय हो रहा है…</Button>

// href के साथ यह एक लिंक है, जो उसी बटन के रूप में बनता है।
<Button variant="tonal" href="/pricing/">क़ीमतें देखें</Button>
import Tanrei

TanreiButton("डिप्लॉय करें", variant: .filled) { deploy() }
TanreiButton("रद्द करें", variant: .outlined, size: .small) { cancel() }

// अक्षम स्टेट SwiftUI के एनवायरनमेंट से आता है।
TanreiButton("डिप्लॉय हो रहा है…") {}
  .disabled(true)
import io.github.chnotchy.tanrei.components.*

TanreiButton(text = "डिप्लॉय करें", onClick = ::deploy, variant = TanreiButtonVariant.Filled)
TanreiButton(text = "रद्द करें", onClick = ::cancel, variant = TanreiButtonVariant.Outlined, size = TanreiButtonSize.Small)

// Compose उलटा फ़्लैग इस्तेमाल करता है।
TanreiButton(text = "डिप्लॉय हो रहा है…", onClick = {}, enabled = false)
import 'package:tanrei/tanrei.dart';

TanreiButton(variant: TanreiButtonVariant.filled, onPressed: deploy, child: const Text('डिप्लॉय करें'));
TanreiButton(variant: TanreiButtonVariant.outlined, size: TanreiButtonSize.small, onPressed: cancel, child: const Text('रद्द करें'));

// onPressed का null होना बटन को अक्षम कर देता है।
TanreiButton(onPressed: null, child: const Text('डिप्लॉय हो रहा है…'));
import { Button } from '@tanrei/react-native';

<Button variant="filled" onPress={deploy}>डिप्लॉय करें</Button>
<Button variant="outlined" size="small" onPress={cancel}>रद्द करें</Button>
<Button disabled>डिप्लॉय हो रहा है…</Button>

आइकन, सिर्फ़ आइकन, और टॉगल

बटन अपने लेबल के साथ एक आइकन रख सकता है: शुरू में, या iconPosition को trailing करने पर अंत में। आइकन की ओर की पैडिंग लेबल की ओर की पैडिंग से एक स्टेप कम होती है, ताकि दोनों ओर की जगह बराबर दिखे। लेबल के बिना यह सिर्फ़ आइकन वाला बटन है: उतना ही चौड़ा गोला जितनी बटन की ऊँचाई है, जिसका नाम label से आता है, और तब label ज़रूरी है। toggle सेट होने पर यह हर बार दबाने पर अपना selected बदलता है, स्टेट को अपने रंगों और ग्लिफ़ के फ़िल से दिखाता है, और उसे दबाए हुए स्टेट के रूप में पढ़कर सुनाता है।

सिर्फ़ आइकन वाले बटन और एक टॉगल

searcheditfavoriteआगेarrow_forward

Tanrei में आइकन बटन कोई अलग कंपोनेंट नहीं है। अगर आप Material के नाम जानते हैं, तो वे यहाँ इस तरह मिलते हैं:

Material Tanrei
Icon button आइकन वाला और बिना लेबल का बटन
Standard icon button text वेरिएंट
Filled, tonal और outlined icon button filled, tonal और outlined वेरिएंट
Icon toggle button toggle और selected

Text टॉगल को एक आइकन दें। कंटेनर के बिना, सिर्फ़ लेबल वाला Text टॉगल अपना स्टेट सिर्फ़ टेक्स्ट के रंग के बदलाव से दिखाता है; ग्लिफ़ के फ़िल से स्टेट साफ़ दिखता है।

सिर्फ़ आइकन वाले बटन की चौड़ाइयाँ

सिर्फ़ आइकन वाले बटन की तीन चौड़ाइयाँ हैं। इनसे उसकी ऊँचाई कभी नहीं बदलती, और लेबल वाला बटन width को अनदेखा करता है।

width डिफ़ॉल्ट सिस्टम में (small / medium / large) किसके लिए
default जितनी ऊँचाई, उतनी चौड़ाई: 32 / 40 / 56, एक गोला आइकन वाली ज़्यादातर क्रियाएँ।
narrow ग्लिफ़ और हर ओर एक छोटा इनसेट: 28 / 32 / 32, एक कैप्सूल आइकन वाली क्रियाओं की सटी हुई पंक्ति, जैसे किसी फ़ील्ड के अंत के टूल या घनी टेबल की पंक्ति।
wide 40 / 52 / 72, एक कैप्सूल पंक्ति की वह एक क्रिया जिसका वज़न अपने पड़ोसियों से ज़्यादा होना चाहिए।

सिर्फ़ आइकन वाली चौड़ाइयाँ: default, narrow और wide

addaddaddmore_vertplay_arrow

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

व्यस्त, और अक्षम पर पहुँच में

बटन से शुरू हुई क्रिया जब तक चल रही हो, disabled की जगह busy सेट करें। व्यस्त बटन अपना साइज़, फ़ोकस के क्रम में अपनी जगह और व्यक्ति का फ़ोकस बनाए रखता है। यह अपने लेबल की जगह लोडिंग इंडिकेटर का आर्क बनाता है, और हर दबाने को ठुकरा देता है, ताकि सबमिट बटन अपना फ़ॉर्म दो बार न भेज सके; यह फ़ॉर्म के फ़ील्ड में Enter को भी रोकता है। बटन के व्यस्त होते ही सहायक तकनीक busy-label (“डिप्लॉय हो रहा है”) एक बार पढ़कर सुनाती है। क्रिया पूरी होने पर बताएँ कि क्या हुआ: तब बटन कुछ नहीं सुनाता।

अक्षम बटन फ़ोकस के क्रम से बाहर हो जाता है, इसलिए कीबोर्ड या स्क्रीन रीडर इस्तेमाल करने वाला व्यक्ति शायद उसे कभी न पाए, या यह न जान पाए कि वह कुछ करता क्यों नहीं। जहाँ व्यक्ति ख़ुद क्रिया को उपलब्ध करा सकता है, जैसे संदेश ख़ाली रहने तक भेजने का बटन, वहाँ focusable-when-disabled जोड़ें: बटन अक्षम दिखता है, अक्षम के रूप में बताया जाता है और कुछ नहीं करता, पर Tab अब भी उस तक पहुँचती है, ताकि कोई टूलटिप या विवरण बता सके कि क्यों।

व्यस्त, और अक्षम पर पहुँच में

डिप्लॉय करेंsaveभेजें

पूरी चौड़ाई

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

पूरी चौड़ाई वाले बटन

खाता बनाएँuploadफ़ाइल अपलोड करें

विनाशकारी क्रियाएँ

जिस बटन की क्रिया कोई ऐसी चीज़ हटाती या छोड़ देती है जो व्यक्ति शायद वापस न पा सके (हटाएँ, छोड़ें, सदस्य को निकालें), उस पर destructive सेट करें। बटन अपने वेरिएंट का ज़ोर बनाए रखता है और उसी में एरर का रंग लेता है। filled बटन एरर के रंग से भरा जाता है और tonal बटन एरर कंटेनर के रंग से; elevated, outlined और text बटन अपना लेबल एरर के रंग में बनाते हैं, और outlined बटन अपना किनारा भी। अक्षम होने पर यह अपने वेरिएंट के किसी भी अक्षम बटन जैसा दिखता है।

वेरिएंट वैसे ही चुनें जैसे किसी दूसरी क्रिया के लिए। जहाँ हटाना ही वह कदम है जिसके लिए व्यू बना है, जैसे “प्रोजेक्ट हटाएँ?” डायलॉग की पुष्टि वाली क्रिया, वहाँ filled इस्तेमाल करें। जहाँ वह कई क्रियाओं में से एक है, जैसे किसी सूची की हर पंक्ति में “निकालें”, वहाँ outlined या text इस्तेमाल करें। सिर्फ़ आइकन वाला बटन भी destructive ले सकता है, पर जो क्रिया पलटी नहीं जा सकती उसके लिए ग्लिफ़ से ज़्यादा साफ़ लेबल होता है। टॉगल का कोई विनाशकारी रूप नहीं होता।

लिंक का भी नहीं होता। href वाला बटन destructive को अनदेखा करता है और अपने वेरिएंट के लिंक की तरह बनता है, क्योंकि लिंक पर जाने से कुछ नहीं हटता: वह व्यक्ति को सिर्फ़ उस जगह ले जाता है जहाँ कुछ हटाया जा सकता है। निशान उस जगह की क्रिया पर लगाएँ, जैसे लिंक से खुलने वाले पेज पर “हटाएँ” बटन। डीबग बिल्ड ऐसे लिंक की रिपोर्ट करता है जिसे destructive दिया गया हो।

हर वेरिएंट में विनाशकारी बटन, और सिर्फ़ आइकन वाला बटन

प्रोजेक्ट हटाएँड्राफ़्ट छोड़ेंसदस्य को निकालेंइतिहास मिटाएँdelete

गंतव्य वाला बटन एक लिंक है

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

लिंक: वही जगह, नया टैब, सिर्फ़ आइकन और अक्षम

बटन ग्रुपटूलबारappsबटन ग्रुप
<tanrei-button href="/getting-started/">शुरुआत करें</tanrei-button>

<!-- नया टैब: लेबल के बाद का निशान अपने आप बनता है; target-label वह है जो स्क्रीन रीडर सुनाता है। -->
<tanrei-button variant="outlined" href="https://example.com/source" target="new" target-label="नए टैब में खुलता है">
  सोर्स देखें
</tanrei-button>

<!-- सिर्फ़ वेब पर: rel और download ऐंकर को दिए जाते हैं। -->
<tanrei-button variant="tonal" href="/report.pdf" download="report.pdf"><span slot="icon">download</span>रिपोर्ट डाउनलोड करें</tanrei-button>

<script type="module">
  import '@tanrei/web/components/button';
  // click पहले फ़ायर होता है। क्लाइंट-साइड राउटर उसे रद्द करके नेविगेशन ख़ुद सँभालता है।
  document.querySelector('[href="/getting-started/"]').addEventListener('click', (event) => {
    event.preventDefault();
    router.navigate('/getting-started/');
  });
</script>
import { Button } from '@tanrei/react';

<Button href="/getting-started/">शुरुआत करें</Button>

<Button variant="outlined" href="https://example.com/source" target="new" targetLabel="नए टैब में खुलता है">
  सोर्स देखें
</Button>

// click पहले फ़ायर होता है। क्लाइंट-साइड राउटर उसे रद्द करके नेविगेशन ख़ुद सँभालता है।
<Button
  href="/getting-started/"
  onClick={(event) => {
    event.preventDefault();
    router.navigate('/getting-started/');
  }}
>
  शुरुआत करें
</Button>
  • कुंजियाँ। Enter लिंक खोलती है। Space वही करती है जो वह किसी भी लिंक पर करती है (वेब पर पेज स्क्रॉल करती है), वह नहीं जो बटन पर करती है।
  • target। same (डिफ़ॉल्ट) गंतव्य को वहीं खोलता है जहाँ व्यक्ति है। new एक नया टैब या विंडो खोलता है। तब लेबल वाला बटन अपने लेबल के बाद open_in_new ग्लिफ़ दिखाता है, बशर्ते वहाँ आपका अपना अंतिम आइकन न हो। साथ ही targetLabel ज़रूरी हो जाता है: Tanrei अपना कोई शब्द साथ नहीं देता, इसलिए “नए टैब में खुलता है” आप अपने प्रॉडक्ट की भाषा में कहते हैं।
  • अक्षम। अक्षम लिंक बटन का लिंक न खोला जा सकता है, न कॉपी या ड्रैग किया जा सकता है, और वह सहायक तकनीक को अक्षम लिंक के रूप में मिलता है।
  • टॉगल। टॉगल एक स्टेट रखता है, इसलिए वह कोई गंतव्य नहीं लेता: toggle सेट रहते हुए href को अनदेखा किया जाता है।
  • सिर्फ़ वेब पर rel और download ऐंकर को दिए जाते हैं। target को new करने पर rel में हमेशा noopener जुड़ता है।
  • “देखा जा चुका” वाला कोई रूप नहीं है। लिंक बटन का रंग उसका एम्फ़ेसिस और उसका स्टेट बताता है, जैसे किसी भी बटन का।

फ़ॉर्म में

वेब पर बटन अपने फ़ॉर्म के कंट्रोल में से एक है, और type बताता है कि दबाने पर फ़ॉर्म के साथ क्या होता है। बाक़ी प्लैटफ़ॉर्म में फ़ॉर्म का कोई एलिमेंट नहीं है: वहाँ आप बटन के दबाए जाने पर और फ़ील्ड के action से एक ही फ़ंक्शन कॉल करते हैं।

type दबाने पर
button (डिफ़ॉल्ट) फ़ॉर्म के साथ कुछ नहीं करता। फ़ॉर्म के भीतर का बटन कुछ भेजे बिना कोई पिकर खोल सकता है या एक पंक्ति जोड़ सकता है।
submit फ़ॉर्म से सबमिट होने को कहता है, जैसे ब्राउज़र का अपना सबमिट बटन कहता है: पहले click, फिर फ़ॉर्म का वैलिडेशन, फिर उसका submit इवेंट।
reset click और फ़ॉर्म के reset इवेंट के बाद फ़ॉर्म के हर कंट्रोल को उसके शुरुआती मान पर लौटा देता है।
<form id="profile">
  <tanrei-text-field label="नाम" name="name" required></tanrei-text-field>
  <tanrei-button type="reset" variant="text">मिटाएँ</tanrei-button>
  <tanrei-button type="submit" variant="outlined" name="intent" value="draft">ड्राफ़्ट सेव करें</tanrei-button>
  <tanrei-button type="submit" name="intent" value="publish">प्रकाशित करें</tanrei-button>
</form>

<!-- फ़ॉर्म के बाहर: form ऐट्रिब्यूट उसे id से बताता है। -->
<tanrei-button type="submit" form="profile" name="intent" value="publish">प्रकाशित करें</tanrei-button>

<script type="module">
  import '@tanrei/web/components/button';
  import '@tanrei/web/components/text-field';
  document.querySelector('#profile').addEventListener('submit', (event) => {
    event.preventDefault();
    // दबाए गए बटन का name और value डेटा में हैं: "draft" या "publish"।
    const data = new FormData(event.target, event.submitter);
    save(data.get('name'), data.get('intent'));
  });
</script>
import { Button, TextField } from '@tanrei/react';

<form
  id="profile"
  onSubmit={(event) => {
    event.preventDefault();
    const data = new FormData(event.currentTarget, (event.nativeEvent as SubmitEvent).submitter);
    save(data.get('name'), data.get('intent'));
  }}
>
  <TextField label="नाम" name="name" required />
  <Button type="reset" variant="text">मिटाएँ</Button>
  <Button type="submit" variant="outlined" name="intent" value="draft">ड्राफ़्ट सेव करें</Button>
  <Button type="submit" name="intent" value="publish">प्रकाशित करें</Button>
</form>

// फ़ॉर्म के बाहर: form फ़ॉर्म का id है।
<Button type="submit" form="profile" name="intent" value="publish">प्रकाशित करें</Button>
  • कौन-सा फ़ॉर्म। बटन के चारों ओर का फ़ॉर्म, या वह फ़ॉर्म जिसे form ऐट्रिब्यूट id से बताता है। इसी तरह डायलॉग की क्रियाओं का या पेज हेडर का कोई बटन उस फ़ॉर्म को भेजता है जिसके भीतर वह ख़ुद नहीं है। एलिमेंट की form प्रॉपर्टी वही फ़ॉर्म लौटाती है और उसे सेट नहीं किया जा सकता।
  • फ़ील्ड में Enter। फ़ॉर्म का पहला सबमिट बटन उसका डिफ़ॉल्ट बटन है, चाहे वह Tanrei का बटन हो या ब्राउज़र का अपना। फ़ॉर्म के किसी फ़ील्ड में Enter उसे दबाती है: Tanrei के टेक्स्ट फ़ील्ड, नंबर फ़ील्ड, कलर फ़ील्ड, कॉम्बोबॉक्स, वन-टाइम कोड इनपुट या खोज में, Tanrei के चेकबॉक्स, रेडियो बटन या स्विच पर, और ब्राउज़र के अपने एक पंक्ति वाले इनपुट में। बटन click वैसे ही फ़ायर करता है जैसे किसी भी बार दबाए जाने पर, और उस click को रद्द करने से फ़ॉर्म का सबमिट होना भी रद्द हो जाता है।
  • अक्षम। अक्षम सबमिट बटन कुछ नहीं भेजता, और जब तक वह फ़ॉर्म का डिफ़ॉल्ट बटन है, वह Enter को भी रोकता है, ताकि जो फ़ॉर्म तैयार नहीं है वह अपने बटन को लाँघकर न भेजा जाए। <fieldset disabled> के भीतर का बटन उसके साथ अक्षम होता है, उसका type चाहे जो हो। <fieldset disabled> के भीतर का लिंक बटन अक्षम नहीं होता।
  • कौन-सा बटन दबाया गया। name और value तभी भेजे जाते हैं जब फ़ॉर्म उसी बटन ने भेजा हो। उन्हें अपने submit लिसनर में event.submitter.value से या new FormData(form, event.submitter) से पढ़ें। event.submitter Tanrei का एलिमेंट नहीं है। वह एक नेटिव <button> है, जिसे एलिमेंट submit इवेंट के डिस्पैच होने के दौरान अपनी जगह पर रखता है, इसलिए event.submitter की तुलना एलिमेंट से न करें।
  • फ़ॉर्म कैसे भेजा जाता है, यह सिर्फ़ फ़ॉर्म तय करता है। formaction, formmethod, formenctype, formtarget और formnovalidate नहीं पढ़े जाते। वैलिडेशन के बिना ड्राफ़्ट सेव करने के लिए उस बटन के click लिसनर में फ़ॉर्म का noValidate सेट करें: वह लिसनर वैलिडेशन से पहले चलता है।
  • दो बार भेजना। बटन दूसरी बार दबाए जाने से बचाव नहीं करता। जब तक आपका अनुरोध चल रहा है, बटन को अक्षम रखें, या दूसरे submit को अनदेखा करें।
  • टॉगल और लिंक type को अनदेखा करते हैं: जो दबाना कोई स्टेट बदलता है या कहीं ले जाता है, वह फ़ॉर्म नहीं भेजता। जो type इन तीनों में से कोई नहीं है, वह button की तरह काम करता है।

लेबल से लंबा नाम

जब एक ही शब्द कई बटनों पर दिखता है, जैसे किसी लिस्ट की हर पंक्ति में “हटाएँ”, तो अकेला शब्द स्क्रीन रीडर इस्तेमाल करने वाले व्यक्ति को यह नहीं बताता कि कौन-सा बटन किस पंक्ति का है। हर बटन को एक label दें: तब दिखने वाले टेक्स्ट की जगह वही बटन का पूरा एक्सेसिबल नाम होता है, और बटन ठीक पहले जैसा बनता है।

हर पंक्ति में वही शब्द, और हर बटन का नाम उसकी पंक्ति के अनुसार

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

स्पेक

साइज़ और अक्षम

SmallMediumLargeDisabledDisabled

स्टेट

variant सक्षम अक्षम होवर फ़ोकस दबाया हुआ
filled filled, सक्षम filled, अक्षम filled, होवर filled, फ़ोकस filled, दबाया हुआ
filled · toggle · selected filled toggle selected, सक्षम filled toggle selected, अक्षम filled toggle selected, होवर filled toggle selected, फ़ोकस filled toggle selected, दबाया हुआ
tonal tonal, सक्षम tonal, अक्षम tonal, होवर tonal, फ़ोकस tonal, दबाया हुआ
tonal · toggle · selected tonal toggle selected, सक्षम tonal toggle selected, अक्षम tonal toggle selected, होवर tonal toggle selected, फ़ोकस tonal toggle selected, दबाया हुआ
elevated elevated, सक्षम elevated, अक्षम elevated, होवर elevated, फ़ोकस elevated, दबाया हुआ
elevated · toggle · selected elevated toggle selected, सक्षम elevated toggle selected, अक्षम elevated toggle selected, होवर elevated toggle selected, फ़ोकस elevated toggle selected, दबाया हुआ
outlined outlined, सक्षम outlined, अक्षम outlined, होवर outlined, फ़ोकस outlined, दबाया हुआ
outlined · toggle · selected outlined toggle selected, सक्षम outlined toggle selected, अक्षम outlined toggle selected, होवर outlined toggle selected, फ़ोकस outlined toggle selected, दबाया हुआ
text text, सक्षम text, अक्षम text, होवर text, फ़ोकस text, दबाया हुआ
text · toggle · selected text toggle selected, सक्षम text toggle selected, अक्षम text toggle selected, होवर text toggle selected, फ़ोकस text toggle selected, दबाया हुआ
हर सेल असली कंपोनेंट है, जो अपनी स्टेट में रुका हुआ है। इसे इस्तेमाल नहीं किया जा सकता। यहाँ नहीं दिखाई गईं: loading।

संरचना

संरचना

वेब पैकेज जिस तरह फ़िक्स्चर filled-leading-icon बनाता है, उसी के ऊपर बनाया गया।
भाग विवरण
1 container The shape that holds the content, defines the visual bounds and carries hover, focus and press. A pill with a label; with an icon alone, as wide as it is high (a circle in the default system's corner) or at the narrow or the wide width of its size.
2 label · वैकल्पिक Text that names the action.
3 icon · वैकल्पिक A glyph of the system's icon set, at the leading or the trailing side of the label, or alone. Outlined when unselected, filled when selected.
4 outline · वैकल्पिक The border of the outlined variant.
5 focus-ring Gap-then-ring indicator shown for keyboard focus.

माप

माप

लंबाई टोकन मान (px)
container padding-inline-start-with-icon tanrei.comp.button.container.padding-inline-start-with-icon.medium 12
container gap tanrei.comp.button.container.gap.medium 8
container padding-inline-end tanrei.comp.button.container.padding-inline-end.medium 16
container height tanrei.comp.button.container.height.medium 40
icon size tanrei.comp.button.icon.size.medium 24
वेब पैकेज जिस तरह फ़िक्स्चर filled-leading-icon बनाता है, उसी के ऊपर बनाया गया।

प्रॉपर्टी

प्रॉपर्टी टाइप डिफ़ॉल्ट विवरण
variant filled | tonal | elevated | outlined | text "filled" Emphasis level; whether the action deletes or discards something is destructive, which every variant takes. Use one filled button per view for the main action; an icon-only text button is the quiet icon action of a toolbar or a row. A design system may add values. Default filled; a Button placed as a dialog's or a side sheet's action without a variant takes that host's (DLG-20, SSH-17), and a side sheet's close button takes comp.side-sheet.close-button.variant (SSH-5).
destructive boolean false Marks an action that deletes or discards something a person may not get back (Delete, Discard, Remove member): the button keeps its variant's emphasis and takes the error role's color in it — filled in the error color, tonal in its tonal container, and the error color for the label of an elevated, outlined or text button and the edge of an outlined one (BTN-40). Use it for that kind of action alone, never for emphasis. It adds a color, not a meaning: the label still says what the button does (BTN-42). A toggle has no destructive look: ignored while toggle is true (BTN-41). A link deletes nothing: ignored while href is not empty (BTN-43).
size small | medium | large "medium" Visual height (32 / 40 / 56), which is also an icon-only button's width at its default width. The hit area always meets the minimum target. A design system may add values.
width default | narrow | wide "default" How wide an icon-only button is. default: as wide as it is high (32 / 40 / 56). narrow: its glyph with a small inset on each side (28 / 32 / 32), for a tight row of icon actions. wide: 40 / 52 / 72, for the one action of a row that should weigh more. Ignored when the button has a label, and while fullWidth is true. The hit area meets the minimum target at every width.
fullWidth boolean false Makes the button take the whole width its container gives it, its content centred, at the height of its size (BTN-39): a form's only action on a narrow screen, the action at the foot of a card or a sheet. Ignored while a host lays the button out (a button group, a toolbar, or the actions of a dialog, a side sheet, a popover, a callout or an empty state), which gives it a width of its own (a button group's fullWidth for a row of them).
iconPosition leading | trailing "leading" Which side of the label the icon sits on, in the reading direction. Ignored when the button has no label or no icon.
toggle boolean false Makes the button a two-state control: activation switches selected, and assistive technology announces it as pressed or not pressed. A toggle takes no destination: href is ignored while toggle is true.
selected boolean false Whether a toggle is on. Ignored unless toggle is true.
disabled boolean false Prevents interaction and removes the button from the focus order — unless focusableWhenDisabled keeps it there (BTN-38). A disabled button with a destination is not a link that can be followed (BTN-25); on the web a disabled submit button sends nothing, and still stops Enter from sending its form where it is the form's default button (BTN-32).
focusableWhenDisabled boolean false Keeps a disabled button in the focus order: it is drawn and exposed as disabled and refuses every activation, but a keyboard and a screen reader can still reach it, so that a person can learn why it does nothing (a tooltip, a description). For an action a person can make available — a send button while the message is empty. Ignored unless disabled is true (BTN-38).
busy boolean false The action it started is under way: the button keeps its focus, its place in the focus order and its size, draws the loading indicator's arc in place of its label and icon, refuses every activation, and tells assistive technology through busyLabel (BTN-36, BTN-37). For a save or a send that takes a moment; it is not disabled, so focus stays where the person left it.
busyLabel string "" What assistive technology is told while the button is busy ("Saving"): announced once when it becomes busy and read after its name while it is. Tanrei ships no words of its own. Required while busy is true; ignored otherwise.
href string "" The destination: an address as the platform's links take one (a URL; on the web a path or a fragment as well). Not empty, it makes the button a link and not a button: the link role, activated by pointer, touch or Enter and not by Space, opened by the platform as its own links are, and drawn exactly as the button it would otherwise be (BTN-22, BTN-23). Ignored while toggle is true: a control that holds a state is not a destination (BTN-26).
target same | new "same" Where the destination opens. same: where the person is — the same tab on the web, the app's own handling of the address elsewhere. new: a new context — a new tab or window on the web, outside the current screen elsewhere — which a labelled button marks with the glyph open_in_new after its label and says through targetLabel (BTN-24). Ignored without href.
targetLabel string "" What assistive technology reads after the link's name while target is new ("opens in a new tab"). Tanrei ships no words of its own, so the product gives them in its own language, as it gives a chip its removeLabel. Required while target is new; ignored otherwise.
label string "" The accessible name, where it is more than what the button draws. Required for an icon-only button: an icon alone is not a name. Optional for a button that draws a label: left empty, the drawn text is the name; given, it is the whole name in place of the drawn text, which stays drawn — for an action repeated in every row (drawn "Reset", named "Reset: Spacing") — and it must contain the drawn text, so that a person who says what they see is heard (BTN-16). It is about this one button, so it is the instance's alone and reads no word of the product's.

स्लॉट

स्लॉट विवरण
default Label content: the text that names the action. Leave it empty for an icon-only button.
icon The icon: a glyph of the system's icon set, drawn through the platform's icon helper. With a label it sits at the side iconPosition names; without one it is the button's only content.

इवेंट

इवेंट विवरण
click The button was activated by pointer, touch, keyboard or assistive technology. A link button emits it before its destination opens; a product that takes the navigation itself (a client-side router) cancels it (BTN-23).
change A toggle was activated; carries the new value of selected.

स्टेट

व्यवहार

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

ID आवश्यकता
BTN-1 WHEN the user activates the button by pointer, touch, Enter or Space — a link button (BTN-22) by pointer, touch or Enter — THE button SHALL emit click exactly once.
BTN-2 WHILE disabled is true THE button SHALL NOT emit click or change, SHALL NOT be focusable and SHALL expose the disabled state to assistive technology.
BTN-3 WHILE hovered, keyboard-focused or pressed THE button SHALL render its container, label, icon, outline, elevation and opacity from the component tokens of the highest-precedence active state, with precedence pressed over focused over hovered; focus gained by pointer or touch SHALL NOT select the focused state.
BTN-4 WHEN the button receives keyboard focus THE button SHALL show the focus ring without animation; focus gained by pointer or touch SHALL NOT show it.
BTN-5 WHERE the visual size is below the minimum target THE button SHALL extend its hit area on both axes to sys.target.touch for touch input and sys.target.pointer for fine pointers, without changing its visual size; a platform that cannot tell the input type SHALL use sys.target.touch.
BTN-6 WHILE disabled is true THE button SHALL render its container, label, icon, outline, elevation and opacity from the disabled component tokens of its variant and, for a toggle, of its selection, and, while destructive is true, of its destructive parts (BTN-40).
BTN-7 WHEN variant or size names a value that the active design system does not have THE button SHALL render with the default value's tokens, and in debug builds report the unknown value.
BTN-8 WHEN the button is pressed by pointer, touch, Enter or Space THE button SHALL show the pressed state without delay and SHALL keep it visible for at least sys.motion.duration.press-hold, even when the press ends sooner.
BTN-9 WHILE pressed THE button SHALL answer as sys.behavior.pressed-feedback names: overlay applies the pressed tokens to the whole container at once; ripple grows the pressed state layer from the point of contact (from the center for keyboard activation); dim applies the pressed opacity to the whole control and draws no state layer; none draws no answer to the press. Under ripple and dim only the container color stays with the state under the press; label, icon, outline, elevation, opacity and shape still come from the pressed tokens. Under none every part stays with the state under the press. The ripple grows over comp.button.motion.feedback-duration with motion.state-easing, fades over the motion.state-duration of its size with motion.state-easing once the press has ended and press-hold has passed, and appears whole where motion is reduced.
BTN-10 THE button SHALL ease its container corners by sys.shape.corner-smoothing (0 is a quarter circle, 0.6 the iOS continuous corner; a platform with only the OS curve draws it for any amount above 0) and show its keyboard focus as sys.behavior.focus-style names (ring or glow); a platform that cannot draw a choice SHALL fall back to the first value and state that in its README. WHILE the button is an item of a connected button group THE button SHALL draw its corners and minimum width and height as the group sets them, the padding the group adds at a rounded outer end, and neither outline nor elevation ring along an edge the group joins to a neighbour under a divider, and, from a dialog, a side sheet or an image preview, its variant while none is set (DLG-20, SSH-17, IMP-8) and a host's close-button variant — the popover's, the side sheet's, the bottom sheet's, the callout's and the snackbar's close button, each an icon-only Button of the small size (POP-13, SSH-5, BSH-29, CLO-10, SNK-34; the image preview's bar names one variant for its close and zoom controls, IMP-8), and, from any component that draws it on a colored surface of its own, a tone (BTN-45), through an internal channel that is not part of its public surface (BGR-2, BGR-3, BGR-16, BGR-22, BGR-23).
BTN-11 WHILE the button has both a label and an icon THE button SHALL draw the icon at the side iconPosition names in the reading direction (leading at the start, trailing at the end, both mirrored in right-to-left layouts) and the label comp.button.container.gap.medium from it at the medium size (and the gap of its own size otherwise), with comp.button.container.padding-inline-start-with-icon.medium on the icon's side for a leading icon and comp.button.container.padding-inline-end-with-icon.medium for a trailing one, and the plain padding (comp.button.container.padding-inline-start.medium, comp.button.container.padding-inline-end.medium) on the other side, each of its own size; WHILE it has a label and no icon it SHALL use the plain padding on both sides and ignore iconPosition.
BTN-12 WHILE the button has an icon and no label THE button SHALL draw its container at the height of its size — comp.button.container.height.medium at the medium size, and the height of its own size otherwise — and at the width its width names: as wide as it is high WHILE width is default, as wide as its glyph's box (comp.button.icon.size-without-label.medium) with comp.button.container.padding-inline-narrow.medium on each side of it WHILE width is narrow, and comp.button.container.width-wide.medium wide WHILE width is wide (each of its own size), with the glyph centred, and SHALL round it by comp.button.container.shape, capped at half its shorter side, so that the default system's sys.shape.corner.full draws a circle at the default width and a capsule at the other two, and a smaller corner a rounded square or rectangle. The narrow width SHALL be the glyph and that inset twice, and nothing more: the button has no narrow width of its own to disagree with them, so a narrow button follows its glyph wherever a design system re-sizes it, and its container, state layer, ripple and outline are a capsule of that width. In the default system the inset is sys.space.space50 at every size, the least room that keeps the glyph clear of the capsule's edge; a design system that wants its narrow buttons to differ more by size gives a size a larger inset. It SHALL NOT draw an icon-only button at any other width, except to the minimum width a connected button group sets and the padding that group adds at an outer end (BTN-10). WHERE text size scales the glyph (every size follows the root font size on the web) the container SHALL grow with it and keep the proportion of its width to its height.
BTN-13 THE button SHALL draw its icon at the icon box of its size — comp.button.icon.size.medium beside a label and comp.button.icon.size-without-label.medium alone at the medium size, and so on — with the family and fill of its selection (sys.icon.family.selected and sys.icon.fill.selected only when toggle and selected are both true; otherwise sys.icon.family.unselected and sys.icon.fill.unselected), sys.icon.weight, and an optical size clamped between sys.icon.optical-size.min and sys.icon.optical-size.max; beside a label the icon SHALL take the label color of the button's look, and alone the icon color of its look (comp.button.text.icon.color for a plain text button, comp.button.text.selected.icon.color for a text toggle that is on, and so on).
BTN-14 WHEN toggle is true and the user activates the button THE button SHALL emit click and then change with the opposite of selected, in that order (as a native checkbox does, and as CHP-11 says for a filter chip), and SHALL expose selected to assistive technology as pressed or not pressed; WHILE toggle is false THE button SHALL NOT expose a pressed state.
BTN-15 WHILE toggle is true THE button SHALL render its container, label, icon and outline from the selected parts of its variant when selected is true (comp.button.filled.selected.container.color, and so on) and from the unselected parts when it is false (comp.button.filled.unselected.container.color, and so on), and its elevation from its variant's own comp.button.filled.container.elevation (and so on); WHILE toggle is false it SHALL render from the variant's own parts.
BTN-16 WHILE the label prop is not empty THE button SHALL expose it as its accessible name, whole and alone, whether or not it draws a label; WHILE the label prop is empty and the button draws a label THE button SHALL expose the drawn label's text as its accessible name; WHILE the label prop is empty and the product gives the button a name of its own on the element — aria-label, or aria-labelledby naming an element — THE button SHALL expose that name as its accessible name, over the drawn label's text where it draws one, because the platform's text alternative computation puts an author's name over the element's content; WHILE the label prop is not empty THE label prop SHALL be the name, over the product's. WHILE it has an icon and no drawn label THE button SHALL keep the glyph from assistive technology, and WHILE the label prop is empty as well and the product gives it no name of its own SHALL still render, and in debug builds report that it has no accessible name. WHILE the button draws a label and the label prop is not empty THE button SHALL draw the label exactly as it would without the prop, SHALL NOT expose the drawn text a second time beside the name, and in debug builds SHALL report a label prop that does not contain the drawn text — the two compared with white space at their ends dropped, runs of white space read as one space and letters compared without case — because a person who speaks the words they see must be heard by the control that shows them. That report SHALL be all the button does about it: it SHALL still expose the label prop, whole and alone, as the name, SHALL NOT fall back to the drawn text and SHALL NOT add the drawn text to the name, in a debug build as in any other. THE button SHALL NOT make a name of the two itself, by joining them or in any other way: the order of a phrase is the language's, and the whole name is the product's to give. A description — the platform's own, or targetLabel (BTN-24) — SHALL be read after the name and the role and SHALL NOT be exposed as a name or as part of one.
BTN-17 IF the button has neither a label nor an icon THE button SHALL still render its container at the height of its size and as wide as it is high, and in debug builds report that it has no content.
BTN-18 THE button 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 button is shown THE button SHALL draw itself for the new direction at once, without a motion of its own, keeping its selection and its focus.
BTN-19 WHERE the layout direction is right-to-left THE button SHALL draw the glyph of its icon slot mirrored left to right exactly when the system's icon set marks that glyph's name as mirrored or the product forces mirroring for that use, and unmirrored when the product forbids it: the icon helper mirrors the glyph inside its own box, about the box's vertical centre line, changing neither its place, size, color and fill nor the order BTN-11 gives. THE button SHALL NOT mirror a glyph itself, and SHALL NOT mirror content the product gives as an image or a view of its own rather than by a glyph's name.
BTN-20 THE button SHALL lay out its label as text of its own direction, isolated from the text around it: each takes the base direction of its first strong character, or the layout direction where it has none, so that a left-to-right word, a number with its sign or unit, a telephone number and an address keep their own order in a right-to-left layout and reorder nothing beside them; THE button SHALL still place the label and align its lines by the layout direction, not by the text's own.
BTN-21 WHILE the button has a label THE button SHALL ignore width: a labelled button is as wide as its content and its paddings (BTN-11). WHEN width names a value the button does not define THE button SHALL render at the default width, and in debug builds report the unknown value. THE button SHALL meet the minimum target of BTN-5 at every width by extending its hit area: a narrow button SHALL NOT be drawn wider to reach it.
BTN-22 WHILE href is not empty and toggle is false THE button SHALL be a link and not a button: it SHALL expose the link role, named as BTN-16 names a button, with no pressed state; SHALL be the platform's own link to href (the web's anchor element; SwiftUI's Link; on Compose, Flutter and React Native an element with the platform's link semantics whose address is opened by the platform's opener), so that whatever the platform gives a link — on the web its context menu, opening in a new tab or window, copying and dragging its address, and the address shown before it is followed — is the platform's, and not the button's to draw or to take over; and SHALL draw its container, label, icon, outline, elevation and opacity in every state from the same tokens as a button of its variant, size and width that has no destination, with no look of its own for a link and none for a destination already visited.
BTN-23 WHEN the user activates a link button by pointer, touch or Enter THE button SHALL emit click exactly once and then open href where target names, unless the product cancelled that click, in which case it SHALL open nothing: the product's own router has taken the navigation. It SHALL show the pressed state as BTN-8 and BTN-9 say and SHALL NOT hold the navigation back for sys.motion.duration.press-hold. THE button SHALL NOT activate a link button on Space, which on the web scrolls the page as it does on any link, and SHALL NOT show the pressed state for it; WHERE the platform gives its links other keys or gestures (on the web a modified or a middle click that opens a new tab, on Apple platforms a long press that previews) THE button SHALL leave them to the platform.
BTN-24 WHILE the button is a link and target is new THE button SHALL open href in a new context — on the web a new tab or window that is given no handle to the page that opened it; on the other platforms outside the screen the person is on, as the platform's opener decides — and, WHILE it has a label and no icon at its trailing side, SHALL draw the glyph open_in_new of the system's icon set after the label as BTN-11 draws a trailing icon: comp.button.container.gap.medium from the label, at comp.button.icon.size.medium, with comp.button.container.padding-inline-end-with-icon.medium between it and the end edge at the medium size (and each of its own size otherwise), a leading icon keeping its own side as BTN-11 says; in the label color of its look and state; through the icon helper, which mirrors it in a right-to-left layout because the icon set marks its name; and hidden from assistive technology. WHILE the button holds the product's own icon at its trailing side, or has no label, THE button SHALL draw no mark of its own: the product has chosen what that place shows. Whether a mark is drawn or not THE button SHALL expose targetLabel as its description, read after its name and role, and WHILE targetLabel is empty SHALL still render and in debug builds report that a link that opens a new context does not say so. WHILE target is same THE button SHALL draw no mark and SHALL ignore targetLabel.
BTN-25 WHILE href is not empty and disabled is true THE button SHALL NOT be a link that can be followed: it SHALL render as BTN-6 says, the mark of BTN-24 in the disabled label color, SHALL expose the link role with the disabled state and no destination, SHALL NOT be focusable, SHALL NOT emit click, and SHALL open nothing by any means the platform gives a link (on the web the anchor carries no href, so there is no context menu entry, no drag and no new tab for it).
BTN-26 WHILE toggle is true THE button SHALL ignore href, target and targetLabel and stay the toggle BTN-14 describes, and in debug builds SHALL report that a toggle cannot be a link: a control that holds a state is not a destination. WHEN target names a value the button does not define THE button SHALL behave as same, and in debug builds report the unknown value. IF href is only white space, or names a script to run rather than a place to go (the web's javascript: scheme), or cannot be read as an address by the platform, THE button SHALL be a button without a destination, and in the last two cases report it in debug builds.
BTN-27 WHERE the platform has a form element (the web) and WHILE type is submit, WHEN the user activates the button by any means of BTN-1 and the product has not cancelled its click THE button SHALL ask its form (BTN-29) to submit as the platform's own submit button does: after click has been emitted, exactly once for one activation, with the form's own validation run first and its failure shown by the platform and by the fields as they show it, then the form's submit event, which the product may cancel, and with the pressed button named in what is sent (BTN-31). It SHALL show the pressed state as BTN-8 and BTN-9 say and SHALL NOT hold the submission back for sys.motion.duration.press-hold. WHILE type is button, which is the default, THE button SHALL do nothing to any form, whatever it stands in.
BTN-28 WHERE the platform has a form element (the web) and WHILE type is reset, WHEN the user activates the button and the product has not cancelled its click THE button SHALL ask its form (BTN-29) to reset as the platform's own reset button does: after click has been emitted, the form's reset event, which the product may cancel, and then every control of the form back at its initial value; it SHALL validate nothing, submit nothing and add nothing to any later submission.
BTN-29 THE button's form SHALL be the one the platform gives a control at its place: the nearest form among its ancestors, or, WHILE the web's form attribute is not empty, the form of that id in the same document, and then not an ancestor; it SHALL be read when the button is activated, so that a button moved into a form, or a form attribute written later, is followed. WHERE the platform lists a form's controls (the web's form.elements) THE button SHALL be listed among them at its place in document order, whatever its type and also WHILE type is button — a link button too, since the element is one kind of control — and being listed SHALL send nothing: a Button adds to a submission only what BTN-31 says. IF type is submit or reset and the button has no form WHEN it is activated THE button SHALL emit click and do nothing more, and in debug builds report that a submit or a reset button has no form.
BTN-30 WHERE the platform has a form element (the web) THE default button of a form SHALL be the first submit button among the form's controls in document order, a Button whose type is submit counted exactly as the platform's own submit button is. WHEN the person presses Enter in a field of the form that submits it implicitly — the platform's own single-line inputs; Tanrei's text field (TXI-3), number field (NMI-20), color field (CLI-19), combobox (CMB-28), one-time-code input (OTC-13) and search (SRC-13), once their own event for that key has not been cancelled; and Tanrei's checkbox, radio button and switch, which emit nothing for the key (CHK-1, RAD-1, SWT-1) — and the default button is a Button, THE button SHALL act as if it had been activated: click emitted exactly once, and then, unless the product cancelled it, the submission of BTN-27 with that button named in it (BTN-31); it SHALL NOT show the pressed state for a key pressed elsewhere and SHALL NOT take focus. WHILE the default button is disabled — a Button or the platform's own — THE form SHALL NOT be submitted by Enter in any of those controls, as the platform's own disabled default button prevents it from the platform's own inputs. WHILE the default button is the platform's own, Enter in a Tanrei control SHALL press it as Enter in the platform's own input does: its click, then the submission with its name and value. WHILE the form has no submit button of either kind THE button has no part in it: the field and the platform do as they do without one. THE button SHALL draw a form's default button no differently from any other: its emphasis is its variant's.
BTN-31 WHEN a Button submits its form (BTN-27, BTN-30) THE submission SHALL carry the pair of that button's name and value — once, at most, and only WHILE its name is not empty; an empty value is sent as an empty value — and SHALL carry nothing of any other Button; WHEN the form is submitted by other means (another button, a script's own request) it SHALL carry nothing of this one. THE submit event SHALL name as its submitter a submit button of the platform's own that holds the same name and value and lasts no longer than the event's dispatch, because the platform lets only its own buttons be a submitter: a product reads which button was pressed from that name and value, or from click, and SHALL NOT expect the submitter to be the Tanrei element. THE button SHALL NOT override where or how its form is sent: the address, the method, the encoding, the target and whether the form is validated are the form's alone.
BTN-32 WHILE disabled is true THE button SHALL submit and reset nothing by any means — a press, a key, assistive technology or a script's click — SHALL add nothing to a submission, and SHALL still be counted as its form's default button where it is the first submit button (BTN-30), so that a form whose button is disabled is not sent by Enter behind it. WHERE the platform has a form element (the web), WHILE the button is not a link and stands in a group of controls the page has disabled as a whole (a disabled fieldset) THE button SHALL be disabled exactly as BTN-2 and BTN-6 say, whatever its type, and SHALL be enabled again at once when the group is; a link button SHALL NOT be disabled by it, as no link of the platform is.
BTN-33 WHILE toggle is true THE button SHALL ignore a type of submit or reset and stay the toggle BTN-14 describes, and in debug builds SHALL report that a toggle cannot submit or reset a form: a press that switches a state is not one that sends it. WHILE the button is a link (BTN-22) THE button SHALL ignore a type of submit or reset and stay the link, and in debug builds SHALL report that a link cannot submit or reset a form: it goes somewhere, and what a form sends on the way is the form's own action. WHEN type names a value the button does not define THE button SHALL behave as button and submit nothing — where the platform's own button would submit for an unknown type — and in debug builds report the unknown value. WHILE type is button THE button SHALL ignore the web's form, name and value without a report: they do no harm on a button that sends nothing.
BTN-34 WHERE the platform has no form element (SwiftUI, Compose, Flutter, React Native) THE button SHALL have no type, no form and no name and value to send: there a product calls one function of its own from the button's click and from a field's action (TXI-3), and nothing of Tanrei's joins the two or decides which button a key in a field presses.
BTN-36 WHILE busy is true THE button SHALL draw its container, outline, elevation and opacity from its enabled tokens (of its variant and, for a toggle, of its selection, or of its destructive parts, BTN-40), SHALL keep its label and icon in place without drawing them so that its width and height do not change, and SHALL draw at the centre of the container the loading indicator's arc (LDG-1; under reduced motion LDG-4's whole circle, its opacity easing once per cycle) in a box of the button's icon size (icon.size-without-label where it is icon-only), comp.button.busy.indicator.thickness thick, in the label color of its variant (the icon color where it is icon-only), turning once per comp.button.motion.busy-cycle-duration. It SHALL show neither the hovered nor the pressed state, and SHALL show the focused one. WHEN busy becomes false THE button SHALL draw its label and icon again at once, without a motion.
BTN-37 WHILE busy is true THE button SHALL keep its focus and its place in the focus order, SHALL NOT emit click or change, and SHALL submit, reset and open nothing by any means (a press, a key, assistive technology or a script's click); where it is its form's default button it SHALL stop Enter in a field of the form from submitting it, as a disabled default button does (BTN-30, BTN-32), so that a form is not sent twice. It SHALL expose to assistive technology that it cannot be activated now (on the web aria-disabled) and busyLabel as its description, read after its name, and WHEN busy becomes true SHALL have busyLabel announced once, politely, without moving focus; nothing SHALL be announced when it ends, because what the action did is the product's to say. WHILE busy is true and busyLabel is empty THE button SHALL still render and in debug builds report that a busy button does not say so.
BTN-38 WHILE disabled is true and focusableWhenDisabled is true THE button SHALL be drawn as BTN-6 says and refuse every activation as BTN-2, BTN-25 and BTN-32 say, but SHALL stay in the focus order, take focus from the keyboard and from a pointer, keep focus when it becomes disabled, show its focus indicator, and expose the disabled state to assistive technology while staying focusable (on the web aria-disabled, not the platform's disabled state), so that a person can reach it and learn why it does nothing. It SHALL show neither the hovered nor the pressed state. A link button so disabled is the disabled link of BTN-25, reachable by Tab. WHERE the platform disables a group of controls as a whole (a disabled fieldset on the web) THE button SHALL leave the focus order with the group, whatever focusableWhenDisabled says, as the platform's own controls do. WHILE focusableWhenDisabled is false, disabled keeps its meaning (BTN-2).
BTN-39 WHILE fullWidth is true and no host lays the button out THE button SHALL take the whole inline size its container gives it, and SHALL keep the height, the paddings, the corners, the outline and the minimum target of its size, variant and state, centring its content in that width — the label and the icon as one row, in the order and at the gap BTN-11 gives them, or an icon-only button's glyph, whatever width says. WHERE that width is narrower than the label THE button SHALL wrap the label, its lines centred, rather than truncate it or draw past its container. WHILE a host lays the button out (a button group, a toolbar, or the actions of a dialog, a side sheet, a popover, a callout or an empty state) THE button SHALL take the width that host gives it and ignore fullWidth: the host's own full width (BGR-17) is how a row of buttons shares one width.
BTN-40 WHILE destructive is true and toggle is false THE button SHALL render its container, label, icon and outline from the destructive parts of its variant (comp.button.filled.destructive.container.color, and so on for each variant), in each state from the destructive parts of that state, and its elevation, shape and opacity as it would without destructive; WHILE destructive is false it SHALL render from the variant's own parts. In every shipped system the destructive parts are the error color role at the variant's emphasis — filled: the error color with the on-error color on it; tonal: the error container with the on-error-container color on it; elevated, outlined and text: the variant's own container with the label and the icon in the error color, and an outlined button's edge in it too — and disabled they are those of the variant's plain disabled look, so that a disabled destructive button looks like any disabled button of its variant. An icon-only button takes destructive as a labelled button does; a link button ignores it (BTN-43).
BTN-41 WHILE toggle is true THE button SHALL ignore destructive and render as BTN-15 says, and in debug builds SHALL report that a toggle has no destructive look: a control that switches a state on and off does not delete anything by being pressed.
BTN-42 THE button SHALL NOT make color the only sign that its action is destructive: WHILE destructive is true it SHALL keep its role, its accessible name, its states and its keyboard behaviour exactly as they are without it, and SHALL expose nothing more to assistive technology on the web, where no role or state says it; WHERE the platform has a destructive role of its own (SwiftUI's ButtonRole.destructive) THE button SHALL be given that role. Its label, or its label prop on an icon-only button, says what it destroys.
BTN-43 WHILE the button is a link (BTN-22) THE button SHALL ignore destructive and render as the link button of its variant without it, in each state and on a tone a host gives it (BTN-45), and in debug builds SHALL report that a link only leads somewhere and does not itself delete anything: the action that deletes is the one at its destination, and that action carries destructive.
BTN-45 WHERE the component that places the button gives it a tone through the internal channel (BTN-10) — the content color of the colored surface it draws the button on (a status callout's, an inverse or status snackbar's), and optionally the color a focus indicator's outer stroke takes on that surface — THE button SHALL draw its plain look in that tone instead of its variant's own colors, at rest and in each state: its label, its icon and its state layer in the tone's color; its container, where its variant draws one at rest (filled, tonal, elevated, and a variant a layer adds), in the tone's color at comp.button.tone.container.opacity, and where its variant draws none (outlined, text) as its variant's own, an outlined button's edge taking the tone's color at that opacity instead; hovered, focused and pressed, that resting container with the tone's color laid over it at the system's state-layer opacity of the state (sys.state.hover-state-layer-opacity, sys.state.focus-state-layer-opacity, sys.state.pressed-state-layer-opacity), as the core rules lay a state over a resting color; disabled, the container (where its variant draws one) in the tone's color at sys.state.disabled-container-opacity and the label and icon at sys.state.disabled-content-opacity; and the outer stroke of its focus indicator in the tone's focus color, or its color where none is given. Its size, shape, paddings, elevation, opacity and answer to a press SHALL be its own, and a toggle and a destructive button SHALL keep their own looks (BTN-15, BTN-40). WHILE no tone is given THE button SHALL be drawn as without this clause. A tone is not part of the button's public surface: no prop, attribute or styling property gives one.
BTN-46 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 button 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 button is invalid — except those the button owns (aria-pressed, aria-disabled), which it SHALL move and not expose. 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 button SHALL take it off that element. WHEN the product sets an aria- attribute the button owns THE button SHALL report it in debug builds.

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

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

स्पेक Web SwiftUI Jetpack Compose Flutter React Native
कंपोनेंट tanrei-button TanreiButton TanreiButton TanreiButton Button
variant · प्रॉपर्टी variant variant variant variant variant
destructive · प्रॉपर्टी destructive role destructive isDestructiveAction destructive
size · प्रॉपर्टी size size size size size
width · प्रॉपर्टी width width width width width
fullWidth · प्रॉपर्टी fullWidth fullWidth fullWidth fullWidth fullWidth
iconPosition · प्रॉपर्टी iconPosition iconPosition iconPosition iconAlignment iconPosition
toggle · प्रॉपर्टी toggle isSelected onCheckedChange isSelected toggle
selected · प्रॉपर्टी selected isSelected checked isSelected selected
disabled · प्रॉपर्टी disabled disabled enabled onPressed disabled
focusableWhenDisabled · प्रॉपर्टी focusableWhenDisabled focusableWhenDisabled focusableWhenDisabled focusableWhenDisabled focusableWhenDisabled
busy · प्रॉपर्टी busy busy busy busy busy
busyLabel · प्रॉपर्टी busyLabel busyLabel busyLabel busySemanticLabel busyLabel
href · प्रॉपर्टी href destination href href href
target · प्रॉपर्टी target target target target target
targetLabel · प्रॉपर्टी targetLabel targetLabel targetLabel targetSemanticLabel targetLabel
label · प्रॉपर्टी label label contentDescription semanticLabel accessibilityLabel
click · इवेंट click action onClick onPressed onPress
change · इवेंट change isSelected onCheckedChange onPressed onSelectedChange
टिप्पणियाँ The label is the default slot and the icon the icon slot (a glyph of the icon font); an icon-only button is one whose default slot is empty. iconPosition is reflected as the icon-position attribute. label sets aria-label on the inner <button> (or the anchor) whenever it is not empty; with a label in the default slot the slot's text stays drawn and the attribute replaces it as the name (BTN-16), and a debug build compares the two. A toggle sets aria-pressed on the inner <button>, switches its own selected and fires change, as a native checkbox does. width is the width attribute (default, narrow, wide); it does nothing while the default slot holds a label. With href the shadow root holds an <a part="container"> in place of the <button>, with the same classes, parts and listeners. The link form: href is the href attribute; target is the target attribute with the values same and new (the HTML spellings _self and _blank are read as those two; anything else is same and reported); targetLabel is the target-label attribute. Web-only, forwarded to the anchor and to nothing else: rel (to which new adds noopener) and download. Cancelling click (preventDefault()) cancels the navigation, which is how a client-side router takes it; a modified or a middle click is the browser's. A disabled link is the anchor without href, with role="link" and aria-disabled="true", as the navigation drawer's destination already is. Space is not handed to the press controller. element.click() follows the link. In a form: a form-associated custom element (static formAssociated = true), as the text field is, for its form owner and for a disabled fieldset (formDisabledCallback through the shared primitive; not while it is a link). Web attributes, not spec props, as a checkbox's name and value are: type (button, submit, reset; default button, reflected; anything else is button and reported), form (the id of a form, the platform's own attribute for a form-associated element), name and value. The element has a read-only form property. A press of a submit button, after its click has gone through the page uncancelled, appends a hidden native <button type="submit"> with the same name and value to itself — a child in a slot it does not have, so it is drawn nowhere, naming the same form where the button names one by its form attribute — calls form.requestSubmit() with it and removes it before returning, so the form's validation, its submit event, event.submitter and new FormData(form, event.submitter) are the platform's, and the pair is sent at the button's own place among the form's entries, as the platform's own button's is; a reset button calls form.reset(). The form's default button is found by one primitive that walks form.elements in order and takes the first native submit button or <tanrei-button type="submit">: the text field, the number field, the color field, the combobox, the one-time-code input and the search call it in place of form.requestSubmit() after their action (or submit) event, and the selection primitive of the checkbox, the radio button and the switch calls it for Enter, and for Enter in a control of the platform's own, which knows only the platform's buttons, the browser itself is left to decide: one keydown listener per tree, in the capture phase (on the window for a document, on the shadow root for a form inside one), added while a form of that tree holds a Tanrei submit button, answers Enter going down in a native control of such a form — inside it, or naming it by the form attribute from outside — whose default button is Tanrei's by appending to that button, for the length of the key, a hidden native <button type="submit"> in a slot the button does not have: the form's first submit button exactly when the Tanrei button is, disabled while it is, and never the default button to the primitive. The browser presses it exactly where, when and whether it would press a default button of its own — after the field has committed what was typed (change, then click, then submit), for the controls and the modifier keys this engine submits on and no others, never for the Enter an input method or a suggestion list took, and not at all while it is disabled, in a form of one field too. That press is stopped at the window before a listener of the page hears it (at the shadow root, for a form in a closed one) and its own submission cancelled; the hidden button is removed, and the Tanrei button's click() is called, which emits its click and submits as any press of it does. A hidden button the browser did not press is removed at the key's keyup, and one is appended again for each repeat of a key held down. A capture listener a page added to the window before the form's first Tanrei submit button was connected hears the stopped press, as a click on a hidden button inside the Tanrei button. formaction, formmethod, formenctype, formtarget and formnovalidate are not read. The inner <button> stays type="button": it is in a shadow root, where no form can own it. focusableWhenDisabled is the focusable-when-disabled attribute and busyLabel the busy-label attribute. A disabled button that is focusable-when-disabled renders its native <button> without the disabled attribute and with aria-disabled="true", and refuses the press in a listener of its own; the host's disabled attribute is written as for any disabled button, and a disabled fieldset still takes it out of the focus order (BTN-38). A busy button renders aria-disabled="true" on its native <button> (or anchor), keeps its label and icon laid out under visibility: hidden, draws the arc as an inline SVG circle, and announces busy-label through a visually hidden role="status" region emptied and set again each time it becomes busy (BTN-37). fullWidth is the full-width attribute: the host is a block-level flex box as wide as its container and the native <button> grows to fill it; while a host lays it out (a button group, a toolbar, the actions of a dialog, a popover, a callout, an empty state, a file picker) the element carries the custom state placed (:state(placed)), under which full-width does nothing (BTN-39). destructive is a boolean attribute; it draws, and exposes nothing more (BTN-42), and on a link it draws nothing (BTN-43). The title is the label and the icon view builder the icon; an icon-only button is the initializer that takes label: and an icon and no title. A toggle is the initializer that takes isSelected: Binding<Bool>. disabled follows SwiftUI's .disabled(_:) environment. width: TanreiButtonWidth = .default is a parameter of the icon-only initializer alone, so a labelled button cannot be given one. Not built on this platform yet: the initializer that takes destination: URL in place of action: (there is none that takes both a destination and isSelected, so a toggle cannot be given one) draws the same control as a SwiftUI Link, so the address is opened by the environment's openURL — an app that routes addresses itself provides an OpenURLAction, which is how the navigation is cancelled — and VoiceOver reads the link trait. target: TanreiLinkTarget = .same and targetLabel (the accessibility hint) are parameters of that initializer alone. Not built on this platform yet: the initializers that take a title take label: String? = nil as well, set with .accessibilityLabel over the title's text. SwiftUI has no form element that sends values, so there is no type (BTN-34): an app that wants Return to press a view's main button gives that TanreiButton .keyboardShortcut(.defaultAction), or calls the same function from a text field's action. Not built on this platform yet: busy and busyLabel (BTN-36, BTN-37), and focusableWhenDisabled (BTN-38). Not built on this platform yet: fullWidth (BTN-39). Not built on this platform yet: role: ButtonRole? = nil on every initializer, as SwiftUI's own Button(role:) takes it: .destructive is destructive, and any other role draws as nil does; the role is passed on to the system, so a destructive Button in a menu, a swipe action or a confirmation dialog is treated as SwiftUI treats its own (BTN-40 to BTN-43). Compose idiom is the inverse flag enabled. A non-null onCheckedChange makes it a toggle (as IconToggleButton), with checked its state; an icon-only button is the overload with an icon and a contentDescription and no text. width: TanreiButtonWidth = TanreiButtonWidth.Default is a parameter of the icon-only overload alone. Not built on this platform yet: the overload that takes href: String and no onCheckedChange opens the address through LocalUriHandler.current after onClick; an app that routes addresses itself provides its own UriHandler. Compose has no link role for a clickable element (only link annotations inside text), so the node drops Role.Button and carries no role, and the README says so. target: TanreiLinkTarget = TanreiLinkTarget.Same; targetLabel is appended to the node's state description. Not built on this platform yet: the overloads that take text take contentDescription: String? = null as well; given, the node's semantics are cleared and set again with it, because a merged node would otherwise read the text and the description both. Compose has no form element, so there is no type (BTN-34): an app calls the same function from onClick and from a text field's action. Not built on this platform yet: busy and busyLabel (BTN-36, BTN-37), and focusableWhenDisabled (BTN-38). Not built on this platform yet: fullWidth (BTN-39). Not built on this platform yet: destructive: Boolean = false on every overload; Compose has no destructive role, so it draws and adds no semantics (BTN-40 to BTN-43). Flutter idiom: a null onPressed disables the button; iconAlignment (start / end) is Flutter's own name for the icon's side. A non-null isSelected makes it a toggle and onPressed flips it; an icon-only button is the TanreiButton.icon constructor, whose semanticLabel is required. width (TanreiButtonWidth.normal, .narrow, .wide; default is a reserved word in Dart) is a parameter of TanreiButton.icon alone. Not built on this platform yet: the TanreiButton.link and TanreiButton.iconLink constructors (href is a Uri) has Semantics(link: true) with the address as its linkUrl. The package has no plugin dependency, so the address is opened by the nearest TanreiLinkOpener, an inherited widget the app provides once (calling url_launcher, or its own router); without one the control opens nothing and reports it in debug builds. target is a TanreiLinkTarget; targetSemanticLabel is the semantics hint. Not built on this platform yet: the constructors that take a child label take semanticLabel as well, optional there, applied with the child's own semantics excluded. Flutter's Form validates and saves and sends nothing, and has no default button, so there is no type (BTN-34): an app calls the same function from onPressed and from a text field's action. Not built on this platform yet: busy and busySemanticLabel (BTN-36, BTN-37), and focusableWhenDisabled (BTN-38). Not built on this platform yet: fullWidth (BTN-39). Not built on this platform yet: isDestructiveAction (bool, default false), the name Flutter's own CupertinoDialogAction gives the same flag; it draws and adds no semantics (BTN-40 to BTN-43). The label is children and the icon the icon prop; an icon-only button has no children and requires accessibilityLabel. A toggle has accessibilityState.selected and the togglebutton role where React Native offers it. width ("default" | "narrow" | "wide") is the icon-only width, not a layout width; it is ignored with children. Not built on this platform yet: a Button with href has accessibilityRole="link" and opens the address with Linking.openURL after onPress, unless onPress called event.preventDefault(). target is "same" | "new"; targetLabel is the accessibilityHint. Not built on this platform yet: accessibilityLabel is read with children as well as without, and replaces their text as the name. React Native has no form element, so there is no type (BTN-34): an app calls the same function from onPress and from a text field's action. Not built on this platform yet: busy and busyLabel (BTN-36, BTN-37), and focusableWhenDisabled (BTN-38). Not built on this platform yet: fullWidth (BTN-39). Not built on this platform yet: destructive (boolean, default false), the word React Native's own Alert button style uses; it draws and adds no accessibility props (BTN-40 to BTN-43).

टोकन

टोकन किसका एलियास रिज़ॉल्व किया गया मान (लाइट)
--tanrei-comp-button-busy-indicator-thickness comp.loading-indicator.indicator.thickness.small 2px
--tanrei-comp-button-container-gap-large sys.space.space100 8px
--tanrei-comp-button-container-gap-medium sys.space.space100 8px
--tanrei-comp-button-container-gap-small sys.space.space100 8px
--tanrei-comp-button-container-height-large — 56px
--tanrei-comp-button-container-height-medium — 40px
--tanrei-comp-button-container-height-small — 32px
--tanrei-comp-button-container-padding-block-large — 6px
--tanrei-comp-button-container-padding-block-medium — 6px
--tanrei-comp-button-container-padding-block-small — 6px
--tanrei-comp-button-container-padding-inline-end-with-icon-large sys.space.space200 16px
--tanrei-comp-button-container-padding-inline-end-with-icon-medium sys.space.space150 12px
--tanrei-comp-button-container-padding-inline-end-with-icon-small sys.space.space150 12px
--tanrei-comp-button-container-padding-inline-end-large sys.space.space300 24px
--tanrei-comp-button-container-padding-inline-end-medium sys.space.space200 16px
--tanrei-comp-button-container-padding-inline-end-small sys.space.space200 16px
--tanrei-comp-button-container-padding-inline-narrow-large sys.space.space50 4px
--tanrei-comp-button-container-padding-inline-narrow-medium sys.space.space50 4px
--tanrei-comp-button-container-padding-inline-narrow-small sys.space.space50 4px
--tanrei-comp-button-container-padding-inline-start-with-icon-large sys.space.space200 16px
--tanrei-comp-button-container-padding-inline-start-with-icon-medium sys.space.space150 12px
--tanrei-comp-button-container-padding-inline-start-with-icon-small sys.space.space150 12px
--tanrei-comp-button-container-padding-inline-start-large sys.space.space300 24px
--tanrei-comp-button-container-padding-inline-start-medium sys.space.space200 16px
--tanrei-comp-button-container-padding-inline-start-small sys.space.space200 16px
--tanrei-comp-button-container-shape sys.shape.corner.full 9999px
--tanrei-comp-button-container-width-wide-large — 72px
--tanrei-comp-button-container-width-wide-medium — 52px
--tanrei-comp-button-container-width-wide-small — 40px
--tanrei-comp-button-disabled-container-shape — 9999px
--tanrei-comp-button-disabled-opacity — 1
--tanrei-comp-button-elevated-container-color sys.color.surface-container-lowest #ffffff
--tanrei-comp-button-elevated-container-elevation sys.elevation.level2 0px 0px 0px 1px rgb(0 0 0 / 0.08), 0px 1px 2px 0px rgb(0 0 0 / 0.04)
--tanrei-comp-button-elevated-destructive-container-color comp.button.elevated.container.color #ffffff
--tanrei-comp-button-elevated-destructive-icon-color comp.button.elevated.destructive.label.color #cd262f
--tanrei-comp-button-elevated-destructive-label-color sys.color.error #cd262f
--tanrei-comp-button-elevated-destructive-outline-color comp.button.elevated.outline.color #000000 · 0%
--tanrei-comp-button-elevated-destructive-state-layer-color comp.button.elevated.destructive.label.color #cd262f
--tanrei-comp-button-elevated-disabled-container-color — #1b1b1b · 12%
--tanrei-comp-button-elevated-disabled-container-elevation —
--tanrei-comp-button-elevated-disabled-destructive-container-color — #1b1b1b · 12%
--tanrei-comp-button-elevated-disabled-destructive-icon-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-destructive-label-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-disabled-destructive-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-icon-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-label-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-disabled-selected-container-color — #1b1b1b · 12%
--tanrei-comp-button-elevated-disabled-selected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-selected-label-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-selected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-disabled-selected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-unselected-container-color — #1b1b1b · 12%
--tanrei-comp-button-elevated-disabled-unselected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-unselected-label-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-disabled-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-disabled-unselected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-elevated-focused-container-color — #e8e8e8
--tanrei-comp-button-elevated-focused-container-elevation — 0px 0px 0px 1px rgb(0 0 0 / 0.08), 0px 1px 2px 0px rgb(0 0 0 / 0.04)
--tanrei-comp-button-elevated-focused-destructive-container-color — #fae9ea
--tanrei-comp-button-elevated-focused-destructive-icon-color — #cd262f
--tanrei-comp-button-elevated-focused-destructive-label-color — #cd262f
--tanrei-comp-button-elevated-focused-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-focused-destructive-state-layer-color — #cd262f
--tanrei-comp-button-elevated-focused-icon-color — #1b1b1b
--tanrei-comp-button-elevated-focused-label-color — #1b1b1b
--tanrei-comp-button-elevated-focused-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-focused-selected-container-color — #323232
--tanrei-comp-button-elevated-focused-selected-icon-color — #ffffff
--tanrei-comp-button-elevated-focused-selected-label-color — #ffffff
--tanrei-comp-button-elevated-focused-selected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-focused-selected-state-layer-color — #ffffff
--tanrei-comp-button-elevated-focused-state-layer-color — #1b1b1b
--tanrei-comp-button-elevated-focused-unselected-container-color — #ededed
--tanrei-comp-button-elevated-focused-unselected-icon-color — #4b4b4b
--tanrei-comp-button-elevated-focused-unselected-label-color — #4b4b4b
--tanrei-comp-button-elevated-focused-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-focused-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-elevated-hovered-container-color — #ededed
--tanrei-comp-button-elevated-hovered-container-elevation — 0px 0px 0px 1px rgb(0 0 0 / 0.08), 0px 1px 2px 0px rgb(0 0 0 / 0.04)
--tanrei-comp-button-elevated-hovered-destructive-container-color — #fbeeee
--tanrei-comp-button-elevated-hovered-destructive-icon-color — #cd262f
--tanrei-comp-button-elevated-hovered-destructive-label-color — #cd262f
--tanrei-comp-button-elevated-hovered-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-hovered-destructive-state-layer-color — #cd262f
--tanrei-comp-button-elevated-hovered-icon-color — #1b1b1b
--tanrei-comp-button-elevated-hovered-label-color — #1b1b1b
--tanrei-comp-button-elevated-hovered-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-hovered-selected-container-color — #2d2d2d
--tanrei-comp-button-elevated-hovered-selected-icon-color — #ffffff
--tanrei-comp-button-elevated-hovered-selected-label-color — #ffffff
--tanrei-comp-button-elevated-hovered-selected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-hovered-selected-state-layer-color — #ffffff
--tanrei-comp-button-elevated-hovered-state-layer-color — #1b1b1b
--tanrei-comp-button-elevated-hovered-unselected-container-color — #f1f1f1
--tanrei-comp-button-elevated-hovered-unselected-icon-color — #4b4b4b
--tanrei-comp-button-elevated-hovered-unselected-label-color — #4b4b4b
--tanrei-comp-button-elevated-hovered-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-hovered-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-elevated-icon-color comp.button.elevated.label.color #1b1b1b
--tanrei-comp-button-elevated-label-color sys.color.on-surface #1b1b1b
--tanrei-comp-button-elevated-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-pressed-container-color — #e8e8e8
--tanrei-comp-button-elevated-pressed-container-elevation — 0px 0px 0px 1px rgb(0 0 0 / 0.08), 0px 1px 2px 0px rgb(0 0 0 / 0.04)
--tanrei-comp-button-elevated-pressed-destructive-container-color — #fae9ea
--tanrei-comp-button-elevated-pressed-destructive-icon-color — #cd262f
--tanrei-comp-button-elevated-pressed-destructive-label-color — #cd262f
--tanrei-comp-button-elevated-pressed-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-pressed-destructive-state-layer-color — #cd262f
--tanrei-comp-button-elevated-pressed-icon-color — #1b1b1b
--tanrei-comp-button-elevated-pressed-label-color — #1b1b1b
--tanrei-comp-button-elevated-pressed-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-pressed-selected-container-color — #323232
--tanrei-comp-button-elevated-pressed-selected-icon-color — #ffffff
--tanrei-comp-button-elevated-pressed-selected-label-color — #ffffff
--tanrei-comp-button-elevated-pressed-selected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-pressed-selected-state-layer-color — #ffffff
--tanrei-comp-button-elevated-pressed-state-layer-color — #1b1b1b
--tanrei-comp-button-elevated-pressed-unselected-container-color — #ededed
--tanrei-comp-button-elevated-pressed-unselected-icon-color — #4b4b4b
--tanrei-comp-button-elevated-pressed-unselected-label-color — #4b4b4b
--tanrei-comp-button-elevated-pressed-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-pressed-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-elevated-selected-container-color sys.color.primary #1b1b1b
--tanrei-comp-button-elevated-selected-icon-color comp.button.elevated.selected.label.color #ffffff
--tanrei-comp-button-elevated-selected-label-color sys.color.on-primary #ffffff
--tanrei-comp-button-elevated-selected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-selected-state-layer-color comp.button.elevated.selected.label.color #ffffff
--tanrei-comp-button-elevated-state-layer-color comp.button.elevated.label.color #1b1b1b
--tanrei-comp-button-elevated-unselected-container-color sys.color.surface-container-lowest #ffffff
--tanrei-comp-button-elevated-unselected-icon-color comp.button.elevated.unselected.label.color #4b4b4b
--tanrei-comp-button-elevated-unselected-label-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-button-elevated-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-elevated-unselected-state-layer-color comp.button.elevated.unselected.label.color #4b4b4b
--tanrei-comp-button-filled-container-color sys.color.primary #1b1b1b
--tanrei-comp-button-filled-container-elevation sys.elevation.level0
--tanrei-comp-button-filled-destructive-container-color sys.color.error #cd262f
--tanrei-comp-button-filled-destructive-icon-color comp.button.filled.destructive.label.color #ffffff
--tanrei-comp-button-filled-destructive-label-color sys.color.on-error #ffffff
--tanrei-comp-button-filled-destructive-outline-color comp.button.filled.outline.color #000000 · 0%
--tanrei-comp-button-filled-destructive-state-layer-color comp.button.filled.destructive.label.color #ffffff
--tanrei-comp-button-filled-disabled-container-color — #1b1b1b · 12%
--tanrei-comp-button-filled-disabled-container-elevation —
--tanrei-comp-button-filled-disabled-destructive-container-color — #1b1b1b · 12%
--tanrei-comp-button-filled-disabled-destructive-icon-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-destructive-label-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-filled-disabled-destructive-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-icon-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-label-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-outline-color — #000000 · 0%
--tanrei-comp-button-filled-disabled-selected-container-color — #1b1b1b · 12%
--tanrei-comp-button-filled-disabled-selected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-selected-label-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-selected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-disabled-selected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-unselected-container-color — #1b1b1b · 12%
--tanrei-comp-button-filled-disabled-unselected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-unselected-label-color — #1b1b1b · 38%
--tanrei-comp-button-filled-disabled-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-disabled-unselected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-filled-focused-container-color — #323232
--tanrei-comp-button-filled-focused-container-elevation —
--tanrei-comp-button-filled-focused-destructive-container-color — #d23c44
--tanrei-comp-button-filled-focused-destructive-icon-color — #ffffff
--tanrei-comp-button-filled-focused-destructive-label-color — #ffffff
--tanrei-comp-button-filled-focused-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-filled-focused-destructive-state-layer-color — #ffffff
--tanrei-comp-button-filled-focused-icon-color — #ffffff
--tanrei-comp-button-filled-focused-label-color — #ffffff
--tanrei-comp-button-filled-focused-outline-color — #000000 · 0%
--tanrei-comp-button-filled-focused-selected-container-color — #323232
--tanrei-comp-button-filled-focused-selected-icon-color — #ffffff
--tanrei-comp-button-filled-focused-selected-label-color — #ffffff
--tanrei-comp-button-filled-focused-selected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-focused-selected-state-layer-color — #ffffff
--tanrei-comp-button-filled-focused-state-layer-color — #ffffff
--tanrei-comp-button-filled-focused-unselected-container-color — #dedede
--tanrei-comp-button-filled-focused-unselected-icon-color — #4b4b4b
--tanrei-comp-button-filled-focused-unselected-label-color — #4b4b4b
--tanrei-comp-button-filled-focused-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-focused-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-filled-hovered-container-color — #2d2d2d
--tanrei-comp-button-filled-hovered-container-elevation —
--tanrei-comp-button-filled-hovered-destructive-container-color — #d13740
--tanrei-comp-button-filled-hovered-destructive-icon-color — #ffffff
--tanrei-comp-button-filled-hovered-destructive-label-color — #ffffff
--tanrei-comp-button-filled-hovered-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-filled-hovered-destructive-state-layer-color — #ffffff
--tanrei-comp-button-filled-hovered-icon-color — #ffffff
--tanrei-comp-button-filled-hovered-label-color — #ffffff
--tanrei-comp-button-filled-hovered-outline-color — #000000 · 0%
--tanrei-comp-button-filled-hovered-selected-container-color — #2d2d2d
--tanrei-comp-button-filled-hovered-selected-icon-color — #ffffff
--tanrei-comp-button-filled-hovered-selected-label-color — #ffffff
--tanrei-comp-button-filled-hovered-selected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-hovered-selected-state-layer-color — #ffffff
--tanrei-comp-button-filled-hovered-state-layer-color — #ffffff
--tanrei-comp-button-filled-hovered-unselected-container-color — #e1e1e1
--tanrei-comp-button-filled-hovered-unselected-icon-color — #4b4b4b
--tanrei-comp-button-filled-hovered-unselected-label-color — #4b4b4b
--tanrei-comp-button-filled-hovered-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-hovered-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-filled-icon-color comp.button.filled.label.color #ffffff
--tanrei-comp-button-filled-label-color sys.color.on-primary #ffffff
--tanrei-comp-button-filled-outline-color — #000000 · 0%
--tanrei-comp-button-filled-pressed-container-color — #323232
--tanrei-comp-button-filled-pressed-container-elevation —
--tanrei-comp-button-filled-pressed-destructive-container-color — #d23c44
--tanrei-comp-button-filled-pressed-destructive-icon-color — #ffffff
--tanrei-comp-button-filled-pressed-destructive-label-color — #ffffff
--tanrei-comp-button-filled-pressed-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-filled-pressed-destructive-state-layer-color — #ffffff
--tanrei-comp-button-filled-pressed-icon-color — #ffffff
--tanrei-comp-button-filled-pressed-label-color — #ffffff
--tanrei-comp-button-filled-pressed-outline-color — #000000 · 0%
--tanrei-comp-button-filled-pressed-selected-container-color — #323232
--tanrei-comp-button-filled-pressed-selected-icon-color — #ffffff
--tanrei-comp-button-filled-pressed-selected-label-color — #ffffff
--tanrei-comp-button-filled-pressed-selected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-pressed-selected-state-layer-color — #ffffff
--tanrei-comp-button-filled-pressed-state-layer-color — #ffffff
--tanrei-comp-button-filled-pressed-unselected-container-color — #dedede
--tanrei-comp-button-filled-pressed-unselected-icon-color — #4b4b4b
--tanrei-comp-button-filled-pressed-unselected-label-color — #4b4b4b
--tanrei-comp-button-filled-pressed-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-pressed-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-filled-selected-container-color sys.color.primary #1b1b1b
--tanrei-comp-button-filled-selected-icon-color comp.button.filled.selected.label.color #ffffff
--tanrei-comp-button-filled-selected-label-color sys.color.on-primary #ffffff
--tanrei-comp-button-filled-selected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-selected-state-layer-color comp.button.filled.selected.label.color #ffffff
--tanrei-comp-button-filled-state-layer-color comp.button.filled.label.color #ffffff
--tanrei-comp-button-filled-unselected-container-color sys.color.surface-container-highest #eeeeee
--tanrei-comp-button-filled-unselected-icon-color comp.button.filled.unselected.label.color #4b4b4b
--tanrei-comp-button-filled-unselected-label-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-button-filled-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-filled-unselected-state-layer-color comp.button.filled.unselected.label.color #4b4b4b
--tanrei-comp-button-focused-container-shape — 9999px
--tanrei-comp-button-focused-opacity — 1
--tanrei-comp-button-hovered-container-shape — 9999px
--tanrei-comp-button-hovered-opacity — 1
--tanrei-comp-button-icon-size-without-label-large comp.button.icon.size.large 24px
--tanrei-comp-button-icon-size-without-label-medium comp.button.icon.size.medium 24px
--tanrei-comp-button-icon-size-without-label-small comp.button.icon.size.small 20px
--tanrei-comp-button-icon-size-large sys.icon.medium 24px
--tanrei-comp-button-icon-size-medium sys.icon.medium 24px
--tanrei-comp-button-icon-size-small sys.icon.small 20px
--tanrei-comp-button-motion-busy-cycle-duration comp.loading-indicator.motion.cycle-duration 1000ms
--tanrei-comp-button-motion-feedback-duration sys.motion.role.feedback 450ms
--tanrei-comp-button-motion-state-duration-large sys.motion.role.state.large 250ms
--tanrei-comp-button-motion-state-duration-medium sys.motion.role.state.default 250ms
--tanrei-comp-button-motion-state-duration-small sys.motion.role.state.compact 200ms
--tanrei-comp-button-motion-state-easing sys.motion.easing.state cubic-bezier(0.2, 0, 0, 1)
--tanrei-comp-button-outline-width-large sys.border.hairline 1px
--tanrei-comp-button-outline-width-medium sys.border.hairline 1px
--tanrei-comp-button-outline-width-small sys.border.hairline 1px
--tanrei-comp-button-outlined-container-color — #000000 · 0%
--tanrei-comp-button-outlined-container-elevation sys.elevation.level0
--tanrei-comp-button-outlined-destructive-container-color comp.button.outlined.container.color #000000 · 0%
--tanrei-comp-button-outlined-destructive-icon-color comp.button.outlined.destructive.label.color #cd262f
--tanrei-comp-button-outlined-destructive-label-color sys.color.error #cd262f
--tanrei-comp-button-outlined-destructive-outline-color sys.color.error #cd262f
--tanrei-comp-button-outlined-destructive-state-layer-color comp.button.outlined.destructive.label.color #cd262f
--tanrei-comp-button-outlined-disabled-container-color — #000000 · 0%
--tanrei-comp-button-outlined-disabled-container-elevation —
--tanrei-comp-button-outlined-disabled-destructive-container-color — #000000 · 0%
--tanrei-comp-button-outlined-disabled-destructive-icon-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-destructive-label-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-destructive-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-disabled-destructive-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-icon-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-label-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-disabled-selected-container-color — #1b1b1b · 12%
--tanrei-comp-button-outlined-disabled-selected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-selected-label-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-selected-outline-color — #000000 · 0%
--tanrei-comp-button-outlined-disabled-selected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-unselected-container-color — #000000 · 0%
--tanrei-comp-button-outlined-disabled-unselected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-unselected-label-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-disabled-unselected-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-disabled-unselected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-outlined-focused-container-color — #1b1b1b · 10%
--tanrei-comp-button-outlined-focused-container-elevation —
--tanrei-comp-button-outlined-focused-destructive-container-color — #cd262f · 10%
--tanrei-comp-button-outlined-focused-destructive-icon-color — #cd262f
--tanrei-comp-button-outlined-focused-destructive-label-color — #cd262f
--tanrei-comp-button-outlined-focused-destructive-outline-color — #cd262f
--tanrei-comp-button-outlined-focused-destructive-state-layer-color — #cd262f
--tanrei-comp-button-outlined-focused-icon-color — #4b4b4b
--tanrei-comp-button-outlined-focused-label-color — #1b1b1b
--tanrei-comp-button-outlined-focused-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-focused-selected-container-color — #343434
--tanrei-comp-button-outlined-focused-selected-icon-color — #f1f1f1
--tanrei-comp-button-outlined-focused-selected-label-color — #f1f1f1
--tanrei-comp-button-outlined-focused-selected-outline-color — #000000 · 0%
--tanrei-comp-button-outlined-focused-selected-state-layer-color — #f1f1f1
--tanrei-comp-button-outlined-focused-state-layer-color — #1b1b1b
--tanrei-comp-button-outlined-focused-unselected-container-color — #4b4b4b · 10%
--tanrei-comp-button-outlined-focused-unselected-icon-color — #4b4b4b
--tanrei-comp-button-outlined-focused-unselected-label-color — #4b4b4b
--tanrei-comp-button-outlined-focused-unselected-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-focused-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-outlined-hovered-container-color — #1b1b1b · 8%
--tanrei-comp-button-outlined-hovered-container-elevation —
--tanrei-comp-button-outlined-hovered-destructive-container-color — #cd262f · 8%
--tanrei-comp-button-outlined-hovered-destructive-icon-color — #cd262f
--tanrei-comp-button-outlined-hovered-destructive-label-color — #cd262f
--tanrei-comp-button-outlined-hovered-destructive-outline-color — #cd262f
--tanrei-comp-button-outlined-hovered-destructive-state-layer-color — #cd262f
--tanrei-comp-button-outlined-hovered-icon-color — #4b4b4b
--tanrei-comp-button-outlined-hovered-label-color — #1b1b1b
--tanrei-comp-button-outlined-hovered-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-hovered-selected-container-color — #303030
--tanrei-comp-button-outlined-hovered-selected-icon-color — #f1f1f1
--tanrei-comp-button-outlined-hovered-selected-label-color — #f1f1f1
--tanrei-comp-button-outlined-hovered-selected-outline-color — #000000 · 0%
--tanrei-comp-button-outlined-hovered-selected-state-layer-color — #f1f1f1
--tanrei-comp-button-outlined-hovered-state-layer-color — #1b1b1b
--tanrei-comp-button-outlined-hovered-unselected-container-color — #4b4b4b · 8%
--tanrei-comp-button-outlined-hovered-unselected-icon-color — #4b4b4b
--tanrei-comp-button-outlined-hovered-unselected-label-color — #4b4b4b
--tanrei-comp-button-outlined-hovered-unselected-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-hovered-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-outlined-icon-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-button-outlined-label-color sys.color.on-surface #1b1b1b
--tanrei-comp-button-outlined-outline-color sys.color.outline-variant #000000 · 8%
--tanrei-comp-button-outlined-pressed-container-color — #1b1b1b · 10%
--tanrei-comp-button-outlined-pressed-container-elevation —
--tanrei-comp-button-outlined-pressed-destructive-container-color — #cd262f · 10%
--tanrei-comp-button-outlined-pressed-destructive-icon-color — #cd262f
--tanrei-comp-button-outlined-pressed-destructive-label-color — #cd262f
--tanrei-comp-button-outlined-pressed-destructive-outline-color — #cd262f
--tanrei-comp-button-outlined-pressed-destructive-state-layer-color — #cd262f
--tanrei-comp-button-outlined-pressed-icon-color — #4b4b4b
--tanrei-comp-button-outlined-pressed-label-color — #1b1b1b
--tanrei-comp-button-outlined-pressed-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-pressed-selected-container-color — #343434
--tanrei-comp-button-outlined-pressed-selected-icon-color — #f1f1f1
--tanrei-comp-button-outlined-pressed-selected-label-color — #f1f1f1
--tanrei-comp-button-outlined-pressed-selected-outline-color — #000000 · 0%
--tanrei-comp-button-outlined-pressed-selected-state-layer-color — #f1f1f1
--tanrei-comp-button-outlined-pressed-state-layer-color — #1b1b1b
--tanrei-comp-button-outlined-pressed-unselected-container-color — #4b4b4b · 10%
--tanrei-comp-button-outlined-pressed-unselected-icon-color — #4b4b4b
--tanrei-comp-button-outlined-pressed-unselected-label-color — #4b4b4b
--tanrei-comp-button-outlined-pressed-unselected-outline-color — #000000 · 8%
--tanrei-comp-button-outlined-pressed-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-outlined-selected-container-color sys.color.inverse-surface #1f1f1f
--tanrei-comp-button-outlined-selected-icon-color comp.button.outlined.selected.label.color #f1f1f1
--tanrei-comp-button-outlined-selected-label-color sys.color.inverse-on-surface #f1f1f1
--tanrei-comp-button-outlined-selected-outline-color — #000000 · 0%
--tanrei-comp-button-outlined-selected-state-layer-color comp.button.outlined.selected.label.color #f1f1f1
--tanrei-comp-button-outlined-state-layer-color comp.button.outlined.label.color #1b1b1b
--tanrei-comp-button-outlined-unselected-container-color — #000000 · 0%
--tanrei-comp-button-outlined-unselected-icon-color comp.button.outlined.unselected.label.color #4b4b4b
--tanrei-comp-button-outlined-unselected-label-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-button-outlined-unselected-outline-color sys.color.outline-variant #000000 · 8%
--tanrei-comp-button-outlined-unselected-state-layer-color comp.button.outlined.unselected.label.color #4b4b4b
--tanrei-comp-button-pressed-container-shape — 9999px
--tanrei-comp-button-pressed-opacity — 1
--tanrei-comp-button-text-container-color — #000000 · 0%
--tanrei-comp-button-text-container-elevation sys.elevation.level0
--tanrei-comp-button-text-destructive-container-color comp.button.text.container.color #000000 · 0%
--tanrei-comp-button-text-destructive-icon-color comp.button.text.destructive.label.color #cd262f
--tanrei-comp-button-text-destructive-label-color sys.color.error #cd262f
--tanrei-comp-button-text-destructive-outline-color comp.button.text.outline.color #000000 · 0%
--tanrei-comp-button-text-destructive-state-layer-color comp.button.text.destructive.label.color #cd262f
--tanrei-comp-button-text-disabled-container-color — #000000 · 0%
--tanrei-comp-button-text-disabled-container-elevation —
--tanrei-comp-button-text-disabled-destructive-container-color — #000000 · 0%
--tanrei-comp-button-text-disabled-destructive-icon-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-destructive-label-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-text-disabled-destructive-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-icon-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-label-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-outline-color — #000000 · 0%
--tanrei-comp-button-text-disabled-selected-container-color — #000000 · 0%
--tanrei-comp-button-text-disabled-selected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-selected-label-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-selected-outline-color — #000000 · 0%
--tanrei-comp-button-text-disabled-selected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-unselected-container-color — #000000 · 0%
--tanrei-comp-button-text-disabled-unselected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-unselected-label-color — #1b1b1b · 38%
--tanrei-comp-button-text-disabled-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-text-disabled-unselected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-text-focused-container-color — #1b1b1b · 10%
--tanrei-comp-button-text-focused-container-elevation —
--tanrei-comp-button-text-focused-destructive-container-color — #cd262f · 10%
--tanrei-comp-button-text-focused-destructive-icon-color — #cd262f
--tanrei-comp-button-text-focused-destructive-label-color — #cd262f
--tanrei-comp-button-text-focused-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-text-focused-destructive-state-layer-color — #cd262f
--tanrei-comp-button-text-focused-icon-color — #4b4b4b
--tanrei-comp-button-text-focused-label-color — #1b1b1b
--tanrei-comp-button-text-focused-outline-color — #000000 · 0%
--tanrei-comp-button-text-focused-selected-container-color — #1b1b1b · 10%
--tanrei-comp-button-text-focused-selected-icon-color — #1b1b1b
--tanrei-comp-button-text-focused-selected-label-color — #1b1b1b
--tanrei-comp-button-text-focused-selected-outline-color — #000000 · 0%
--tanrei-comp-button-text-focused-selected-state-layer-color — #1b1b1b
--tanrei-comp-button-text-focused-state-layer-color — #1b1b1b
--tanrei-comp-button-text-focused-unselected-container-color — #4b4b4b · 10%
--tanrei-comp-button-text-focused-unselected-icon-color — #4b4b4b
--tanrei-comp-button-text-focused-unselected-label-color — #4b4b4b
--tanrei-comp-button-text-focused-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-text-focused-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-text-hovered-container-color — #1b1b1b · 8%
--tanrei-comp-button-text-hovered-container-elevation —
--tanrei-comp-button-text-hovered-destructive-container-color — #cd262f · 8%
--tanrei-comp-button-text-hovered-destructive-icon-color — #cd262f
--tanrei-comp-button-text-hovered-destructive-label-color — #cd262f
--tanrei-comp-button-text-hovered-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-text-hovered-destructive-state-layer-color — #cd262f
--tanrei-comp-button-text-hovered-icon-color — #4b4b4b
--tanrei-comp-button-text-hovered-label-color — #1b1b1b
--tanrei-comp-button-text-hovered-outline-color — #000000 · 0%
--tanrei-comp-button-text-hovered-selected-container-color — #1b1b1b · 8%
--tanrei-comp-button-text-hovered-selected-icon-color — #1b1b1b
--tanrei-comp-button-text-hovered-selected-label-color — #1b1b1b
--tanrei-comp-button-text-hovered-selected-outline-color — #000000 · 0%
--tanrei-comp-button-text-hovered-selected-state-layer-color — #1b1b1b
--tanrei-comp-button-text-hovered-state-layer-color — #1b1b1b
--tanrei-comp-button-text-hovered-unselected-container-color — #4b4b4b · 8%
--tanrei-comp-button-text-hovered-unselected-icon-color — #4b4b4b
--tanrei-comp-button-text-hovered-unselected-label-color — #4b4b4b
--tanrei-comp-button-text-hovered-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-text-hovered-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-text-icon-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-button-text-label-color sys.color.on-surface #1b1b1b
--tanrei-comp-button-text-outline-color — #000000 · 0%
--tanrei-comp-button-text-pressed-container-color — #1b1b1b · 10%
--tanrei-comp-button-text-pressed-container-elevation —
--tanrei-comp-button-text-pressed-destructive-container-color — #cd262f · 10%
--tanrei-comp-button-text-pressed-destructive-icon-color — #cd262f
--tanrei-comp-button-text-pressed-destructive-label-color — #cd262f
--tanrei-comp-button-text-pressed-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-text-pressed-destructive-state-layer-color — #cd262f
--tanrei-comp-button-text-pressed-icon-color — #4b4b4b
--tanrei-comp-button-text-pressed-label-color — #1b1b1b
--tanrei-comp-button-text-pressed-outline-color — #000000 · 0%
--tanrei-comp-button-text-pressed-selected-container-color — #1b1b1b · 10%
--tanrei-comp-button-text-pressed-selected-icon-color — #1b1b1b
--tanrei-comp-button-text-pressed-selected-label-color — #1b1b1b
--tanrei-comp-button-text-pressed-selected-outline-color — #000000 · 0%
--tanrei-comp-button-text-pressed-selected-state-layer-color — #1b1b1b
--tanrei-comp-button-text-pressed-state-layer-color — #1b1b1b
--tanrei-comp-button-text-pressed-unselected-container-color — #4b4b4b · 10%
--tanrei-comp-button-text-pressed-unselected-icon-color — #4b4b4b
--tanrei-comp-button-text-pressed-unselected-label-color — #4b4b4b
--tanrei-comp-button-text-pressed-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-text-pressed-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-text-selected-container-color — #000000 · 0%
--tanrei-comp-button-text-selected-icon-color comp.button.text.selected.label.color #1b1b1b
--tanrei-comp-button-text-selected-label-color sys.color.on-surface #1b1b1b
--tanrei-comp-button-text-selected-outline-color — #000000 · 0%
--tanrei-comp-button-text-selected-state-layer-color comp.button.text.selected.label.color #1b1b1b
--tanrei-comp-button-text-state-layer-color comp.button.text.label.color #1b1b1b
--tanrei-comp-button-text-unselected-container-color — #000000 · 0%
--tanrei-comp-button-text-unselected-icon-color comp.button.text.unselected.label.color #4b4b4b
--tanrei-comp-button-text-unselected-label-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-button-text-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-text-unselected-state-layer-color comp.button.text.unselected.label.color #4b4b4b
--tanrei-comp-button-tonal-container-color sys.color.secondary-container #eeeeee
--tanrei-comp-button-tonal-container-elevation sys.elevation.level0
--tanrei-comp-button-tonal-destructive-container-color sys.color.error-container #ffedeb
--tanrei-comp-button-tonal-destructive-icon-color comp.button.tonal.destructive.label.color #3a211f
--tanrei-comp-button-tonal-destructive-label-color sys.color.on-error-container #3a211f
--tanrei-comp-button-tonal-destructive-outline-color comp.button.tonal.outline.color #000000 · 0%
--tanrei-comp-button-tonal-destructive-state-layer-color comp.button.tonal.destructive.label.color #3a211f
--tanrei-comp-button-tonal-disabled-container-color — #1b1b1b · 12%
--tanrei-comp-button-tonal-disabled-container-elevation —
--tanrei-comp-button-tonal-disabled-destructive-container-color — #1b1b1b · 12%
--tanrei-comp-button-tonal-disabled-destructive-icon-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-destructive-label-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-disabled-destructive-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-icon-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-label-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-disabled-selected-container-color — #1b1b1b · 12%
--tanrei-comp-button-tonal-disabled-selected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-selected-label-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-selected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-disabled-selected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-unselected-container-color — #1b1b1b · 12%
--tanrei-comp-button-tonal-disabled-unselected-icon-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-unselected-label-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-disabled-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-disabled-unselected-state-layer-color — #1b1b1b · 38%
--tanrei-comp-button-tonal-focused-container-color — #dadada
--tanrei-comp-button-tonal-focused-container-elevation —
--tanrei-comp-button-tonal-focused-destructive-container-color — #ebd9d7
--tanrei-comp-button-tonal-focused-destructive-icon-color — #3a211f
--tanrei-comp-button-tonal-focused-destructive-label-color — #3a211f
--tanrei-comp-button-tonal-focused-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-focused-destructive-state-layer-color — #3a211f
--tanrei-comp-button-tonal-focused-icon-color — #262626
--tanrei-comp-button-tonal-focused-label-color — #262626
--tanrei-comp-button-tonal-focused-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-focused-selected-container-color — #636363
--tanrei-comp-button-tonal-focused-selected-icon-color — #ffffff
--tanrei-comp-button-tonal-focused-selected-label-color — #ffffff
--tanrei-comp-button-tonal-focused-selected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-focused-selected-state-layer-color — #ffffff
--tanrei-comp-button-tonal-focused-state-layer-color — #262626
--tanrei-comp-button-tonal-focused-unselected-container-color — #dedede
--tanrei-comp-button-tonal-focused-unselected-icon-color — #4b4b4b
--tanrei-comp-button-tonal-focused-unselected-label-color — #4b4b4b
--tanrei-comp-button-tonal-focused-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-focused-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-tonal-hovered-container-color — #dedede
--tanrei-comp-button-tonal-hovered-container-elevation —
--tanrei-comp-button-tonal-hovered-destructive-container-color — #efdddb
--tanrei-comp-button-tonal-hovered-destructive-icon-color — #3a211f
--tanrei-comp-button-tonal-hovered-destructive-label-color — #3a211f
--tanrei-comp-button-tonal-hovered-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-hovered-destructive-state-layer-color — #3a211f
--tanrei-comp-button-tonal-hovered-icon-color — #262626
--tanrei-comp-button-tonal-hovered-label-color — #262626
--tanrei-comp-button-tonal-hovered-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-hovered-selected-container-color — #606060
--tanrei-comp-button-tonal-hovered-selected-icon-color — #ffffff
--tanrei-comp-button-tonal-hovered-selected-label-color — #ffffff
--tanrei-comp-button-tonal-hovered-selected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-hovered-selected-state-layer-color — #ffffff
--tanrei-comp-button-tonal-hovered-state-layer-color — #262626
--tanrei-comp-button-tonal-hovered-unselected-container-color — #e1e1e1
--tanrei-comp-button-tonal-hovered-unselected-icon-color — #4b4b4b
--tanrei-comp-button-tonal-hovered-unselected-label-color — #4b4b4b
--tanrei-comp-button-tonal-hovered-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-hovered-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-tonal-icon-color comp.button.tonal.label.color #262626
--tanrei-comp-button-tonal-label-color sys.color.on-secondary-container #262626
--tanrei-comp-button-tonal-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-pressed-container-color — #dadada
--tanrei-comp-button-tonal-pressed-container-elevation —
--tanrei-comp-button-tonal-pressed-destructive-container-color — #ebd9d7
--tanrei-comp-button-tonal-pressed-destructive-icon-color — #3a211f
--tanrei-comp-button-tonal-pressed-destructive-label-color — #3a211f
--tanrei-comp-button-tonal-pressed-destructive-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-pressed-destructive-state-layer-color — #3a211f
--tanrei-comp-button-tonal-pressed-icon-color — #262626
--tanrei-comp-button-tonal-pressed-label-color — #262626
--tanrei-comp-button-tonal-pressed-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-pressed-selected-container-color — #636363
--tanrei-comp-button-tonal-pressed-selected-icon-color — #ffffff
--tanrei-comp-button-tonal-pressed-selected-label-color — #ffffff
--tanrei-comp-button-tonal-pressed-selected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-pressed-selected-state-layer-color — #ffffff
--tanrei-comp-button-tonal-pressed-state-layer-color — #262626
--tanrei-comp-button-tonal-pressed-unselected-container-color — #dedede
--tanrei-comp-button-tonal-pressed-unselected-icon-color — #4b4b4b
--tanrei-comp-button-tonal-pressed-unselected-label-color — #4b4b4b
--tanrei-comp-button-tonal-pressed-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-pressed-unselected-state-layer-color — #4b4b4b
--tanrei-comp-button-tonal-selected-container-color sys.color.secondary #525252
--tanrei-comp-button-tonal-selected-icon-color comp.button.tonal.selected.label.color #ffffff
--tanrei-comp-button-tonal-selected-label-color sys.color.on-secondary #ffffff
--tanrei-comp-button-tonal-selected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-selected-state-layer-color comp.button.tonal.selected.label.color #ffffff
--tanrei-comp-button-tonal-state-layer-color comp.button.tonal.label.color #262626
--tanrei-comp-button-tonal-unselected-container-color sys.color.surface-container-highest #eeeeee
--tanrei-comp-button-tonal-unselected-icon-color comp.button.tonal.unselected.label.color #4b4b4b
--tanrei-comp-button-tonal-unselected-label-color sys.color.on-surface-variant #4b4b4b
--tanrei-comp-button-tonal-unselected-outline-color — #000000 · 0%
--tanrei-comp-button-tonal-unselected-state-layer-color comp.button.tonal.unselected.label.color #4b4b4b
--tanrei-comp-button-tone-container-opacity sys.state.selected-state-layer-opacity 0.16
--tanrei-comp-button-label-typescale-large sys.typescale.label 500 14px/1.4286
--tanrei-comp-button-label-typescale-medium sys.typescale.label 500 14px/1.4286
--tanrei-comp-button-label-typescale-small sys.typescale.label 500 14px/1.4286

फ़िक्स्चर

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

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

दिशानिर्देश

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

बटन उस क्रिया के लिए इस्तेमाल करें जो वहीं होती है जहाँ व्यक्ति है: फ़ॉर्म सबमिट करना, सेव करना, कोई प्रक्रिया शुरू करना, डायलॉग की पुष्टि करना। वेब पर, जो बटन अपना फ़ॉर्म भेजता है, वह यह बात type से कहता है (फ़ॉर्म में देखें)।

अगर उसे सक्रिय करने से व्यक्ति सिर्फ़ कहीं और पहुँचता है, तो वह लिंक है। जब वह गंतव्य बटन के एम्फ़ेसिस के लायक़ हो, जैसे लैंडिंग पेज पर “शुरुआत करें” या किसी लिस्ट के अंत में “सभी देखें”, तो बटन ही रखें और उसे href दें: तब वह लिंक है, लिंक के रोल, कुंजियों और ब्राउज़र के व्यवहार के साथ (गंतव्य वाला बटन एक लिंक है देखें)। वाक्य के भीतर का गंतव्य एक साधारण टेक्स्ट लिंक ही रहता है। किसी टेक्स्ट से जुड़ी क्रिया उस टेक्स्ट के बाद एक टेक्स्ट बटन होती है, उसके भीतर का कोई वाक्यांश नहीं: जो चीज़ लिंक जैसी दिखे पर लिंक न हो, उससे व्यक्ति को पता नहीं चलता कि वह क्या करेगी।

वेरिएंट चुनना

वेरिएंट एम्फ़ेसिस बताते हैं, और एम्फ़ेसिस एक बजट है। उसे हर व्यू में एक बार ख़र्च करें।

वेरिएंट एम्फ़ेसिस किसके लिए
Filled सबसे ज़्यादा किसी व्यू या डायलॉग की अकेली सबसे महत्वपूर्ण क्रिया।
Tonal ज़्यादा वह महत्वपूर्ण क्रिया जिसे filled बटन से होड़ नहीं करनी चाहिए, या किसी कम अहम हिस्से की मुख्य क्रिया।
Elevated मध्यम वह क्रिया जिसे व्यस्त या पैटर्न वाले बैकग्राउंड से अलग दिखना है।
Outlined मध्यम filled बटन के बग़ल की बराबर वज़न वाली क्रियाएँ, जैसे “रद्द करें”।
Text कम सबसे कम ज़रूरी क्रियाएँ, और कार्ड, डायलॉग और टूलबार की इनलाइन क्रियाएँ।

destructive कोई वेरिएंट नहीं है: यह किसी भी वेरिएंट के साथ लगता है, और उस वेरिएंट का ज़ोर बनाए रखता है (विनाशकारी क्रियाएँ देखें)।

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

करें

  • लेबल एक क्रिया-शब्द के रूप में लिखें, या क्रिया-शब्द और संज्ञा के रूप में, जो बताए कि क्या होगा: डिप्लॉय करें, ड्राफ़्ट सेव करें, सदस्य जोड़ें।
  • हर व्यू में एक ही filled बटन रखें। अगर दो क्रियाएँ बराबर मुख्य लगती हैं, तो शायद व्यू दो काम कर रहा है।
  • मुख्य क्रिया को वहाँ रखें जहाँ उस प्लैटफ़ॉर्म पर लोग उसकी उम्मीद करते हैं, और पूरे प्रॉडक्ट में वही क्रम बनाए रखें।
  • घने टूलबार और टेबल में small (32), डिफ़ॉल्ट रूप से medium (40), और टच-प्रधान या हीरो वाली जगहों पर large (56) इस्तेमाल करें। हिट एरिया हर साइज़ पर सुरक्षित है।
  • जो क्रिया कुछ हटाती या छोड़ देती है उस पर destructive सेट करें, और उसका वेरिएंट किसी भी दूसरी क्रिया की तरह उसके ज़ोर के हिसाब से चुनें।
  • जिस जगह कुछ हटाया जाता है, वहाँ ले जाने वाले लिंक को साधारण लिंक रखें, जिसका लेबल बताए कि वह कहाँ ले जाता है। destructive उस बटन पर सेट करें जो उस जगह पर हटाता है।
  • आइकन स्लॉट का इस्तेमाल लेबल को मज़बूत करने के लिए करें। लेबल सिर्फ़ वहाँ छोड़ें जहाँ ग्लिफ़ को ज़्यादातर लोग समझते हैं (खोज, बंद करना, और विकल्प), और बटन को label से नाम दें।

न करें

  • बटन के click हैंडलर से नेविगेट न करें। गंतव्य वाला कंट्रोल एक लिंक है: href सेट करें, ताकि उसे नए टैब में खोला जा सके, कॉपी किया जा सके और लिंक के रूप में पढ़कर सुनाया जा सके।
  • जो चीज़ पेज पर कुछ करती है, जैसे “सेव करें” या “हटाएँ”, उसे href न दें, और targetLabel में बताए बिना नया टैब न खोलें।
  • लिस्ट की हर पंक्ति में filled बटन न रखें। Text बटन को तरजीह दें, या ऊपर एक ऐसी क्रिया रखें जो चयन पर लागू हो।
  • वैलिडेशन की समस्या बताने के अकेले तरीक़े के रूप में बटन को अक्षम न करें। उसे सक्षम रखें और दबाए जाने पर बताएँ कि क्या कमी है, या focusable-when-disabled से उसे पहुँच में रखें और बताएँ कि क्यों।
  • क्रिया चलते समय बटन को अक्षम न करें। busy सेट करें, ताकि फ़ोकस उसी पर रहे।
  • destructive का इस्तेमाल ज़ोर देने के लिए, या ऐसी क्रिया के लिए न करें जो कुछ नष्ट नहीं करती। अगर किसी व्यू की हर क्रिया लाल हो, तो कोई भी अलग नहीं दिखती।
  • किसी लिंक को लाल न बनाएँ, और किसी बटन को href और destructive दोनों न दें। लिंक सिर्फ़ कहीं ले जाता है, इसलिए बटन destructive को अनदेखा करता है और अपने वेरिएंट के लिंक की तरह बनता है।
  • लेबल को काटकर छोटा न करें। बटन को बढ़ने दें, या छोटा लेबल लिखें।
  • सिर्फ़ आइकन वाले बटन को label के बिना न छोड़ें: ग्लिफ़ कोई नाम नहीं है।
  • सँकरे, सिर्फ़ आइकन वाले बटनों को हाथ से किनारे-से-किनारा सटाकर न रखें। उनके टार्गेट उनके किनारों से आगे तक पहुँचते हैं और एक-दूसरे पर चढ़ जाएँगे।

कॉन्टेंट

लेबल के अंत में कोई विराम चिह्न नहीं होता। एक या दो शब्दों का लक्ष्य रखें। लेबल वैसे लिखें जैसे आपके प्रॉडक्ट की हर भाषा लेबल लिखती है: अंग्रेज़ी में सेंटेंस केस; जापानी में विनम्र वाक्यांत की जगह संज्ञा या क्रियावाचक संज्ञा वाला रूप, जैसे 保存 या デプロイ।

सुलभता

रोल
button (link while href is set)
लेबलिंग
A button that draws a label is named by that text, unless label is given: then label is the whole name, in place of the drawn text, and it must contain the drawn text (BTN-16). An icon-only button is named by label, which is required; its glyph is decorative to assistive technology. A tooltip may show the same text to sighted pointer users, but it never replaces label. A link button is named in the same way; its name should say where it goes. While target is new, targetLabel is its description ("opens in a new tab"), and the mark is decorative. A description is read after the name and is never the name: what tells one button from its neighbours belongs in the name, and what happens next belongs in the description.
न्यूनतम टार्गेट
दिखने वाला आकार छोटा होने पर भी हिट एरिया न्यूनतम टार्गेट साइज़ को पूरा करता है। minimum 32px · pointer 44px · spacing 8px · touch 48px

कीबोर्ड

कुंजियाँ क्रिया
Tab Moves focus to the button — also to a busy one, and to a disabled one while focusableWhenDisabled is true.
Enter / Space Activates the button; a toggle switches selected. A link button is activated by Enter alone: Space does what it does on any link (on the web it scrolls the page).
Enter in a field of the same form On the web, presses the form's default button — its first submit button — where that is a Button of type submit, and so submits the form; nothing while that button is disabled (BTN-30). Enter in a Tanrei field, checkbox, radio button or switch does the same where the default button is the platform's own.

टिप्पणियाँ

  • A toggle is a button with an on/off state (aria-pressed on the web, the selected trait on Apple platforms, a toggleable state on Android), not a checkbox or a switch; its name does not change with its state.
  • Text must remain readable at 200% text size: the container grows, the label never truncates by default.
  • Container heights are minimums: at larger text sizes the container grows in both axes. An icon-only button's glyph is not text, at any of its three widths: where sizes are points or dp (SwiftUI, Compose, Flutter, React Native), text size leaves its circle and its glyph as they are; on the web every Tanrei size follows the root font size (rem), so at 200% text size the circle and its glyph grow together and stay round and whole (BTN-12). Either way its label is still announced.
  • The icon's side follows the reading direction: leading is the start (left in left-to-right, right in right-to-left). A glyph whose name the system's icon set marks as mirrored (arrow_forward, chevron_right, reply) is mirrored in a right-to-left layout by the icon helper, not by the button, and the product can force or forbid that for one use (BTN-19).
  • How a state looks is a value decision of the active design system (a state-layer mix in Tanrei, possibly explicit colors, a dim, or no hover at all elsewhere). Components read the state's tokens and never compute the effect themselves, with one exception: on a tone a host gives it (BTN-45), whose color is known only where the button is drawn, the button lays the tone over its container at the system's state-layer opacities, as a carousel lays its state layer over a product's image. A system that draws no state layer sets those opacities to 0.
  • A narrow icon-only button is drawn narrower than the minimum target; its hit area is not (BTN-21). Leave room for the target beside it, or put narrow buttons in a toolbar or a group that spaces them.
  • The outline of an outlined button is the hairline of the default system (the divider's color), which is far below 3:1 against the surface. That is within WCAG 1.4.11: the edge is not what identifies the control. Its label is text held to 4.5:1 and its icon to the same ratio, a toggle that is on is shown by its fill, and focus by the focus ring. A product whose outlined buttons must show a 3:1 edge sets comp.button.outlined.outline.color to sys.color.outline in a layer.
  • A button with a destination is a link: the link role, the platform's own link, Enter and not Space. It is not a button that navigates from a click handler: on the web such a button has no address to copy, cannot be opened in a new tab and is announced as something that acts on the page. The look does not say which of the two it is, and need not: sighted people tell a destination from an action by its label, as they do in a toolbar.
  • Tanrei draws no visited state for a link button: it is a control whose color says its emphasis and its state, and the web restricts what a visited link may change to colors a page cannot read back. Visited links are a matter for links in running text.
  • A link that opens a new context says so twice: the open_in_new mark for people who see it, and targetLabel for people who do not (WCAG 1.1.1: the mark carries information, so it needs a text alternative; technique G201 advises warning before a new window). The words are the product's.
  • An action repeated in every row of a list or a table is drawn with one word and named for its row: label is the whole name ("Reset: Spacing"), opening with the drawn word where the language allows. Six buttons that are all named "Reset" cannot be told apart in the list of controls a screen reader offers, and a description does not appear there. The name must contain the drawn text (WCAG 2.5.3, label in name): a person who uses speech input says the word on the button. A debug build reports a name that does not; it never repairs one, because joining two texts into a phrase is a decision about a language, and the words are the product's.
  • On the web a Button of type submit or reset is its form's button as the platform's own is: the form validates, fires its submit or reset event, and the pressed button's name and value are sent with it. Enter in a field presses the form's first submit button, and a disabled one stops it. The default type is button, not the platform's submit: a button put in a form for another purpose must never send it by accident (BTN-27, BTN-33).
  • A button can keep a form from being sent twice: while busy it is shown and focusable but refuses every press, emits no click and therefore submits nothing (BTN-27 follows click), and it stops Enter in a field as a disabled default button does (BTN-37, BTN-32). Prefer it to disabling the button while the first submission is on its way: a disabled button drops the person's focus, and says nothing of why.
  • Where script does not run, or before the element is defined, a web Button is its text and nothing else, and submits nothing; so is every Tanrei field, so a form made of them cannot be filled either. A form that must be sent without script is made of the platform's own controls, with the platform's own submit button.
  • The native platforms have no form element, and the Button has no type there (BTN-34): which button the Return key presses is the app's to say, in the platform's idiom.
  • A disabled button leaves the focus order, so a keyboard or screen-reader user may never learn it is there or why it does nothing. Where a person can make the action available (fill in the message, choose a file), keep it reachable with focusableWhenDisabled and say why in a tooltip or a description; where the action simply does not apply, leave it out of the focus order (BTN-38).
  • destructive adds a color, never a meaning (WCAG 1.4.1, use of color): the error color tells people who see it that the action deletes or discards something, and nothing tells a screen reader user so but the label. So the label names the action and what it acts on ("Delete project", not "OK"), and a dialog that confirms it says what will be lost in its headline and supporting text. The web has no role or state for a destructive action, so none is invented; SwiftUI's destructive role is given where it exists, and the platform decides what it does with it.
  • Disabled, a destructive button looks like any disabled button of its variant: the error color is a warning about what a press would do, and a button that cannot be pressed does nothing.
  • A tone keeps a button readable on a colored surface its host draws (a status callout, an inverse snackbar): the button's content takes the surface's own content color, which the host holds to the contrast its own text needs, and its container is a translucent layer of that color rather than a color chosen against the page. The layer lowers the contrast between the content and what is under it a little (at 16 % in the default system, about a sixth of the way from the surface toward the content color): a host's content color must still hold 3:1 against that blend for an icon-only button (WCAG 1.4.11) and 4.5:1 for a labelled one (WCAG 1.4.3).

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

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

  • यह हर प्लैटफ़ॉर्म पर सहायक तकनीक को बटन का रोल और उसका अक्षम स्टेट देता है। href के साथ यह उसकी जगह लिंक का रोल देता है, और उसे सिर्फ़ Enter सक्रिय करती है।
  • टॉगल दबाए हुए स्टेट वाला एक बटन है, चेकबॉक्स या स्विच नहीं, और उसका नाम उसके स्टेट के साथ नहीं बदलता।
  • नया संदर्भ खोलने वाला लिंक यह बात दो बार कहता है: देखने वालों के लिए open_in_new का निशान, और न देखने वालों के लिए लिंक के विवरण के रूप में targetLabel। निशान ख़ुद सहायक तकनीक से छिपा रहता है।
  • दिखने वाले लेबल के साथ label होने पर यह एक ही कंट्रोल पर एक ही नाम देता है: label। दिखने वाला टेक्स्ट दोबारा नहीं पढ़ा जाता।
  • वेब पर किसी फ़ील्ड में Enter फ़ॉर्म के डिफ़ॉल्ट बटन को दबाती है, अक्षम या व्यस्त डिफ़ॉल्ट बटन उस कुंजी को रोकता है, और अक्षम fieldset के भीतर का बटन उसके साथ अक्षम होता है।
  • व्यस्त बटन, और focusable-when-disabled वाला अक्षम बटन, फ़ोकस के क्रम में रहते हैं और फ़ोकस बनाए रखते हैं। वे सहायक तकनीक को बताते हैं कि उन्हें अभी सक्रिय नहीं किया जा सकता, और व्यस्त बटन busy-label एक बार पढ़कर सुनाता है।
  • इसका हिट एरिया small साइज़ और narrow चौड़ाई पर भी न्यूनतम टार्गेट पूरा करता है, और इसके लिए बटन को बड़ा नहीं बनाया जाता।
  • कीबोर्ड फ़ोकस के लिए यह “पहले ख़ाली जगह, फिर रिंग” वाला फ़ोकस इंडिकेटर दिखाता है, बिना ऐनिमेशन के।
  • इसके रंग उन रोल जोड़ियों से आते हैं जिनका कंट्रास्ट हर कंट्रास्ट स्तर पर जाँचा गया है। outlined बटन की आउटलाइन डिफ़ॉल्ट सिस्टम की बारीक रेखा है, जो स्टैंडर्ड कंट्रास्ट पर जान-बूझकर हल्की रखी गई है: कंट्रोल की पहचान लेबल और आइकन से होती है, उसके किनारे से नहीं। मध्यम और उच्च कंट्रास्ट पर यह बारीक रेखा 3:1 और 4.5:1 तक बढ़ा दी जाती है। जिस प्रॉडक्ट को ज़्यादा मज़बूत किनारा चाहिए, वह एक लेयर में comp.button.outlined.outline.color को sys.color.outline पर सेट करता है।
  • बड़े टेक्स्ट साइज़ पर कंटेनर बढ़ता है और लेबल कभी कटता नहीं।
  • destructive सिर्फ़ रंग बदलता है। रोल, नाम, स्थितियाँ और कुंजियाँ उसी बटन जैसी रहती हैं जिस पर यह नहीं है, क्योंकि वेब पर ऐसा कोई रोल या स्थिति नहीं है जो बताए कि क्रिया विनाशकारी है। SwiftUI पर यह प्लैटफ़ॉर्म का अपना destructive रोल है।

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

  • ऐसा लेबल लिखें जो संदर्भ के बिना भी समझ आए। प्रोजेक्ट के नाम के बग़ल में “हटाएँ” से “प्रोजेक्ट हटाएँ” बेहतर है, क्योंकि स्क्रीन रीडर इस्तेमाल करने वाला व्यक्ति बटन को अकेले सुन सकता है।
  • अगर कोई क्रिया लंबी प्रक्रिया शुरू करती है, तो busy-label के साथ busy सेट करें, और प्रक्रिया पूरी होने पर नतीजा पढ़कर सुनाएँ। सिर्फ़ बटन को अक्षम कर देना स्क्रीन रीडर इस्तेमाल करने वाले व्यक्ति को कुछ नहीं बताता, और उसका फ़ोकस भी छिन जाता है।
  • यह बताने के लिए कि क्रिया विनाशकारी है, सिर्फ़ रंग पर निर्भर न रहें। destructive उसे एरर के रंग में बनाता है, पर जो लोग वह रंग देख या पहचान नहीं सकते, वे यह सिर्फ़ लेबल से जानते हैं। “ठीक है” नहीं, “प्रोजेक्ट हटाएँ” लिखें, और पुष्टि करने वाले डायलॉग में बताएँ कि क्या खो जाएगा।
  • लिंक बटन को उस जगह के नाम से नाम दें जहाँ वह ले जाता है: “इनवॉइस देखें”, न कि “यहाँ क्लिक करें”। जब target का मान new हो, तो targetLabel लिखें।
  • जहाँ कई बटन एक ही शब्द दिखाते हैं, वहाँ हर एक को ऐसा label दें जिसमें वह शब्द हो और जो बताए कि बटन किस पर काम करता है (लेबल से लंबा नाम देखें)।
  • जब फ़ॉर्म का सबमिट बटन अक्षम हो, तो पेज पर बताएँ कि अभी क्या बाक़ी है। अक्षम बटन Enter को भी रोकता है, और अपने आप कुछ नहीं समझाता।
  • सिर्फ़ आइकन वाले हर बटन को label से नाम दें। टूलटिप पॉइंटर इस्तेमाल करने वालों को वही टेक्स्ट दिखा सकता है, पर वह कभी label की जगह नहीं लेता।