Skip to content

Add placeholder support #101

Open
Open

Description

@yaphanlong

Hi, is it possible to include placeholder support as shown below? Current workaround is to use javascript and target each input to inject placeholder.

Screenshot 2023-05-25 at 2 10 54 PM

Activity

  1. AlexMiniApps commented on May 25, 2023

    @AlexMiniApps
    Owner

    @yaphanlong Hi, I will research it, but it seems that this placeholder will not be native for the HTML.

  2. rbalet commented on Feb 8, 2024

    @rbalet
    Contributor

    @AlexMiniApps @yaphanlong It would be actually possible by

    1. Adding the has-value class up in the span (or adding a new class)
    2. 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

  3. AlexMiniApps commented on Feb 9, 2024

    @AlexMiniApps
    Owner

    @rbalet Thanks for the suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions