angular-code-input
angular-code-input copied to clipboard
Add placeholder support
Hi, is it possible to include placeholder support as shown below? Current workaround is to use javascript and target each input to inject placeholder.
@yaphanlong Hi, I will research it, but it seems that this placeholder will not be native for the HTML.
@AlexMiniApps @yaphanlong It would be actually possible by
- Adding the
has-valueclass up in the span (or adding a new class) - Displaying the following css in the span, if it doesn't have the class
span {
&.has-value {
&:after {
content: "";
position: absolute;
height: 8px;
width: 8px;
top: calc(50% - 4px);
left: calc(50% - 4px);
background-image: radial-gradient(
circle at center,
lightgray 5px,
transparent 5px
);
border-radius: 100%;
background-size: 20px;
background-position: top center, bottom center;
background-repeat: no-repeat;
}
}
}
I can make a pull-request if you wish
@rbalet Thanks for the suggestion