feat!: rework typography around a polymorphic Text component - #1152
Draft
pawelgrimm wants to merge 12 commits into
Draft
feat!: rework typography around a polymorphic Text component#1152pawelgrimm wants to merge 12 commits into
pawelgrimm wants to merge 12 commits into
Conversation
pawelgrimm
force-pushed
the
pawel/feat/typography-updates
branch
from
August 12, 2026 21:10
438db49 to
957f289
Compare
pawelgrimm
force-pushed
the
pawel/feat/typography-updates
branch
2 times, most recently
from
August 12, 2026 21:34
5997e45 to
fe534c0
Compare
Text now covers the full typography scale with a single variant prop: display-*, heading-*, subheader, body, callout, caption, and footnote styles from the Figma reference. Heading variants render the matching heading element and all other variants render a div; use render to override the element. BREAKING CHANGE: Text no longer accepts size, weight, or as props. Pick a variant instead, and use render for custom elements.
BREAKING CHANGE: Heading is removed. Use Text with a heading variant,
e.g. <Heading level={2}> becomes <Text variant="heading-2">, which
renders an h2. Use render to decouple semantics from the visual style.
pawelgrimm
force-pushed
the
pawel/feat/typography-updates
branch
from
August 12, 2026 21:36
fe534c0 to
4c4e703
Compare
Move the SF web font stack to design-tokens.css and use literal font weights in the variant classes, matching their literal px sizes. Removes the module-local :root tokens whose 'medium' (500) collided with the canonical --reactist-font-weight-medium (600).
Inline getTextClassName into Text — its options-object API was a fossil of the deleted typography layer with a single caller. Replace heading element string-building with a plain lookup map.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
Textinto a single polymorphic typography component: onevariantprop covering the full Figma scale (display-*,heading-*,subheader,body,callout,caption,footnote).heading-1→h1, …); all other variants renderdiv.renderoverrides the element in every case.Heading; heading typography now comes fromTextheading variants.PR Checklist