Repository navigation
1.13.0
Where the bytes went
| What you import | 1.12.0 | 1.13.0 |
|---|---|---|
Button |
5.1 kB | 5.2 kB |
Chip |
3.3 kB | 3.4 kB |
LineChart |
11.6 kB | 11.8 kB |
CodeBlock |
5.0 kB | 5.1 kB |
Image |
6.5 kB | 7.1 kB |
Gallery |
10.2 kB | 10.4 kB |
| a whole page shell | 29.0 kB | 29.2 kB |
| 12 components — a typical app | 70.5 kB | 71.0 kB |
| 12 components, with Korean | 72.9 kB | 73.8 kB |
| 25 components — a large one | 115.7 kB | 116.9 kB |
| all exports | 263.9 kB | 265.8 kB |
Image is the row that moved. A picture that failed with an empty alt printed a hardcoded English sentence, so Image now reaches internal/i18n.ts and internal/defaults.ts, which costs it 0.5 kB. The last 0.1 kB is width and height, which Gallery also carries because it draws an Image.
The 0.1 kB on Chip, CodeBlock, LineChart and the page shell is the same machinery gaining an Object.hasOwn on each of its two lookups, and a shared bound under the memos in internal/.
The twelve- and twenty-five-component rows carry internal/wheel.ts on top of that, which is what a Tabs bar now takes the wheel with.
The last 0.1 kB on nearly every row is the focus ring: the resting declaration and the transition it travels on are two more entries in the class string every control carries. neba/styles.css moved 22.4 kB → 22.5 kB for the same reason, plus the breakpoint slots each responsive element now clears — which is the cost of a fix that could not be made anywhere else, since only the element that reads a slot can say it does not inherit one.
Registering a language ships that language's whole module, so the twenty picker strings and the two a Carousel's stop button needs land in it whether or not the page draws either: 2.8 kB now against 2.4 kB before. Those twenty used to be hardcoded English, which a Korean product could not reach at all.
Added
-
Every portalled surface reads one z-index,
--neba-z-portal. Fourteen of them carried a hardcodedz-50, which is a guess about a page the library cannot see — a site whose own fixed header sits above that had its menus and dialogs opening underneath its chrome, and the way out was a selector per surface. The token defaults to 50, and a host that needs another number sets it once on:root. -
A
BottomNavigationItemdeclares thetargetandrelits link already rendered. The props were typed against a<button>and cast to an<a>, so a destination that opened in a new tab could only be written by handing the component something TypeScript said was impossible. -
A
ProgressLinear, aProgressCircularand aMetertake athickness. The ladder decides the bar's height and the ring's stroke, and the ladder is five steps — so a speed-test dial or a page that is about one number had no way to draw a heavier line without moving the diameter with it. It is a number of pixels on all three, because that is what the ring's arithmetic already works in. A ring's stroke is held inside the ring it describes: past half the radius there is no hole left in the middle of it. -
A
Comboboxtakes afilter, andfalseturns it off. The list was always narrowed here, against each option's visible label — so a search answered by a server, which is the case a combobox with hundreds of options exists for, had its results filtered a second time and lost every row that had matched on a keyword, a description or a synonym rather than on the label.filter={false}lets a narrowed list through; a function decides per option. The row that offers to add what was typed is exempt from both, since it is the query written out. -
A
Sliderdrawsmarks, and takesclassNamesfor the parts behind its root. Labelling points on a track —1 / 100 / 250 / 500under a count, "realistic" and "abstract" at the ends of a style axis — was a row a caller had to lay out themselves, absolutely positioned at(value − min) / (max − min)of a width they had to know. An array of{ value, label? }does it, and a baremarksis a tick at everystep. The row sits beside the control rather than on the rail, because a tick on the rail has to stay legible over both the fill and the groove, and it isaria-hidden: the thumb already announces the value and the range.The slots are the other half of the same complaint. A Slider draws seven parts and offered a class name for exactly one of them, so a one-off recolour had to reach for
[role="slider"].label,control,track,indicator,thumb,descriptionandmarkare named now, like every other multi-part component in the library. -
A
SelectOptioncan name agroup, and a run of them gets a heading. A list of time zones by region or fonts by family had nowhere to put the heading, and the stand-in was a disabled option holding a<strong>— which the keyboard and the pointer skip correctly and a screen reader still reads as an option that cannot be chosen. A group is a run of adjacent options naming it, so the array's order stays the list's order and nothing is moved out from under a caller; two runs of one name draw two headings, which is the array saying they are not together. -
A
Tabsbar takes the wheel. A bar with more tabs than room scrolls, but a mouse has one wheel and it points down the page — and the bar draws no scroll buttons and hides its scrollbar, so the tabs past the edge were reachable only by keyboard. A wheel rolled over the bar now travels along it. It is on by default, which is what separates the prop fromScrollZone'swheel: that strip has a pair of buttons and this one has nothing. A bar that fits takes nothing at all, so a page with three tabs on it is unaffected, andwheel={false}turns it off. -
A
CarouselwithautoPlaydraws the button that stops it. It paused on hover, on focus and in a background tab, and it never started for a reader who had asked for less motion — but a reader holding a phone hovers nothing, and one running a magnifier may never put a pointer over the strip at all. WCAG 2.2.2 asks for a mechanism, and those were not one. The control sits in the row under the frame, beside the dots and never over a slide;pauseLabelandplayLabelname it, and it is translated in all nineteen languages. There is no prop to take it away — a caller who wants a control of their own can drivevalueand leaveautoPlayoff. -
The four date and time pickers say their twenty non-date strings in the reader's language. "Previous month", "Choose a year", "Today", "Now", "Hour", "AM/PM" and fourteen more were hardcoded English, over dates
Intlhad already translated — so a Korean product's only way out was to write out all twenty throughlabels. There is apickermessage namespace now, in all nineteen languages.labelsstill wins where it is given, which is what it is for:localeanswers the language andlabelsanswers the wording. -
An
Imagetakeswidthandheight, and reserves the box they describe. They were omitted from the props, so the one component in the library whose reason to exist is holding a picture's space could only be told what that space was as aratioworked out by hand — and a defaultImagereserved nothing at all, which is the largest source of layout shift on most sites. They reach the<img>as the attributes they are, and giving both turns an'auto'ratio into their proportion. An explicitratiostill outranks them: that one is the layout's shape and these two are the picture's.
Changed
-
A focus ring arrives rather than appears, and on a field it is flush with the edge. Two things about the same object. The ring is declared at rest with no width instead of not being declared at all, so the focus has a width to travel rather than a style to switch — it grows in beside the hairline it belongs to, at the house duration, and instantly for a reader who has asked for less motion. And a field's shell takes it flush: the hairline turns the ring's own colour the moment the focus lands, so a ring held two pixels off drew a second line with a stripe of page between the two, which is a control wearing a halo rather than an edge that has thickened. Everywhere else the ring keeps its offset, and that is contrast rather than taste — flush against a filled control it would sit on a fill of its own family.
A pointer resting on a focused field used to take the hairline a shade under the ring it is now flush against, because
hover:andfocus-within:are one class each and the winner was whichever Tailwind generated last. The pair is spelled out, so the edge is one colour.The six field shells also stop holding every duration at 0ms while the focus is inside. That was the rule about a press applied one step too far: clicking into a field is a press, but the ring is the answer to the caret being somewhere, and it arrives from a Tab as often as from a click.
-
An
AccordionItem's title wraps, and the header is a heading at a level the caller chooses. Two things about the same element. The title was wrapped intruncate, which is right for a label and wrong for the thing an accordion is most often a list of: an FAQ's title is a sentence, and an ellipsis in the middle of it loses the question. It wraps now, andlinesclamps it where a caller wants one — the same word, and now the same table,Typographyuses. And the header renders an<h3>whatever sits above it, so the natural way to ask for a different one was to pass a styled heading as thetitle, which nests a heading inside a heading; the documentation said to do exactly that.headingLevelon theAccordionsets it for the whole stack, which is where it belongs — the sections are siblings, and a run of headings at different levels is an outline that lies. -
A field's height is a floor rather than a fixed row. A TextField, a Select, a Combobox, a NumberField and the four date and time pickers all took the size ladder as an exact height, and a field holds a caller's own text — so text set larger than the step, which is the whole point of the tool that does it, had its glyphs cut off by the row around it.
classNames.shellcould repair it only with anh-auto!, and needing!importantto beat your own class is the signal that the height was the wrong shape rather than the wrong number. Nothing moves at the library's own sizes. It stays an exact height on a Button, a Chip and everything else the library draws the contents of: those are flex children of a row a caller arranges, and a minimum height there is a control that stretches to whatever is beside it. -
A
Typographylevel's leading is a ratio rather than a length, and the root carriesneba-typography. The two halves of one problem: the scale paired each size with the line height it worked out to, and the component emitted nothing but utilities. So a caller who set a size of their own — which is what a figure, a display number or a hero line is — got a line box built for a size nobody asked for, with no selector to repair it from a stylesheet either, since a utility string is not a contract. Every level keeps exactly the ratio it was drawn at, so nothing moves at the scale's own sizes and an overridden one gets a line box in proportion. The class is a hook and carries no styling of its own, the wayneba-linkandneba-portaldo. -
A
ScrollZoneand aTabsbar hold the wheel at their ends rather than handing it back. Taking the wheel and then giving it up the moment the strip runs out is what makes the page lurch mid-flick: the reader is still pushing the strip and what answers is the article behind it. Both hold it now, and the pointer leaving the strip is what gives the page its wheel back.overscroll-behavior: containdoes the same for the gestures the browser scrolls itself — a finger, a sideways trackpad swipe, and the wheel over a vertical zone — which used to carry on into the page at either end.This changes what
ScrollZone'swheelpromises. The old wording said a strip with nothing left ahead of it was something to scroll past rather than something to be caught in; a caller who wanted that behaviour wantswheeloff. -
An
Anchorfinds its headings once instead of on every frame of a scroll. It ran adocument.getElementByIdfor each row of the trail on every scroll frame, for an answer that changes only when the document does. The elements are kept and checked againstisConnected, so a heading that arrives after the trail is still found. -
An
AnimateMarqueemeasures itself when its size changes, not on every render above it. The measurement listedchildrenas a dependency, so every render of whatever held the strip tore both resize observers down, put them back, and ran agetComputedStyleand anoffsetWidth— a forced layout — for a strip that had not moved. The track is observed, so a change in what is on it is already reported. -
The last two
Intlobjects a render was rebuilding are memoised.localeWeekStartbuilt anIntl.DateTimeFormatand anIntl.Localeon every render of aCalendar, aDatePicker, aDateRangePickerand aDateTimePicker— every keystroke and every hover anywhere inside one — andgraphemesOf/wordsOfbuilt anIntl.Segmenteron every call, for three text effects that ask on every frame they animate. Both go through a cache now, as the number and date formatters already did. -
A
Transferand aTreeSelectfold their labels once instead of once per keystroke. Both folded every row inside the filter, which put aString.prototype.normalizeon every item for every character typed — aTransferdid it on every render, search or no search. The haystacks are built once peritemsnow, which is the arrangement aDataTableand aCommandPalettealready used. Nothing about what matches has changed. -
A chart's data table is memoised, and reads the chart's own formatter. The visually hidden table is built in the same render the crosshair's state lives in, so every cell of it was reconciled again for each pixel the pointer travelled across the picture — a row per point on a
ScatterChart. It isReact.memonow, and the frame'sformatis keyed on what the options say rather than on the identity of the object they arrived in, so aformatwritten inline in the JSX no longer defeats it.One number moves with it: a
ScatterChartwith noformatwrites its table values the way its axis and its tooltip already write them, so24000reads as24Krather than24,000. It was the only chart whose table disagreed with its own picture.
Fixed
-
A responsive slot no longer inherits into a nested component. Every value that changes at a breakpoint resolves through a custom property, one per breakpoint, and only the breakpoints a caller names are written — so a slot an element did not write was whatever the nearest ancestor had written. A
GridContainerinside aGridread the item's--n-span-mdand came out a fraction of the width it had asked for, and the same shape covered every gutter, column count, flex direction and content measure in the library. The element that reads a slot now clears it, which an inline style still outranks. -
A
NavigationMenu's panel keeps its surface. The colour slots were declared on the Root, and the panel is portalled to the end of the document — so it was not a descendant of the element carrying them,bg-(--n-panel-press)painted nothing, and the panel opened as clear glass with the page readable straight through the links. Both ends of the component take the slots now, which is what every other portalling component in the library already did. -
Dragging a run of rows in a
DataTableno longer selects the text it crosses. It was the last drag in the library written by hand, and it had the hole the column resize used to have: no text-selection suppression, over every cell the pointer passed rather than the two beside a boundary. It goes throughbeginPointerDragnow — captured to the table rather than to the row that was pressed, since a virtual body unmounts a row the moment it scrolls away. The auto-scroll at the edge stays where it is. -
A
TreeSelect's clear button says "Clear" in every language no longer. It was named out of the pickers' English defaults — a set it has nothing else to do with — rather than out of the sameactionmessages the identical × on aComboboxreads. It takes aclearLabellikeComboboxdoes, too. -
A pointer drag starts even when the pointer cannot be captured.
setPointerCapturethrows for a pointer that is no longer active — one lifted between thepointerdownand the handler — and the exception escaped into React's event handler, which takes the page down. Capture is an optimisation and the three listeners work without it, so it is taken where it can be and skipped where it cannot. -
An
AnimateScrambleredraws on its own tick and not on every render above it. The noise glyphs were picked withMath.random()during the render, so any re-render from anywhere in the tree reshuffled every unsettled letter at whatever moment it happened to land — an effect meant to be a clock, answering to the whole page. They are picked from the tick counter and the position now, which also settles the hydration mismatch the random source caused on a server-rendered page. -
A
CodeBlock's copy button keeps the focus when the clipboard falls back. On a page without a secure context the copy goes throughexecCommandagainst an off-screen textarea, and selecting that textarea took the focus — so a reader who pressed the button with a keyboard was left on<body>, having lost their place in the page as the reward for copying. -
An
Anchor, anImageand aPaneswrite their refs in an effect rather than during a render. A ref written while rendering is a ref that lies when React throws that render away, which is a live hazard under concurrent rendering and is the ruleuseShortcuthad already written down. None of the three reads the value during a render, so nothing about their behaviour changes. -
An
Imagesays its own absence in the reader's language. A picture that failed with an emptyaltprinted a hardcodedImage unavailable, which was the one string the library invented and could not translate. There is animagemessage namespace now, in all eighteen languages, andImagetakes alocaleand anunavailableLabellike every other component that has to invent a word. -
A message lookup reads a table's own keys and not its prototype's. A
localea caller took from a URL, or a{placeholder}a translation happened to name after a member ofObject, resolved up the prototype chain — solocale="constructor"was spread over English as though it were a table of messages, and{constructor}in a translation wrotefunction Object() { [native code] }into the middle of a sentence. -
An
AppLogoand aBottomNavigationItemmergenoopener noreferrerinto a link that leaves this tab.safeRelreached four of the six components that let atargetthrough to an<a>; these two handed the page they opened awindow.openerpointing back at the one that opened it, and aRefererheader naming it. Arelwritten by hand —nofollow,sponsored— is merged rather than replaced, as everywhere else. -
colorSchemeScriptescapes<in the values it writes. The string is inlined inside a<script>element, and a browser stops parsing that element at the first</scriptin it however the JavaScript around it is quoted — so astorageKeyholding one would have ended the tag and handed the rest to the HTML parser as markup.Breadcrumbalready wrote its structured data out this way. -
The five memos in
internal/cannot grow without bound. TheIntlformatters and segmenters, theMediaQueryLists, the week-start table and the resolved message tables are keyed on alocale, on the options behind aformatprop, or on a query string handed to the publicuseMediaQuery— a caller's to choose in every case, and two of them carried a comment claiming otherwise. They share one ceiling now, well above anything the library itself reaches; a page that never approaches it is unchanged, and one that passes it rebuilds what it would have built anyway. -
A shared
IntersectionObserveris let go once nothing is watching through it. One is kept perthreshold, andthresholdis a public prop on all seventeenAnimate*components — so a caller computing one left a live observer behind for every value it had ever held, each of them a registration the browser still walks on every scroll. A group now lives exactly as long as its last watcher. -
An
AnimateMarqueestops for the focus as well as for the pointer.pauseOnHoverwas:hoveralone, so a link on a moving strip could be aimed at with a mouse and not reached with a keyboard — tabbing to it left it travelling off the screen while it was being read.
Every release is in the changelog on the docs site and in CHANGELOG.md at this tag.