How can I create a checkbox from the native input tag?

How can I create a checkbox from the input tag in plasmic?

Hi @exclusive_opossum, not sure I understand what this means, do you have an example?

@yang I can’t seem to find a way to create <input type="checkbox">

oh! got it - that native element isn’t built-in, but have you seen the checkbox component?

image.png

alternatively, if you need a native input checkbox, you can create a custom component:

export function MyCheckbox({ className, ... }) {
  return (
    <input className={className} type='checkbox' {...}/>
  );
}

PLASMIC.registerComponent(
  MyCheckbox,
  {
    name: 'MyCheckbox',
    ...
  }
)

Got it, thanks.