Skip to content

Impossible to extend classes for input type checkbox #1335

Open
@LOBsTerr

Description

Checkbox component is missing drupal classes like "form-checkbox", this class can be used by some modules to target checkboxes. As result we are missing some UI interactions. The class on the input is hardcoded "ecl-checkbox__input" and we can't change it.

  <input
    id="{{ _id }}"
    name="{{ _name }}"
    class="ecl-checkbox__input"
    type="checkbox"
    value="{{ _value }}"
    {{ _disabled ? "disabled" }}
    {{ _checked ? "checked" }}
    {{ _helper_id is not empty ? "aria-describedby=\"" ~ _helper_id ~ "\"" }}
    {{ _extra_input_attributes|raw }}
  />

It would be great to us the same approach, which is used for a wrapper to allow to extend classes:

<div class="{{ _css_class }}"{{ _extra_attributes|raw }}>

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions