Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a required class to labels #2238

Closed
vanillajonathan opened this issue Jan 3, 2024 · 1 comment · Fixed by #2274
Closed

Add a required class to labels #2238

vanillajonathan opened this issue Jan 3, 2024 · 1 comment · Fixed by #2274

Comments

@vanillajonathan
Copy link

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

@sdirix
Copy link
Member

sdirix commented Jan 4, 2024

Hi @vanillajonathan, Thanks for the suggestion! Definitely makes sense to me. The required asterisk should reside in an own customizable element so that it becomes easily styleable.

davewwww added a commit to davewwww/jsonforms that referenced this issue Feb 9, 2024
davewwww added a commit to davewwww/jsonforms that referenced this issue Feb 12, 2024
@lucas-koehler lucas-koehler modified the milestones: Backlog, 3.3 Feb 12, 2024
lucas-koehler pushed a commit that referenced this issue Feb 12, 2024
…ControlWrapper (#2274)

* feat: create own element for asterisk and add class in vue vanilla controlWrapper #2238
* add label directly without computedLabel, add "required" style class

Fix #2238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants