Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

[quick-theme] Show login page and change basic attributes#45483

Merged
vmuzikar merged 3 commits intokeycloak:mainfrom
mabartos:quick-theme-login
Feb 13, 2026
Merged

[quick-theme] Show login page and change basic attributes#45483
vmuzikar merged 3 commits intokeycloak:mainfrom
mabartos:quick-theme-login

Conversation

@mabartos
Copy link
Contributor

@mabartos mabartos commented Jan 15, 2026

🎉 How to extend your theme with the Quick theme?

  • You can directly see the login screen when customizing
  • You can see the background change
  • You can edit the width and height of the logo
  • Inspired by Keycloakify (they also directly uses the HTML tags inside the React files)
  • WiP - needs polishing (no hardcoded theme.properties, no hardcoded CSS files,...)

1. Create the custom theme with custom logo, background and colors

Screencast.From.2026-01-15.16-54-04.mp4

2. Add the created JAR to the /providers folder

And change the login theme to your new theme:

Screencast.From.2026-01-15.17-05-43.mp4

@edewit @ssilvert @stianst Let me know if you like the way it goes or not :)

@mabartos mabartos self-assigned this Jan 15, 2026
@edewit
Copy link
Contributor

edewit commented Jan 15, 2026

👍 I like this

@edewit
Copy link
Contributor

edewit commented Jan 15, 2026

what also would be cool, maybe outside of this PR, but to be able to set other things like rounded corners, see this link for some more ideas https://keycloak-theme-editor.tpvk7sed8.workers.dev/

@mabartos
Copy link
Contributor Author

what also would be cool, maybe outside of this PR, but to be able to set other things like rounded corners

@edewit Yes, that's true. We could provide some basic attributes by default that are frequently changed - rounder corners, background properties,...

And if it's not sufficient, there might be also a custom text input box for custom CSS (with all these validations of course).

There should be also a capability to change the name of the theme.

@mabartos mabartos force-pushed the quick-theme-login branch 2 times, most recently from a953656 to 997d296 Compare January 19, 2026 18:20
@mabartos mabartos marked this pull request as ready for review January 19, 2026 18:21
@mabartos mabartos requested review from a team as code owners January 19, 2026 18:21
@mabartos
Copy link
Contributor Author

@ssilvert @edewit Could you please check it? Thanks!

Other improvements can be done in follow-up tasks.

Some of them already identified in the milestone:

@mabartos mabartos changed the title Show login page for quick theme and change basic attributes [quick-theme] Show login page and change basic attributes Jan 19, 2026
@ssilvert
Copy link
Contributor

@mabartos I like this too.

However, at first it wasn't clear to me that I would need to scroll down to see the original WYSIWYG that was more based on admin console. Maybe this is more clear if I was looking at it live rather than in the video?

Any ideas?

@mabartos
Copy link
Contributor Author

@ssilvert Thanks for the comment.

This is the initial form and it still needs some improvements. At this moment, the login preview is on top and the admin preview is under that. However, I thought that we could provide some Init page when users want to customize themes. That they could choose what component they want to customize (login, account, admin, or all) and the specific preview would be shown. Captured here: #45531

Or there might be some 3 way "switch" at the top of the preview "Login | Account | Admin", and only one could be choosen and then shown. And admins could just switch to other preview to see how it looks like for other previews.

But we can discuss more :)

@mabartos mabartos requested a review from edewit January 27, 2026 14:56
@mabartos
Copy link
Contributor Author

@edewit As we discussed, this initiative will be more targeted to 26.7, but if you have some spare time, you could check it and potentially add whatever suits to the TS changes.

@edewit
Copy link
Contributor

edewit commented Jan 28, 2026

@ssilvert it moves down when there isn't enough room if you make your screen a bit wider then if fits. What we could do is collapse the sidebar on this screen so that the user has more room to edit. Right now when you "design" a theme it creates a theme that can be applied to all "apps", you can then opt to only use it for the login once installed, so I don't think we need to ask a user here what they want to theme. So I rather have a tab control so they can see what the changes look like for the different "apps".

Copy link
Contributor

@edewit edewit left a comment

Choose a reason for hiding this comment

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

I have a small fix mabartos#1138

@mabartos
Copy link
Contributor Author

@edewit LGTM.

image

@mabartos mabartos linked an issue Jan 28, 2026 that may be closed by this pull request
@vmuzikar
Copy link
Contributor

vmuzikar commented Feb 4, 2026

@mabartos @edewit Is this ready to be merged?

@mabartos
Copy link
Contributor Author

mabartos commented Feb 4, 2026

@vmuzikar Yes :)

@thomasdarimont
Copy link
Contributor

thomasdarimont commented Feb 4, 2026

@mabartos I just gave your branch quick-theme-login, but on my machine it still looks like this:
Screenshot 2026-02-04 at 21 19 21

Additionally, MacOS reports the generated quick-theme.jar as potentially mallicios - I needed to extract it via the terminal to view it's contents.

Some additional feedback:

  • Add some additional structure (Colors, Fonts, Borders, Logo)
    This would help to make tge growing list of config options less daunting.
  • Make it easier to match the customization with the target element
    Right now it is hard to see beforehand which element is affacted by a particlar style. For example if I inspect the generated <button class="pf-v5-c-button pf-m-primary pf-m-block" name="login" id="kc-login" type="submit">Sign In</button> with dev tools I don't see immediately which style option is affecting this element.
    I dev tools I see background-color: var(--pf-v5-c-button--m-primary--Color) - which Style option do I need to modify to change the color? Perhaps it would help to show a (?) next to the style option that mentions the actual css class / css-variable.
    Another option would be to briefly highlight the respective target element in the preview when clicking in a styling option.
  • Logo Position and Visibility
    It would be helpfil if we could control the logo alignment (left, center, right)
  • Logo location (URL instead of upload)
    Some customers prefer to use a logo from a predefined URI that they control.
  • Identity Provider Button Location
    Some customer want to show the identity provider icons first and offer the username/password as a secondary option.
  • Page State Toggles:
    It would be helpful to toggle different page states (status: error/success, focussed, hover) to quickly preview the effect of the styling.
  • Support for customizing font sizes (Title, Subtitle, Body, Buttons, Labels, Links)
    This would make the styling capabilities more complete.
  • Support more use-case pages (Registration, Required Action, Profile validation, Consent, 2FA screens, Error)
    This would help to view the styling in action directly.
  • Add support to import/export a style preset as json
    This can be exchanged easier than sending a jar around (e.g. some companies might block .jar attachments in emails).
  • Add support to select locale for preview
    This would make it easier to see issues with too long texts etc.

I'm looking forward to this feature finally being implemented!

@mabartos mabartos marked this pull request as draft February 4, 2026 21:06
@mabartos
Copy link
Contributor Author

mabartos commented Feb 4, 2026

@thomasdarimont Oops, that's weird... I'll check it tomorrow. Thanks!

Nice list of possible improvements though!

@mabartos mabartos force-pushed the quick-theme-login branch 2 times, most recently from f0ea6da to 97aa297 Compare February 11, 2026 15:50
Copy link
Contributor Author

@mabartos mabartos left a comment

Choose a reason for hiding this comment

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

@thomasdarimont I was able to reproduce the issue and now it should work - trying it with Vite introduced an illusion that all resources (CSS) are present.

@edewit I just fetch the default background and logo from the keycloak.v2 theme resources, so we don't need to duplicate it anywhere. The same with the default styles.css

@edewit Can you review it again? Thanks!

@mabartos mabartos marked this pull request as ready for review February 11, 2026 16:01
@mabartos
Copy link
Contributor Author

Resolved conflict and rebased.

I can confirm it works even with the new light/dark switch:

Screencast.From.2026-02-12.13-54-36.mp4

@mabartos
Copy link
Contributor Author

@edewit Fixed lint error.

@mabartos mabartos requested a review from edewit February 12, 2026 14:25
@mabartos
Copy link
Contributor Author

@edewit Thanks for the review!

@vmuzikar We should be ready to go with this one :) Thanks!

Copy link
Contributor

@vmuzikar vmuzikar left a comment

Choose a reason for hiding this comment

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

Approving based on other reviews.

@vmuzikar vmuzikar merged commit 5a4e90d into keycloak:main Feb 13, 2026
82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

5 participants