Skip to content

docs: correct web API descriptions and examples - #342

Open
dajiaohuang wants to merge 1 commit into
danilowoz:masterfrom
dajiaohuang:repostew-docs-web-api-20261016
Open

dajiaohuang wants to merge 1 commit into
danilowoz:masterfrom
dajiaohuang:repostew-docs-web-api-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

Correct existing web API documentation and copyable examples to match the current implementation:

  • gradientRatio defaults to 2, and SVG ids now come from React.useId (since fix(hydration): use useId for dom variant #325); explain when uniqueKey is useful without requiring it for ordinary SSR.
  • Correct the Storybook title type/default/removal instructions and numeric opacity example.
  • Remove the obsolete gradientDirection story: the current public type and SVG implementation do not support this prop, so both advertised directions render the same horizontal animation.
  • Fix the README Safari example's invalid JSX and use the actual HTML <base href> attribute.
  • Make the responsive story apply the same width style it displays.

No animation design, component behavior or public API changes.

Related Issue

No companion issue. The generated-id explanation follows the already merged #325.

Any Breaking Changes

None; documentation/examples only.

Checklist

  • TypeScript and all unit tests pass: 52 web + 35 native (mocked), 22 snapshots.
  • Production Rollup build passes (existing circular-dependency/native-external warnings).
  • Eight local documentation checks fail on the base and pass with these corrections, including parsing the Safari JSX example.
  • Owned minimal React SSR/hydration fixture passes in Chromium: all five presets and custom shapes, id references, title/RTL, animated versus static SVG pixel changes, no hydration or console errors.
  • Storybook production build passes with its Vite peer supplied locally (vite@4); the initial legacy-peer install omitted Vite. No dependency/lockfile changes included.

Not a Safari/Firefox, React Native device, or assistive-technology validation. Existing package-manager and ReactDOM.render deprecation warnings are unchanged.

@codesandbox

codesandbox Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web Editor • VS Code • Insiders

Open Preview

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant