Skip to content

feat: add docs for ory elements v1.2#2361

Merged
jonas-jonas merged 9 commits into
masterfrom
jonas-jonas/oryElementsV1.2
Jun 8, 2026
Merged

feat: add docs for ory elements v1.2#2361
jonas-jonas merged 9 commits into
masterfrom
jonas-jonas/oryElementsV1.2

Conversation

@jonas-jonas

@jonas-jonas jonas-jonas commented Nov 24, 2025

Copy link
Copy Markdown
Member

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

Summary by CodeRabbit

  • Documentation
    • Added comprehensive API reference documentation for @ory/elements-react, including type aliases, helper functions, and component signatures.
    • Updated component prop types for improved type safety and clarity.
    • Added documentation for new helper functions for UI node type checking and placeholder resolution.
    • Added documentation for the useResendCode hook.
    • Reorganized reference documentation structure for improved navigation.

@vinckr vinckr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice!
2 small style things

Comment thread docs/elements/guides/05_upgrading.mdx Outdated
Comment thread docs/elements/guides/05_upgrading.mdx Outdated
Comment thread docs/elements/guides/05_upgrading.mdx Outdated
Co-authored-by: Vincent <vincent@ory.sh>

@vinckr vinckr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@vinckr vinckr added the upstream Issue is caused by an upstream dependency. label Dec 15, 2025
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jonas-jonas, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 2 minutes and 38 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d644e2b4-61bb-4ccb-9654-0b5d35b6fdbc

📥 Commits

Reviewing files that changed from the base of the PR and between 64c1ab7 and 4c8f373.

⛔ Files ignored due to path filters (2)
  • docs/elements/guides/04_configuration.mdx is excluded by !**/*.mdx
  • docs/elements/guides/05_upgrading.mdx is excluded by !**/*.mdx
📒 Files selected for processing (44)
  • docs/elements/reference/@ory/elements-react/functions/OryConfigurationProvider.md
  • docs/elements/reference/@ory/elements-react/index.md
  • docs/elements/reference/@ory/elements-react/interfaces/OryClientConfiguration.md
  • docs/elements/reference/@ory/elements-react/interfaces/OryElementsConfiguration.md
  • docs/elements/reference/@ory/elements-react/interfaces/ProjectConfiguration.md
  • docs/elements/reference/@ory/elements-react/theme/functions/Consent.md
  • docs/elements/reference/@ory/elements-react/theme/functions/Error.md
  • docs/elements/reference/@ory/elements-react/theme/functions/Login.md
  • docs/elements/reference/@ory/elements-react/theme/functions/Recovery.md
  • docs/elements/reference/@ory/elements-react/theme/functions/Registration.md
  • docs/elements/reference/@ory/elements-react/theme/functions/Settings.md
  • docs/elements/reference/@ory/elements-react/theme/functions/Verification.md
  • docs/elements/reference/@ory/elements-react/type-aliases/FlowContextValue.md
  • docs/elements/reference/@ory/elements-react/type-aliases/FormState.md
  • docs/elements/reference/@ory/elements-react/type-aliases/FormStateAction.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OnSubmitHandlerProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryCardAuthMethodListItemProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryConsentSuccessEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryErrorEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryErrorHandler.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryFlowComponents.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryLoginSuccessEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeInputInputProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeSelectInputProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeSelectProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryProviderProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryRecoverySuccessEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryRegistrationSuccessEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OrySettingsSuccessEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OrySuccessEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OrySuccessHandler.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryTransientPayload.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryValidationErrorEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryValidationErrorHandler.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryVerificationSuccessEvent.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeInput.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeInputAttributesOption.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeInputAttributesWithOptions.md
  • docs/elements/reference/@ory/elements-react/variables/Node.md
  • docs/elements/reference/@ory/nextjs/app/functions/getError.md
  • docs/elements/reference/@ory/nextjs/app/index.md
  • docs/elements/reference/@ory/nextjs/pages/functions/useError.md
  • docs/elements/reference/@ory/nextjs/pages/index.md
  • docs/elements/reference/typedoc-sidebar.ts
📝 Walkthrough

Walkthrough

This PR expands the Ory Elements React reference documentation by adding type aliases for discriminated UI node variants, component prop types with input element attributes, type-guard helper functions, a code-resend hook, and updated component implementations with deprecation guidance. The sidebar configuration is updated to expose the expanded API surface.

Changes

Type and Function Reference Documentation

Layer / File(s) Summary
UiNode Discriminated Union Types
docs/elements/reference/@ory/elements-react/type-aliases/UiNode*.md, docs/elements/reference/@ory/elements-react/type-aliases/UiNodeFixed.md
Added reference documentation for UiNodeAnchor, UiNodeDiv, UiNodeImage, UiNodeInput, UiNodeScript, UiNodeText, and the UiNodeFixed union type, forming the foundational type hierarchy for UI element identification.
Input Element Prop Types
docs/elements/reference/@ory/elements-react/type-aliases/OryNodeButton*.md, docs/elements/reference/@ory/elements-react/type-aliases/OryNodeInput*.md, docs/elements/reference/@ory/elements-react/type-aliases/OryNodeCheckbox*.md
Documented low-level prop types including OryNodeButtonButtonProps (button element attributes and callbacks), OryNodeInputInputProps (input element attributes), and OryNodeCheckboxInputProps (checkbox element attributes).
Component-Level Props Types
docs/elements/reference/@ory/elements-react/type-aliases/NodeProps.md, docs/elements/reference/@ory/elements-react/type-aliases/OryNode*.md
Documented NodeProps and component-level OryNode* prop types (Button, Checkbox, Image, Input, Label, SSO, Text) that combine UiNode types with input element props, including deprecation guidance to use node.attributes instead of attributes.
Settings Component Props Types
docs/elements/reference/@ory/elements-react/type-aliases/OrySettings*.md, docs/elements/reference/@ory/elements-react/type-aliases/OryCard*.md
Updated OrySettings* prop types (Passkey, Recovery Codes, SSO, TOTP, Webauthn) to use specific UiNode variants, added isSubmitting flags, and refactored button types to use OryNodeSettingsButton. Added disabled prop to OryCardAuthMethodListItemProps.
Type Guard and Utility Functions
docs/elements/reference/@ory/elements-react/functions/isUiNode*.md, docs/elements/reference/@ory/elements-react/functions/resolvePlaceholder.md
Documented isUiNode* type-guard helpers (Anchor, Div, Image, Input, Script, Text) for narrowing UiNode unions, and resolvePlaceholder() utility for i18n placeholder resolution.
Hook and Component Integration
docs/elements/reference/@ory/elements-react/functions/useResendCode.md, docs/elements/reference/@ory/elements-react/variables/Node.md, docs/elements/reference/@ory/elements-react/theme/functions/*.md
Documented useResendCode() hook with conditional resend support. Updated Node component documentation with sub-renderer properties (Button, Checkbox, Image, Input, etc.). Updated DefaultButtonSocial, DefaultCard, and Settings component signatures to include new prop types, expanded HTML attributes, and deprecation notices.
Reference Index and Navigation
docs/elements/reference/index.md, docs/elements/reference/typedoc-sidebar.ts, docs/elements/reference/@ory/elements-react/*.md, src/sidebar-old.ts
Created reference landing page and expanded sidebar configuration to expose new type aliases, functions, hooks, and the Node component. Removed Docusaurus frontmatter from theme and nextjs module index pages. Updated Elements reference sidebar link to direct doc link instead of generated-index.
Documentation Domain Update
docs/elements/reference/@ory/elements-react/functions/OryCardValidationMessages.md
Updated OryCardValidationMessages reference link from ory.com/docs/... to ory.sh/docs/....

🎯 3 (Moderate) | ⏱️ ~20 minutes

🐰 A rabbit's ode to docs divine,
Type guards and props now clearly shine,
From UiNode roots to Settings' way,
The reference grows brighter every day!
✨📚

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is entirely a template with no substantive content filled in—all guidance sections remain as comments with no actual description of changes, related issues, or implementation rationale provided. Fill in the PR description with a summary of the documentation changes, clarify whether this improves existing docs or is entirely new, and confirm if any issues are being addressed per the template guidance.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add docs for ory elements v1.2' directly aligns with the main change: comprehensive documentation additions for Ory Elements v1.2 across 50+ files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonas-jonas/oryElementsV1.2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@docs/elements/reference/`@ory/elements-react/theme/functions/DefaultButtonSocial.md:
- Line 14: The documentation for DefaultButtonSocial incorrectly mentions an
optional label via a now-removed prop; update the text in DefaultButtonSocial
(the component docs) to remove any reference to a `showLabel` prop and instead
describe the current behavior (renders a button with a logo and optional label
only if the current props support it, or simply "renders a button with a logo")
so the intro matches the actual prop contract of DefaultButtonSocial.

In `@docs/elements/reference/`@ory/elements-react/variables/Node.md:
- Around line 4-12: The Node declaration's parentheses are misplaced so the type
is parsed as a function returning "ReactNode & { ... }" instead of a callable
component intersected with static renderer properties; update the type of the
Node constant to be an intersection between the function signature and the
renderer-object type by wrapping the function type in parentheses, i.e. change
the shape from "const Node: (__namedParameters: NodeProps) => ReactNode & {
Button: ..., Checkbox: ..., ConsentCheckbox: ..., Image: ..., Input: ...,
SsoButton: ..., Text: ... }" to "const Node: (({...}: NodeProps) => ReactNode) &
{ Button: ..., Checkbox: ..., ConsentCheckbox: ..., Image: ..., Input: ...,
SsoButton: ..., Text: ... }" so Button, Checkbox, ConsentCheckbox, Image, Input,
SsoButton and Text are static properties on the callable Node.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 40dd2a85-c760-4ead-ad93-56a1593106a3

📥 Commits

Reviewing files that changed from the base of the PR and between 20cda8f and 64c1ab7.

⛔ Files ignored due to path filters (1)
  • docs/elements/guides/05_upgrading.mdx is excluded by !**/*.mdx
📒 Files selected for processing (49)
  • docs/elements/reference/@ory/elements-react/functions/OryCardValidationMessages.md
  • docs/elements/reference/@ory/elements-react/functions/OrySettingsFormSection.md
  • docs/elements/reference/@ory/elements-react/functions/isUiNodeAnchor.md
  • docs/elements/reference/@ory/elements-react/functions/isUiNodeDiv.md
  • docs/elements/reference/@ory/elements-react/functions/isUiNodeImage.md
  • docs/elements/reference/@ory/elements-react/functions/isUiNodeInput.md
  • docs/elements/reference/@ory/elements-react/functions/isUiNodeScript.md
  • docs/elements/reference/@ory/elements-react/functions/isUiNodeText.md
  • docs/elements/reference/@ory/elements-react/functions/resolvePlaceholder.md
  • docs/elements/reference/@ory/elements-react/functions/useResendCode.md
  • docs/elements/reference/@ory/elements-react/index.md
  • docs/elements/reference/@ory/elements-react/theme/functions/DefaultButtonSocial.md
  • docs/elements/reference/@ory/elements-react/theme/functions/DefaultCard.md
  • docs/elements/reference/@ory/elements-react/theme/functions/Settings.md
  • docs/elements/reference/@ory/elements-react/theme/index.md
  • docs/elements/reference/@ory/elements-react/type-aliases/NodeProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryCardAuthMethodListItemProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryFlowComponents.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeButtonButtonProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeButtonProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeCheckboxInputProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeCheckboxProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeConsentScopeCheckboxProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeImageProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeInputInputProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeInputProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeLabelProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeSettingsButton.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeSsoButtonProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OryNodeTextProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OrySettingsPasskeyProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OrySettingsRecoveryCodesProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OrySettingsSsoProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OrySettingsTotpProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/OrySettingsWebauthnProps.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeAnchor.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeDiv.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeFixed.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeImage.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeInput.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeScript.md
  • docs/elements/reference/@ory/elements-react/type-aliases/UiNodeText.md
  • docs/elements/reference/@ory/elements-react/variables/Node.md
  • docs/elements/reference/@ory/nextjs/app/index.md
  • docs/elements/reference/@ory/nextjs/middleware/index.md
  • docs/elements/reference/@ory/nextjs/pages/index.md
  • docs/elements/reference/index.md
  • docs/elements/reference/typedoc-sidebar.ts
  • src/sidebar-old.ts
💤 Files with no reviewable changes (4)
  • docs/elements/reference/@ory/nextjs/middleware/index.md
  • docs/elements/reference/@ory/nextjs/app/index.md
  • docs/elements/reference/@ory/elements-react/theme/index.md
  • docs/elements/reference/@ory/nextjs/pages/index.md

Comment thread docs/elements/reference/@ory/elements-react/variables/Node.md

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jonas-jonas jonas-jonas merged commit a3c239f into master Jun 8, 2026
12 checks passed
@jonas-jonas jonas-jonas deleted the jonas-jonas/oryElementsV1.2 branch June 8, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream Issue is caused by an upstream dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants