{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Button","siteUrl":"https://xrpl.org","llmstxt":{"hide":false,"title":"XRPL Developer Portal & Documentation","description":"Explore XRP Ledger documentation, blogs, and other blockchain developer resources needed to start building and integrating with the ledger.","details":{"content":"XRP Ledger concepts, use cases, tutorials, references, and other blockchain developer resources. Also, stay up to date with release announcements and more through the XRPL Blog."},"sections":[{"title":"Introduction","description":"A high-level introduction to the XRP Ledger.","includeFiles":["docs/introduction/**/*.*","about/faq.md"],"excludeFiles":["docs/introduction/index.md"]},{"title":"Use Cases","description":"Real-world applications and business scenarios for the XRP Ledger.","includeFiles":["docs/use-cases/**/*.*"],"excludeFiles":["docs/use-cases/index.md","docs/use-cases/defi/index.md"]},{"title":"Agentic Transactions","description":"XRPL AI Starter Kit to help autonomous agents discover, set up, and execute agentic transactions on the XRP Ledger.","includeFiles":["docs/agents/**/*.*"]},{"title":"Concepts","description":"Core concepts including accounts, tokens, transactions, consensus, and more.","includeFiles":["docs/concepts/**/*.*"],"excludeFiles":["docs/concepts/index.md","docs/concepts/decentralized-storage/index.md","docs/concepts/payment-types/index.md"]},{"title":"Tutorials","description":"Step-by-step guides for building on the XRP Ledger in JavaScript, Python, Go, and more.","includeFiles":["docs/tutorials/**/*.*"]},{"title":"References","description":"Protocol specification, transaction types, ledger entries, and API methods.","includeFiles":["docs/references/**/*.*"],"excludeFiles":["docs/references/xrp-api.md","docs/references/data-api.md","docs/references/protocol/index.md","docs/references/protocol/ledger-data/ledger-entry-types/index.md","docs/references/protocol/transactions/index.md","docs/references/protocol/transactions/types/index.md","docs/references/http-websocket-apis/api-conventions/index.md","docs/references/http-websocket-apis/public-api-methods/*/index.md","docs/references/http-websocket-apis/admin-api-methods/*/index.md"]},{"title":"Infrastructure","description":"Install, configure, and troubleshoot xrpld and Clio servers.","includeFiles":["docs/infrastructure/**/*.*"],"excludeFiles":["docs/infrastructure/index.md","docs/infrastructure/*/index.md","docs/infrastructure/installation/build-run-xrpld-in-reporting-mode.md","docs/infrastructure/configuration/data-retention/index.md","docs/infrastructure/configuration/server-modes/index.md"]},{"title":"Blog (2023+)","description":"Recent XRPL Blog posts (showing 2023 and newer).","includeFiles":["blog/2023/**/*.*","blog/2024/**/*.*","blog/2025/**/*.*","blog/2026/**/*.*"]},{"title":"Resources","description":"Developer resources and contribution guidelines.","includeFiles":["resources/**/*.*"]}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"button","__idx":0},"children":["Button"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Built from the Figma-derived specification. Appearance is three axes —"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intention"]}," × ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["context"]}," × ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["emphasis"]}," — bound straight to the token groups."," ","Geometry never varies: padding, the 40px minimums and the 1px border are"," ","identical on every combination and every state."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Live at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/button-demo"]}," — every combination, every state, on all three surfaces."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"provenance","__idx":1},"children":["Provenance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every value comes from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["github.com/samiamdesigns/pd-xrpl-developer-docs"]},":"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["components/button.md"]}," (the axes and the reasoning), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["components/button.json"]}," ","(values resolved per mode), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["components/button-examples.md"]}," (the acceptance"," ","checklist), plus ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accessibility/focus-indicators.md"]},","," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["implementation/icons-that-inherit-colour.md"]}," and"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["implementation/font-stacks.md"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The colour matrix in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Button.scss"]}," §2 was generated rather than transcribed and"," ","verified back against ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["button.json"]},": all 270 values, both modes, no RGB"," ","mismatch."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"api","__idx":2},"children":["API"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"<Button>Get started</Button>\n\n<Button intention=\"neutral\" emphasis=\"standard\">Learn more</Button>\n<Button context=\"on-saturated\">On a green block</Button>\n<Button href=\"/docs\" target=\"_blank\">Read the docs</Button>\n<Button iconEnd={<XrplArrowInternalLinkIcon />}>Read more</Button>\n<Button loading>Submitting…</Button>\n","lang":"tsx"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Prop"},"children":["Prop"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Values"},"children":["Values"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intention"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brand"]}," · ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["neutral"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brand"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["context"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["on-theme"]}," · ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["on-inverse"]}," · ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["on-saturated"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["on-theme"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["emphasis"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strong"]}," · ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["standard"]}," · ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subtle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strong"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["loading"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aria-busy"]},", activation suppressed, indicator shown"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inactive"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aria-disabled"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["stays in the tab order"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean — native ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]},", leaves the tab order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["href"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["renders an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<a>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iconStart"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iconEnd"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["decorative, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aria-hidden"]}," — either slot omitted renders no icon and reserves no space"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"context-is-the-axis-to-get-right","__idx":3},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["context"]}," is the axis to get right"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each context is measured against a different backdrop, so choosing the wrong one"," ","is the likeliest way to produce a button that looks plausible and fails"," ","contrast. It also drives the focus-ring colour, and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["nothing will tell you if"," ","that is wrong"]}," — a button that takes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["context=\"on-inverse\""]}," for its paint and"," ","leaves the ring at its default renders perfectly."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"neutral--on-saturated-does-not-compile","__idx":4},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["neutral"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["on-saturated"]}," does not compile"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are no tokens for it. The props are a discriminated union, so that"," ","combination is a type error rather than a runtime surprise."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"two-strong-buttons-must-not-share-a-container","__idx":5},"children":["Two ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strong"]}," buttons must not share a container"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Emphasis is what says which action is primary. No checker catches this — a row"," ","of identical ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strong"]}," buttons is contrast-clean and still wrong."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"states","__idx":6},"children":["States"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Six states, three appearances. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hover"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pressed"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["loading"]}," resolve"," ","byte-identically and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inactive"]}," == ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rest"]},", in all 15 combinations, in both"," ","modes."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Appearance"},"children":["Appearance"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"States"},"children":["States"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Resting"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rest"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inactive"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Engaged"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hover"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pressed"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["loading"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Disabled"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]}," — its own group"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["They stay separate code paths, because what distinguishes them is behaviour:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"ARIA"},"children":["ARIA"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"tab order"},"children":["tab order"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"activates"},"children":["activates"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["loading"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aria-busy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["in"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inactive"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aria-disabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["in"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["native ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["out"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Collapsing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inactive"]}," into ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]}," removes it from the tab order, and a"," ","screen-reader user can then no longer find it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]}," is chosen by context alone"]}," — not by intention, not by emphasis."," ","Emphasis only selects the shape: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strong"]}," keeps fill and border, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["standard"]}," ","drops the fill, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subtle"]}," drops both."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"anchor-paint","__idx":7},"children":["Anchor paint"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["href"]}," renders an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<a>"]},", so every bare ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["a"]}," rule on the site applies to it —"," ","Bootstrap's, the theme's, and any container styling its own anchors."," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Button.scss"]}," §5 out-specifies them with a doubled class,"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["a.bds-btn.bds-btn:link"]}," and the other four link pseudo-classes."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Do not collapse those into ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":is()"]},"."]}," PurgeCSS drops a rule when the argument"," ","to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":is()"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":where()"]}," is a pseudo-class list or a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":not()"]}," chain, so the tidy"," ","form compiles, works in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["realm develop"]},", and vanishes from the production bundle"," ","— leaving anchor buttons painted as links. A plain selector argument is fine,"," ","which is why ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":where(html.dark)"]}," in §4 survives. §5 is also deliberately"," ","unlayered, since everything above it sits in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@layer bds-btn.*"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"not-from-the-token-set","__idx":8},"children":["Not from the token set"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The background rise"]}," — a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["::before"]}," scaling from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bottom center"]},". The spec"," ","says hover swaps the whole triplet; the rise is only ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["how"]}," the fill arrives."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The animated arrow"]},", with the motion inside the icon's own viewBox so the"," ","button's geometry never changes on hover."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Motion values: 150ms, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cubic-bezier(0.98, 0.12, 0.12, 0.98)"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deliberate-deviations-from-the-spec","__idx":9},"children":["Deliberate deviations from the spec"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Deviation"},"children":["Deviation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Why"},"children":["Why"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intention"]}," is optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["button.md"]},"'s printed union marks it required, which would reject ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<Button>Get started</Button>"]}," — the zero-prop default its own examples show. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["button.json"]}," records ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"default\": \"brand\""]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Reported upstream."]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Loader glyph is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LoaderIcon"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The spec's glyph is an explicit placeholder and asks us to pick one and report back. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["This is the choice to report."]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The loader slows under reduced motion rather than stopping"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Freezing it removes the only signal that anything is happening. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aria-busy"]}," covers assistive technology; nothing covers a sighted user watching a motionless spinner."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Alpha comes from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_colors.scss"]},", not ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["button.json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The JSON rounds alpha to 2dp; ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_colors.scss"]}," carries the generated 8-digit Radix value the tokens are built from. 57 of 270 values differ by up to 1.2/255 of alpha. No RGB channel differs anywhere."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"where-the-colours-come-from","__idx":10},"children":["Where the colours come from"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Every colour in the palette is a variable from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["styles/_colors.scss"]}]}," — not"," ","one hex literal in the map. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_colors.scss"]}," already carries the generated Radix"," ","scales the tokens are built from, so binding the variables is shorter and truer"," ","than copying numbers, and a palette change propagates on its own."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The pairs double as documentation: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["($sage-12, $sage-dark-12)"]}," reads as \"step 12"," ","of the neutral scale, per mode\", and the on-inverse groups visibly swap them."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Three exceptions, commented in the file: the focus ring's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["#111111"]}," and"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["#000000"]}," come from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mode-color.focus-indicator.*"]},", a token family with no"," ","counterpart in any scale the site carries. White binds ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$white"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To change a colour, edit the map in §2 — one ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@each"]}," loop emits all 30 rules."," ","To re-derive it, re-resolve ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["button.json"]},"; if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["button.md"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["button.json"]}," ","disagree, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["neither wins"]},", re-resolve from the token set."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"traps","__idx":11},"children":["Traps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["line-height: 1"]}," is a ratio, not ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1px"]},"."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["button.md"]}," reversed this on"," ","2026-08-17; converting it is the documented trap."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["on-inverse"]}," is not a mode-swap of its base group."]}," 104 of 108 values"," ","survive that shortcut and 4 border values do not, so it is emitted literally."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PurgeCSS."]}," The group/emphasis/context classes are composed from props at"," ","runtime and emitted from a Sass loop, so they appear as literals nowhere."," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postcss.config.cjs"]}," safelists ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/^bds-btn/"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/^bds-icon/"]},"; without them"," ","the production build silently strips the component."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":where(html.dark)"]}," in §4 is load-bearing."]}," A bare ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["html.dark"]}," selector"," ","outranks the state swaps and leaves disabled buttons with their resting fill"," ","in dark mode only."]}]}]},"headings":[{"value":"Button","id":"button","depth":1},{"value":"Provenance","id":"provenance","depth":2},{"value":"API","id":"api","depth":2},{"value":"context is the axis to get right","id":"context-is-the-axis-to-get-right","depth":3},{"value":"neutral + on-saturated does not compile","id":"neutral--on-saturated-does-not-compile","depth":3},{"value":"Two strong buttons must not share a container","id":"two-strong-buttons-must-not-share-a-container","depth":3},{"value":"States","id":"states","depth":2},{"value":"Anchor paint","id":"anchor-paint","depth":2},{"value":"Not from the token set","id":"not-from-the-token-set","depth":2},{"value":"Deliberate deviations from the spec","id":"deliberate-deviations-from-the-spec","depth":2},{"value":"Where the colours come from","id":"where-the-colours-come-from","depth":2},{"value":"Traps","id":"traps","depth":2}],"frontmatter":{"seo":{"title":"Button"}},"editPage":{"to":"https://github.com/XRPLF/xrpl-dev-portal/tree/master/shared/components/Button/Button.md"},"lastModified":"2026-08-22T05:02:19.000Z","isTranslationFallback":true,"pagePropGetterError":{"message":"","name":""}},"slug":"/es-es/shared/components/button/button-2","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}