Skip to content

thiagodnf/thymeleaf-extras-input-attributes

Repository files navigation

Thymeleaf Extras Input Attributes

Thymeleaf dialect for input attributes

Setup

<dependency>
	<groupId>thiagodnf.thymeleaf.extras.input.attributes</groupId>
	<artifactId>thymeleaf-extras-input-attributes</artifactId>
	<version>1.0.0</version>
</dependency>

Code

@Configuration
public class ThymeleafConfiguration {
	
    @Bean
    public InputAttributesDialect getInputAttributesDialect() {
	    return new InputAttributesDialect(true);
    }
}

Usage

Source

public class SignupDTO {

    @NotBlank
    @HTMLAutoFocus
    @HTMLSpellCheck("false")
    @HTMLAutoComplete("given-name")
    private String firstname;
    
}

Result

<input type="text" id="firstname" name="firstname" required="" autofocus="" spellcheck="false" autocomplete="given-name">

About

Thymeleaf dialect for input attributes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages