Add sign-in navigation
A navigation bar needs a standard sign-in action.
Kinde · Component
LoginLink is a Kinde React SDK component that starts sign-in when activated. Render it with the content users should click.
LoginLink is a React component supplied by the Kinde React SDK. Render it with link content, and selecting it starts the sign-in flow by constructing a redirect URL and sending the user to Kinde.
<LoginLink>Sign in</LoginLink>| Name | Type | Description |
|---|---|---|
children | ReactNode | Required link content displayed to the user. |
A React link component that starts the Kinde sign-in flow.
LoginLink from the SDK's components entry point.import { LoginLink } from "@kinde-oss/kinde-auth-react/components";
export default function App() {
return <LoginLink>Sign in</LoginLink>;
}Renders a sign-in link that starts the Kinde authentication flow.
A navigation bar needs a standard sign-in action.
A logged-out landing page needs to begin authentication.
LoginLink do?LoginLink is a standard link component from the Kinde React SDK. It starts authentication when rendered and activated, sending the user to Kinde to sign in.
Follow-up: How can the same behavior be triggered from a button? Use useKindeAuth, obtain login, and call it from the button's click handler.
LoginLink used in a React component?Import it from @kinde-oss/kinde-auth-react/components, then render it with the text or content users should select, such as <LoginLink>Sign in</LoginLink>.
Follow-up: What alternative SDK API is documented for sign-in? The useKindeAuth hook exposes a login method.
LoginLink?The component abstracts the redirect setup for sign-in. The documented alternative is the login method from useKindeAuth, which can be attached to a button.
Follow-up: When should a button-based approach be preferred? Use it when the UI needs imperative click handling or custom button behavior.
RegisterLinkuseKindeAuthloginregister