HTML + CSS -> Vaadin Component

Hi,
I’ve HTML + CSS here https://uiverse.io/AbanoubMagdy1/fluffy-octopus-90. It is creating a nice toggle button. I want to create a web component. Should I just mimic the HTML code into Vaadin ( I mean using same HTML tags ) or is there any other way to accomplish this ?

There are 2 primary ways to create a custom component:

  1. Implement your own component Java class using the corresponding HTML elments etc via Flow’s APIs, see docs here: https://vaadin.com/docs/latest/create-ui/creating-components/many-elements
  2. Implement it as a Web Component and build a Flow API for it: https://vaadin.com/docs/latest/create-ui/web-components