Skip to content

Add a required class to labels #2238

@vanillajonathan

Description

@vanillajonathan

Is your feature request related to a problem? Please describe.

Required labels have a asterisk * which cannot be styled. I would like like to change the asterisk to be red, or use a icon to indicate that the input is required, or have some text such as "(necessario)".

Describe the solution you'd like

To inputs that are required add a required or form-required class to the label.

This way it can be styled using CSS:

label.required::after {
  color: red;
  padding-left: 5px;
  content: "*"
}

Describe alternatives you've considered

Fork the Vanilla renderer.

Framework

Vue 3

RendererSet

Vanilla

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions