Skip to content

UI kits and design

Add the login button

Add the Log in with RemiliaNET button to a login screen with HTML markup or the React component.

Add the button after your login flow works. The button only starts the flow. For the flow, see RemiliaNET login.

Prerequisites

Steps

  1. Download the login kit archive.

  2. Copy remilianet-login.css and the fonts/ folder into the static files of your app, side by side. Keep the license file in fonts/.

  3. Copy the mark/ folder beside them.

  4. Load the stylesheet once:

    <link rel="stylesheet" href="/remilianet-login.css" />
  5. Add the button to the login screen:

    <button type="button" class="remilia-login remilia-login--classic-navy" id="remilia-login">
      <img class="remilia-login__mark" src="/mark/remilianet-mark.svg" alt="" />
      <span class="remilia-login__label">Log in with RemiliaNET</span>
    </button>
  6. Set the modifier classes to the style and the size that you chose.

  7. Start your login flow from the click handler of the button.

Result

The login screen shows the button in the chosen style. Your app serves the stylesheet itself, so the login screen does not depend on this site. Screen readers announce "Log in with RemiliaNET" for every label.

An icon-only button keeps the label in the markup, and the stylesheet hides it visually. The short label hides the provider name the same way:

<span class="remilia-login__label">Log in<span class="remilia-login__hidden"> with RemiliaNET</span></span>

Example

The React component replaces the markup of steps 4 to 7. Copy RemiliaLoginButton.tsx into your app with the stylesheet and fonts/, and import the stylesheet once. With the oidc-spa setup of the React login starter, the component starts login like this:

import "./remilianet-login.css";
import { RemiliaLoginButton } from "./RemiliaLoginButton";
import { useOidc } from "./oidc";

export function LoginButton() {
  const oidc = useOidc();

  if (oidc.isUserLoggedIn) {
    return null;
  }

  return (
    <RemiliaLoginButton
      variant="material-light"
      isBlock
      onClick={() => void oidc.login()}
    />
  );
}

Agent prompt

A coding agent can add the button from this prompt:

Add a "Log in with RemiliaNET" button to this app's login screen.

1. Read https://docs.remilia.net/brand/login-button,
   https://docs.remilia.net/brand/add-login-button, and
   https://docs.remilia.net/guide/authentication.
2. Download https://docs.remilia.net/brand/login/remilianet-login-kit.zip and
   copy remilianet-login.css with its fonts/ folder, license included, into
   the project's static files, unchanged. Load the stylesheet once. Do not
   hotlink it.
3. In React, copy https://docs.remilia.net/brand/login/RemiliaLoginButton.tsx
   and render <RemiliaLoginButton />. Otherwise use the HTML snippet from the
   brand page verbatim.
4. Choose the variant that matches the app's other login buttons:
   classic (default), classic-navy, aqua-white, aqua-blue, material-light,
   material-dark or material-blue.
5. Make it the same size and width as the other providers. Use isBlock when
   they are full width, and isIconOnly only when every provider is an icon.
   Keep the mark on the left, the default.
6. Wire its click to the RemiliaNET login flow (oidc-spa login(), or the manual
   Authorization Code + PKCE redirect). Never collect a RemiliaNET password.
7. Do not recolor, restyle, stretch or rename it. Keep the label as one of
   "Log in with RemiliaNET", "Continue with RemiliaNET",
   "Register with RemiliaNET" or, where space is tight, "Log in".