Docs

Login Styling

Styling API reference for the Login component.

Style Properties

The following style properties can be used in CSS stylesheets to customize the appearance of this component.

To apply values to these properties globally in your application UI, place them in a CSS block using the html {…​} selector. See Component Style Properties for more information on style properties.

Login Form Properties

Property Supported By

--vaadin-login-form-background

Aura

--vaadin-login-form-border-radius

Aura

--vaadin-login-form-error-color

Aura

--vaadin-login-form-error-font-size

Aura

--vaadin-login-form-error-font-weight

Aura

--vaadin-login-form-error-gap

Aura

--vaadin-login-form-error-line-height

Aura

--vaadin-login-form-gap

Aura

--vaadin-login-form-padding

Aura

--vaadin-login-form-title-color

Aura

--vaadin-login-form-title-font-size

Aura

--vaadin-login-form-title-font-weight

Aura

--vaadin-login-form-title-line-height

Aura

--vaadin-login-form-width

Aura

Login Overlay Properties

Property Supported By

--vaadin-login-overlay-background

Aura

--vaadin-login-overlay-border-color

Aura

--vaadin-login-overlay-border-radius

Aura

--vaadin-login-overlay-border-width

Aura

--vaadin-login-overlay-brand-background

Aura

--vaadin-login-overlay-brand-padding

Aura

--vaadin-login-overlay-description-color

Aura

--vaadin-login-overlay-description-font-size

Aura

--vaadin-login-overlay-description-font-weight

Aura

--vaadin-login-overlay-description-line-height

Aura

--vaadin-login-overlay-shadow

Aura

--vaadin-login-overlay-title-color

Aura

--vaadin-login-overlay-title-font-size

Aura

--vaadin-login-overlay-title-font-weight

Aura

--vaadin-login-overlay-title-line-height

Aura

Animation

The overlay has a built-in opening and closing animation, which is disabled until an animation duration is set. The closed properties define the state that the overlay animates from when it opens, and to when it closes. The Aura theme sets these properties for some components. Lumo has its own overlay animations, which these properties don’t affect.

While an animation runs, the component has the opening or closing state attribute, so separate values can be applied to each direction. The backdrop always fades, and only the opacity is animated when the user prefers reduced motion.

Property Value syntax Initial value

--vaadin-overlay-animation-delay

<time>

0s

--vaadin-overlay-animation-duration

<time>

0s

--vaadin-overlay-animation-timing-function

<easing-function>

ease

--vaadin-overlay-opacity-closed

<number>

0

--vaadin-overlay-scale-closed

<number> or <percentage>

1

--vaadin-overlay-transform-closed

<transform-list>

none

--vaadin-overlay-translate-closed

<length>+ or <percentage>+

0px

CSS Selectors

The following CSS selectors can be used in stylesheets to target the various parts and states of the component. See the Styling documentation for more details on how to style components.

Important
Not for Shadow DOM
These selectors should be used in styles.css or another stylesheet loaded with the @StyleSheet annotation or the @import CSS rule. They do not work in the shadow DOM of Vaadin components, such as in stylesheets in the components sub-folder or loaded with the @CssImport annotation’s themeFor property.

Login Form

Root component

vaadin-login-form

Inner form wrapper

vaadin-login-form::part(form)

Form title

vaadin-login-form::part(form-title)

Error message section

vaadin-login-form::part(error-message)

Error message heading

vaadin-login-form::part(error-message-title)

Error message description

vaadin-login-form::part(error-message-description)

Footer

vaadin-login-form::part(footer)

Login Form Fields and Buttons

Username field

vaadin-login-form vaadin-text-field

Password field

vaadin-login-form vaadin-password-field

Log In button

vaadin-login-form [slot="submit"]

Forgot Password button

vaadin-login-form [slot="forgot-password"]

Login Overlay

Root component

vaadin-login-overlay

Overlay backdrop / modality curtain

vaadin-login-overlay::part(backdrop)

Outer content wrapper

vaadin-login-overlay::part(overlay)

Inner content wrapper

vaadin-login-overlay::part(content)

Overlay card

vaadin-login-overlay::part(card)

Card header

vaadin-login-overlay::part(brand)

Title

vaadin-login-overlay [slot="title"]

Description / sub-title

vaadin-login-overlay::part(description)

Title

vaadin-login-overlay [slot="title"]

Form wrapper

vaadin-login-overlay::part(form-wrapper)

Inner form wrapper

vaadin-login-overlay::part(form)

Form title

vaadin-login-overlay::part(form-title)

Error message section

vaadin-login-overlay::part(error-message)

Error message heading

vaadin-login-overlay::part(error-message-title)

Error message description

vaadin-login-overlay::part(error-message-description)

Footer

vaadin-login-overlay::part(footer)

Login Overlay Fields and Buttons

Username field

vaadin-login-overlay vaadin-text-field

Password field

vaadin-login-overlay vaadin-password-field

Log In button

vaadin-login-overlay [slot="submit"]

Forgot Password button

vaadin-login-overlay [slot="forgot-password"]

Updated