Skip to content

spec(IconButton): React Native platform record - #12820

Draft
imdreamrunner wants to merge 4 commits into
chore/knowledge-react-native-platform-recordsfrom
spec/iconbutton-react-native-record
Draft

imdreamrunner wants to merge 4 commits into
chore/knowledge-react-native-platform-recordsfrom
spec/iconbutton-react-native-record

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #12592; merges after it.

Merge order: this record also cites spec:AST-082 DEC-2 as amended (#12801), spec:AST-123 (#12557), spec:AST-127 (#12555), spec:AST-130 (#12553), and the React Native Button record, which owns the press engine both buttons share. It merges after those. The rules it uses most (the glass circle, the toggle, the count) are stated in the record itself.

Exact decision needed

How React Native draws IconButton: which core props it offers, the React Native platform props it adds (a toggle with ToggleButton's names, a count, the size xl, surface), and how a glass IconButton looks and sizes.

One point needs the family:buttons owner: AV1 gives retained pressed state to ToggleButton, and on React Native an IconButton with isPressed is a controlled toggle under ToggleButton's names (DEC-2). The record states this as a deliberate difference in its family relationships.

An engineering owner also settles the count beside the glyph, xl beyond the sm | md | lg axis that architecture:component-size-cascade INV1 fixes (DEC-3), and surface, which rests on the spec:AST-082 DEC-2 and spec:AST-093 FR4 amendment (#12801).

Existing authority searched

  • component:IconButton (docs/specs/components/IconButton/IconButton.spec.md): props, icon-only mode, name rule, square and icon size; no React Native rendering.
  • component:Button and component:ToggleButton: press, link, loading, disabled, tooltip; pressed-state names and meaning.
  • family:buttons: FR1, FR3, FR4, FR6, FR7, AV1 and AV4.
  • spec:AST-082 DEC-2 as amended (open draft): surface (plain or glass) on Button and IconButton, no default; every other native look stays theme intent.
  • spec:AST-123 (open draft): FR1 and FR7 own the paint each surface value and placement gets; FR3 the glass view.
  • spec:AST-127 (open draft): icon resolution and the Large Content Viewer glyph; spec:AST-130 (open draft): haptic moments, link opening, the accessibility settings snapshot.
  • architecture:component-size-cascade: slot sizes.
  • Terms searched: IconButton, surface, glass, isPressed, count, xl. No open pull request records IconButton on React Native.

Decision

docs/specs/components/IconButton/IconButton.react-native.spec.md (component:react-native/IconButton, platform_of: component:IconButton):

  • React Native exports IconButton under core's name with core's props and meaning; the web contract's props are not offered, and width is content or fill (DEC-1).
  • icon and pressedIcon take an icon name or a React element. No second input is offered for a concept a core prop owns: label owns the spoken name, onClick the press, tooltip the description (spec:AST-082 FR7).
  • An engagement row (Like, Save, a reply count) is an IconButton with a controlled toggle under ToggleButton's names and callback order (onClick, then onPressedChange) and a count beside the glyph, read as one element ("Like, 12") (DEC-2).
  • xl is a square and glyph a third larger than lg, for media transport rows; only an explicit size sets it (DEC-3).
  • surface takes plain or glass, with no default; unset follows the chrome paint in a bar, the tab accessory or the search field, else plain. A glass IconButton is a circle at least the touch target, one size at every text size on iOS with the Large Content Viewer, grown with the text on Android; the variant keeps its meaning as ink; Reduce Transparency and Increase Contrast make it opaque (DEC-4).
  • Press, link, loading, disabled, tooltip, touch target and theme overrides follow the React Native Button record.
  • Gap lines state where the package differs today: it also takes onPress, accessibilityLabel, accessibilityHint and hint (FR2); a toggle calls onPressedChange before onClick (FR6); it spells plain as default and defaults to it, and it also takes a muted surface value (FR8).

Rejected alternatives

None recorded in the record.

Claim scope and non-goals

The record covers only what React Native adds to component:IconButton or does differently. The shared press engine, the paints, the glass views, icons and haptics stay with their owners, which the record's ownership lines name.

Evidence and implementation relationship

The record is a specification only and has no implementation in this pull request. Its gap lines state where the current package differs from the requirements.

Writing rubric results

  • R1 narration: none; the record is in the present tense, and each decision states a rule with its reason.
  • R2 research in the record: none; one-sentence reasons inside DEC-1 to DEC-4 only.
  • R3 evidence naming a change: none; every basis cell names records and claims.
  • R4 rejected alternatives over one line or outside a decision: none; the record keeps no Rejected: lines.
  • R5 pull request or issue references remaining: none in the record.
  • R6 ruled open questions still listing options: none; Open questions reads "None."
  • R7 project status (build status or work order): the package's differences are stated as FR2, FR6 and FR8 gap lines; "not yet released" appears only in the template's lifecycle field and readiness cell.

Scope

Components: IconButton (React Native)

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • node scripts/check-knowledge.mjs: knowledge templates and records are aligned; no finding in this record.
  • Prettier: --check clean on the record.
  • git diff --check: clean.

Follow-up: claims moved from spec:AST-112

FR8 states that surface is a per-call-site choice, moved here from spec:AST-112 FR21 as part of #13029. ORD4 keeps its order of paint.

@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 20, 2026 1:01am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 20, 2026, 1:15 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 19, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner deciding the draft direction in this record, and three record defects need fixing whatever that decision is.

What an engineering owner has to settle (record it by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner): IconButton taking ToggleButton's pressed state on React Native although family:buttons AV1 says IconButton does not retain pressed state; the count beside the glyph, which no current record covers; the xl size beyond the sm | md | lg axis that architecture:component-size-cascade INV1 fixes; and surface, which needs spec:AST-082 DEC-2 and spec:AST-093 FR4 amended first (#12801).

Blocking findings:

  • FR2 and DEC-1 add onPress, accessibilityLabel, accessibilityHint and hint beside core's onClick, label and tooltip, which spec:AST-082 FR7 rules out because a core prop owns its concept, and which leaves onClick accepted but ignored when both press callbacks are set, against AST-082 FR3.
  • FR6 and ORD1 run onPressedChange before onClick, the reverse of component:ToggleButton FR3 and family:buttons FR5, although FR6 promises ToggleButton's meaning, so a toggle vetoed in onClick on the web still flips on React Native.
  • FR9 gives a glass lg IconButton the 32 px xl glyph and a glass xl IconButton core Icon's 24 px lg glyph, so the larger circle holds the smaller glyph.

The record also reads correctly only once the open drafts it builds on (#12592, #12801, #12817, #12557, #12555, #12553) land.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: the repository's knowledge check finds nothing in this record: verified, it passes at this head.
  • Claim: Prettier reports the record clean: verified.
  • Claim: no other open pull request records IconButton on React Native: verified by a repository search.
  • Claim: press, link, loading, disabled, tooltip, touch target and theme overrides follow the React Native Button record: verified in FR5; that record is still an open pull request.
  • Claim: the record states its departure from the button family's pressed-state rule: verified in its family relationships.
  • Claim: surface rests on the native-first spec's visual-props decision as amended: verified that the amendment exists only in an open pull request.
  • Claim: the record has no pull request references, rejected alternatives or open questions: verified.
  • Claim: the toggle uses ToggleButton's names and meaning: false for the callback order (FR6, ORD1).
  • File: docs/specs/components/IconButton/IconButton.react-native.spec.md: the three findings above.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner deciding the draft direction in this record; the record defects raised earlier are fixed or explained at this head, and none blocks.

What an engineering owner has to settle (record it by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner):

  • IconButton takes ToggleButton's pressed state on React Native although family:buttons AV1 says IconButton does not retain pressed state, and its onClick cannot cancel the toggle the way ToggleButton's preventDefault() can.
  • The count beside the glyph, which no current record covers.
  • The xl size beyond the sm | md | lg axis that architecture:component-size-cascade INV1 fixes.
  • surface and the glass circle, which need spec:AST-082 DEC-2 and spec:AST-093 FR4 amended first (#12801).
  • Leaving clickAction out of the React Native contract, a reading of spec:AST-082 FR4 that no clause states.

An approval settles direction only: the family, size-cascade and native-surfaces records it departs from still need amending, or the record narrowing, before this can be approved. Non-blocking: FR9 gives glass xl "48 pt" with no Android unit, and the frontmatter families list leaves out family:navigation-destinations, which FR5 relies on.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the React Native platform-records pull request and merges after it: verified, the base is that pull request's branch.
  • Claim: the record also rests on the open native-surfaces amendment, the surfaces and glass, icons, and system-modules drafts, and the React Native Button record: verified, all are open drafts.
  • Claim: the glass circle, the toggle and the count are stated in the record itself: verified in FR6, FR7 and FR9.
  • Claim: the record states its departure from the button family's pressed-state rule: verified in its family relationships.
  • Claim: no other open pull request records IconButton on React Native: verified by a repository search.
  • Claim: the toggle uses ToggleButton's names and callback order, onClick then onPressedChange: verified in FR6 and ORD1.
  • Claim: no second input for a concept a core prop owns: verified in FR2, AR1, ORD2 and DEC-1.
  • Claim: the gap lines state where the package differs today: present for FR2, FR6 and FR8; the package itself is outside this repository.
  • Claim: no pull request references, rejected alternatives or open questions in the record: verified.
  • Claim: the knowledge check finds nothing in this record, Prettier is clean, and the diff has no whitespace errors: verified at this head.
  • File: docs/specs/components/IconButton/IconButton.react-native.spec.md: owner decisions above; two non-blocking notes.

Automated review (maintainer link)


| ID | Candidate invariant | Basis | Draft review state |
| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------ |
| FR1 | React Native MUST export the component as `IconButton`, the name it has on every platform (`spec:AST-082` FR3), and take core IconButton's props with core's names, meaning and defaults: `label`, `icon`, `variant`, `size`, `elevation`, `isLoading`, `isInterruptible`, `isDisabled`, `tooltip`, `onClick`, `width` and `href`, with the base props `id` and `isHidden` (`spec:AST-082` FR7). `width` takes `content` and `fill`, the web's `auto` and `100%`. The web contract's props (`clickAction`, `type`, `name`, `value`, `form`, `as`, `target`, `rel`) are not offered, and using one is a type error. `style` and `testID` are not props; `id` sets the view's test id and native id. | `component:IconButton` FR1; `spec:AST-082` FR3, FR5, FR7; DEC-1 | verify |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clickAction is in the list of web-contract props here, but component:IconButton FR4 lists it among IconButton's props, and spec:AST-082 FR3 says a platform contract never removes a core prop and that a prop leaves the core only when a platform cannot match core's behavior. DEC-1's reason, that a press callback returning a value has no portable form, is not in AST-082 FR4, which lists "callbacks whose arguments are portable". This is part of the engineering owner's decision on this record; if it stays, AST-082 is where that reading belongs.

| FR6 | With `isPressed` set, IconButton MUST be a toggle with core ToggleButton's names and pressed-state meaning (`component:ToggleButton`). A press runs `onClick`, then calls `onPressedChange` with the next state, in ToggleButton's order (`component:ToggleButton` FR3, `family:buttons` FR5), and plays the library's toggle haptic moment (`spec:AST-130` FR6); React Native's callbacks take no event, so `onClick` does not cancel the toggle. It exposes the pressed state: on iOS a toggle button with its checked value, on Android a button with the selected state and "not selected" in its value when unpressed. It draws ToggleButton's pressed fill on `secondary` and `ghost`, keeps the fill of `primary` and `destructive`, and shows `pressedIcon` while pressed; a `ghost` toggle with a `pressedIcon` keeps no fill, so the glyph alone carries the state. A toggle is an action: with `isPressed` set, `href` opens nothing and the role stays a toggle (`family:buttons` AV4). A touch that travels past the press slop does not toggle. | `component:ToggleButton` FR3; `family:buttons` FR5, FR6, AV4; DEC-2 | verify |
| FR7 | A non-zero `count` MUST draw beside the glyph, in the label type with tabular figures and the button's ink, inside the same press target, formatted for the locale; `countLabel` replaces the drawn and spoken words (a compact "1.2K"). The square becomes a pill as tall as the square and at least as wide, with `space.s1` before the glyph, between the glyph and the count, and after the count (`space.s2` at the ends for `lg` and `xl`); no row shrinks it. The count is read after the name as one element ("Like, 12"). `isCountVisible={false}` keeps the count in the spoken name without drawing it, and the square stays. A counted toggle keeps FR6. | DEC-2 | verify |
| FR8 | `surface` MUST take `plain` or `glass` and have no default (`spec:AST-082` DEC-2 as amended; `spec:AST-123` FR1). `plain` draws the variant's own fill (FR3, FR5). `glass` draws FR9's circle on chrome glass, painted as `spec:AST-123` FR7's chrome row chooses. An unset `surface` follows the chrome row in a bar, the tab accessory or the search field, and draws `plain` elsewhere (`spec:AST-123` FR7). `surface` is IconButton's only visual prop; every other look comes from the theme (`spec:AST-093` FR4). | `spec:AST-082` DEC-2; `spec:AST-123` FR1, FR7, DEC-7 | verify |
| FR9 | A glass IconButton MUST be a circle at least the touch target: for `sm`, `md` and `lg`, 44 pt on iOS and 48 dp on Android, or the element size when that is larger; for `xl`, 48 pt or the `xl` square when that is larger. At `sm` and `md` it holds a `md` glyph. A glass `lg` is a close control on a sheet or a bar: its glyph frame is the `xl` glyph's, so the drawn mark matches the size of the system's close button. A glass `xl` is a media control over a photo or a video: it holds core Icon's `lg` glyph, so the circle keeps the system's media controls' margin around the mark. On iOS the circle and its glyph keep one size at every text size, as the system's glass buttons do, and the Large Content Viewer shows its name and glyph (`spec:AST-127` FR9); on Android both grow with the text size. The ink keeps the variant's meaning: `primary` draws `color.onAccent` on glass tinted `color.accent`, `destructive` draws the error colour at text contrast, and the other variants draw `color.textPrimary`. Where the glass view paints, the glyph sits inside the glass, which is the press response (`spec:AST-123` FR3, DEC-1). Elsewhere the circle has a `color.neutral` fill (`primary`: `color.accent`) and a rim at the theme's border width, over the material or as the whole look, so it never disappears into a surface of its own colour. Under Reduce Transparency or Increase Contrast the circle is opaque: `color.backgroundSurface` under the `color.neutral` tint, with `spec:AST-123` FR7's outline for that setting. In a dark appearance with Reduce Bright Effects on, a press dims the circle instead of brightening it. Label, role, toggle, count, loading and disabled behave as FR5–FR7 in glass. | `spec:AST-123` FR3, FR7, FR10; `spec:AST-082` FR11; `spec:AST-093` FR3; DEC-4 | verify |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: "for xl, 48 pt or the xl square" gives no Android unit, where the same sentence gives sm to lg "44 pt on iOS and 48 dp on Android". Read with Android's pt (1/72 inch), 48 pt is about 107 dp. Suggest "48 pt on iOS and 48 dp on Android", or the intended value.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner deciding the draft direction in this record, and one record defect added at this head needs fixing whatever that decision is.

Blocking:

  • ORD4 ranks surface above the theme's material, while the sentence this head adds to FR8 says the theme's material decides how the chosen surface looks, so under material: 'opaque' a surface="glass" IconButton is glass by ORD4 and opaque by FR8; make the two state one order.

What an engineering owner has to settle (record it by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner):

  • IconButton takes ToggleButton's pressed state on React Native although family:buttons AV1 says IconButton does not retain pressed state, and its onClick cannot cancel the toggle the way ToggleButton's preventDefault() can.
  • The count beside the glyph, which no current record covers.
  • The xl size beyond the sm | md | lg axis that architecture:component-size-cascade INV1 fixes.
  • surface and the glass circle, including the per-call-site rule this head adds, which need spec:AST-082 DEC-2 and spec:AST-093 FR4 amended first (#12801).
  • Leaving clickAction out of the React Native contract, a reading of spec:AST-082 FR4 that no clause states.

An approval settles direction only: the family, size-cascade and native-surfaces records the record departs from still need amending, or the record narrowing, before this can be approved. Non-blocking: FR9 still gives glass xl "48 pt" with no Android unit.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the React Native platform-records pull request and merges after it: verified, the base is that pull request's branch.
  • Claim: the record also rests on the open native-surfaces amendment, the surfaces and glass, icons, and system-modules drafts, and the React Native Button record: verified, all are open drafts.
  • Claim: the glass circle, the toggle and the count are stated in the record itself: verified in FR6, FR7 and FR9.
  • Claim: the record states its departure from the button family's pressed-state rule: verified in its family relationships.
  • Claim: no other open pull request records IconButton on React Native: verified by a repository search.
  • Claim: the toggle uses ToggleButton's names and callback order, onClick then onPressedChange: verified in FR6 and ORD1.
  • Claim: no second input for a concept a core prop owns: verified in FR2, AR1, ORD2 and DEC-1.
  • Claim: surface takes plain or glass with no default, and unset follows the chrome paint in a bar, the tab accessory or the search field, else plain: verified in FR8.
  • Claim: the gap lines state where the package differs today: present for FR2, FR6 and FR8; the package itself is outside this repository.
  • Claim: no pull request references, rejected alternatives or open questions in the record: verified.
  • Claim: the knowledge check finds nothing in this record, Prettier is clean, and the diff has no whitespace errors: verified at this head.
  • Claim: FR8's per-call-site sentence moved here from the React Native foundation record as part of its slimming pull request: verified, that pull request deletes the sentence there and FR8 carries it.
  • File: docs/specs/components/IconButton/IconButton.react-native.spec.md: owner decisions above; one blocking defect (ORD4 against FR8) and one non-blocking note (FR9 unit).

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner deciding the draft direction in this record; the ORD4 and FR8 conflict raised on the previous head is fixed, and one record defect needs fixing whatever the owner decides.

Blocking:

  • Miss: AR1 says label is the only spoken name while FR7 and ORD2 put the count inside the name, so a counted IconButton gets two possible accessible names ("Like" with the count as its value, or "Like, 12" renamed with every count); state one in FR7, ORD2 and AR1, and say what an unpressed counted toggle reads on Android, where FR6 already puts "not selected" in the value.

What an engineering owner has to settle (record it by commenting /approve-spec <full head SHA>; the author may do so as an engineering owner):

  • IconButton takes ToggleButton's pressed state on React Native although family:buttons AV1 says IconButton does not retain pressed state, and its onClick cannot cancel the toggle the way ToggleButton's preventDefault() can.
  • The count beside the glyph, which turns the square into a pill against family:buttons FR7 and component:IconButton FR3, and joins what is spoken against component:IconButton AR1.
  • The xl size beyond the sm | md | lg axis that architecture:component-size-cascade INV1 fixes.
  • surface and the glass circle, which need spec:AST-082 DEC-2 and spec:AST-093 FR4 amended first (#12801), including the order this head settles on: an explicit glass outranks the theme's material, as #12801 says, while the surfaces-and-glass draft (#12557) and the React Native Button record (#12817) let the theme decide.
  • Leaving clickAction out of the React Native contract, a reading of spec:AST-082 FR4 that no clause states.

An approval settles direction only: the family, size-cascade and native-surfaces records the draft departs from still need amending, or the record narrowing. Non-blocking: FR9's glass xl "48 pt" still has no Android unit, FR5's "presses wait" reads as queued where ORD1 says the button does nothing, ORD4 cites the glass draft's FR7 for an order that FR7 reverses, and the review-checks row leaves out the placement as a source of the glass look.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: stacked on the React Native platform-records pull request and merges after it: verified, the base is that pull request's branch.
  • Claim: the record also rests on the open native-surfaces amendment, the surfaces-and-glass, icons and system-modules drafts, and the React Native Button record: verified, all are open drafts.
  • Claim: the glass circle, the toggle and the count are stated in the record itself: verified in FR6, FR7 and FR9.
  • Claim: the record states its departure from the button family's pressed-state rule as deliberate: verified in its family relationships.
  • Claim: no other open pull request records IconButton on React Native: verified by a repository search.
  • Claim: core's props under core's name, without the web contract's props, and width as content or fill: verified in FR1; the clickAction exclusion waits on the owner.
  • Claim: icon and pressedIcon take an icon name or a React element, and no concept a core prop owns gets a second input: verified in FR2.
  • Claim: the engagement row is a controlled toggle with ToggleButton's names and callback order, onClick then onPressedChange, and a count read as one element: verified in FR6, FR7 and ORD1; where the count sits in the name is the blocking finding.
  • Claim: xl is a square and glyph a third larger than lg, set only by an explicit size: verified in FR4 and ORD3.
  • Claim: surface takes plain or glass with no default, unset follows the chrome paint in a bar, the tab accessory or the search field, else plain, and the glass circle's size, ink and accessibility settings are as described: verified in FR8 and FR9.
  • Claim: press, link, loading, disabled, tooltip, touch target and theme overrides follow the React Native Button record: verified in FR5.
  • Claim: the gap lines state where the package differs today: present for FR2, FR6 and FR8; the package itself is outside this repository.
  • Claim: no rejected alternatives, no pull request references and no open questions in the record, and the writing-rubric results hold: verified.
  • Claim: the knowledge check finds nothing in this record, Prettier is clean, and the diff has no whitespace errors: verified at this head.
  • Claim: FR8's per-call-site sentence moved here from the React Native foundation record as part of its slimming pull request, and ORD4 keeps its order: verified, that pull request deletes the sentence there, FR8 carries it, and ORD4 is unchanged.
  • File: docs/specs/components/IconButton/IconButton.react-native.spec.md: owner decisions above; one blocking defect (the count's place in the name) and four non-blocking notes.

Automated review (maintainer link)


## Accessibility contract

- **AR1 — Name.** `label` is the only spoken name;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miss: this says label is the only spoken name, but FR7 (line 122) says isCountVisible={false} "keeps the count in the spoken name" and ORD2 (line 156) gives the name as "label, with the count after it". As the element's value, the count leaves label the only name, as component:IconButton AR1 requires; in the name, "Like, 12" becomes "Like, 13" after a like, and VoiceOver reads both the same. Suggest stating one in FR7, ORD2 and here, and saying what an unpressed counted toggle reads on Android, where FR6 already puts "not selected" in the value.

only from an explicit `size`.
- **ORD4 — Surface paint.** Reduce Transparency or Increase Contrast (opaque),
then `surface`, then the placement of an unset `surface`, then the theme's
`material` (`spec:AST-123` FR7).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the surfaces-and-glass draft's FR7 (#12557) says the theme's resolved material "comes first" and lists glass buttons in its chrome row, the reverse of this order, and FR8 tells a glass IconButton to follow that row. The clause that states this order is #12801's amended DEC-2 ("plain or glass overrides them"); suggest citing it here, and settling the two drafts in the owner's surface decision.

| FR2 | IconButton's React Native contract MUST add, on iOS and Android alike, the toggle (FR6), the count (FR7), the size `xl` (FR4) and `surface` (FR8), and no second input for a concept a core prop owns: `label` owns the spoken name, `onClick` the press, and `tooltip` the description (`spec:AST-082` FR7). `icon` and `pressedIcon` take a shared icon name, which resolves through `Icon` (`spec:AST-082` FR17, `spec:AST-127` FR4), or a React element, which draws as given inside the icon slot's size and the button's ink. | `spec:AST-082` FR3, FR5, FR7, DEC-6; DEC-1, DEC-2 | verify |
| FR3 | IconButton MUST render one press target in icon-only mode with the caller's icon and no visible text, named by `label` (`component:IconButton` FR1, FR2). Without `width` or a drawn count it is a fixed square whose side is the theme's element size for its size (`size.elementSm`, `size.elementMd`, `size.elementLg`), grown with the system text size, with no padding; no row (a wrapping stack, a Toolbar) shrinks it. An icon name draws at `sm` in `sm` and `md` buttons and at `md` in `lg` ones (`component:IconButton` FR3). Without `size` it takes its slot's size, else `md` (`architecture:component-size-cascade`). `width="fill"` takes the row's width. | `component:IconButton` FR1–FR3; `family:buttons` FR7; `architecture:component-size-cascade` | verify |
| FR4 | `size="xl"` MUST draw a square a third larger than `lg` (`size.elementLg` × 4/3) holding a glyph a third larger than core Icon's `lg`, both grown with the text size, with `lg`'s ink, spinner and theme overrides. A slot's size never resolves to `xl`: a caller sets it. | DEC-3 | verify |
| FR5 | Press, link, loading, disabled, tooltip, focus, width, elevation, press feedback, touch target and theme overrides MUST follow `component:react-native/Button`, with the square in place of a label. A press runs `onClick`, then opens an accepted `href` through the app's opener (`spec:AST-130`); an enabled IconButton with an accepted `href` has the link role, and a script `href` is inert and leaves a button (`family:navigation-destinations`). While loading, the spinner takes the icon's place, the size holds, the button is busy, presses wait unless it is interruptible, and the loading message is announced once. A disabled IconButton never runs `onClick`. The press target reaches the platform's touch target (44 pt on iOS, 48 dp on Android) by hit slop around the visible square. The tooltip is the accessibility hint unless it repeats the name, and a long press shows it while the button cannot act. The theme's Button overrides apply without their padding, so the glyph keeps its square. | `component:IconButton` FR4; `component:Button` FR7–FR13, FR15; `family:buttons` FR3, FR4; `spec:AST-082` FR3, FR11 | verify |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: "presses wait unless it is interruptible" reads as presses queued until loading ends, while ORD1 says a loading, non-interruptible button "does nothing". Suggest "presses do nothing unless it is interruptible".

| End-user impact | A person gets a compact action with the platform's touch target and press feedback. VoiceOver and TalkBack read its name, its pressed state and its count as one element. A glass control over a photo or a video stays readable, and turns solid under Reduce Transparency or Increase Contrast. |
| Builder impact | An app writes core's IconButton props. An engagement row (Like, Save) uses `isPressed`, `pressedIcon` and `count`; a media transport row uses `xl`; a control floating over content or media sets `surface="glass"`. |
| Compatibility/readiness | Not yet released; additive. Draft. Gaps are listed under Current-state impact. |
| Review checks | Reject a web contract prop offered on React Native, visible label text, a square that a row can shrink, a slot size that resolves to `xl`, a toggle that opens a link, a count read apart from the name, a glass circle smaller than the touch target, glass drawn under Reduce Transparency or Increase Contrast, a glass look taken from anywhere but `surface`, the theme and the accessibility settings, or a visual prop other than `surface`. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: "a glass look taken from anywhere but surface, the theme and the accessibility settings" leaves out the placement, while FR8 paints an unset IconButton in a bar, the tab accessory or the search field from the chrome row, and the FR8 verification row lists the placement. Suggest adding "the placement".

This branch was successfully deployed

1 active deployment
Preview — 943fa3d3 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant