Pricing Blog

How to use toddle component in webflow and use the styling from webflow

  • usama_saleem-1303692578788479016

    Usama

    8 months ago

    I want to use toddle component and want to have the component get the styling from webflow classes , so that it remain consistent with my website

    is this possible currently ?
  • andreasmoller-1303694362433032322

    Andreas Møller

    8 months ago

    Yes. you should just be able to add the classes to the elements in the toddle component.
  • I would not recommend this approach though, You will likely have an easier time just styling the components in toddle.
  • usama_saleem-1303746695141658687

    Usama

    8 months ago

    @Andreas Møller

    i will try the first approach and let you know

    thanks for the help
  • mxi012-1356381116084256941

    𝓜𝓪𝔁𝓲

    3 months ago

    @Usama how has it been going?
  • Tod-1356381118797971597

    Tod

    3 months ago

    Great energy @𝓜𝓪𝔁𝓲! Your continuous contribution to the toddle Community just made you advance to Community Level 4!
  • mxi012-1356384272856121395

    𝓜𝓪𝔁𝓲

    3 months ago

    @Andreas Møller could you dig a bit deeper how to use the overall site styling in shadow roots as i thought this is not possible to the different DOM.
  • andreasmoller-1356486314542759958

    Andreas Møller

    3 months ago

    Not that is correct you can only style the root element with classes
  • usama_saleem-1360297746778685681

    Usama

    3 months ago

    I did manage to made a implementation that works with a Webflow Component.

    The styling comes from the Webflow component by using same class name in both Webflow and Toddle Component
  • usama_saleem-1360298186035560579

    Usama

    3 months ago

    The solution is fine

    As always a native solution would be beneficial

    I work with 2 Webflow Enterprise Partner agencies and they have some project where a custom component that can be styled within Webflow is always preferred.
  • Currently we use either Alpine JS or React JS to handle these
  • andreasmoller-1360678204892909698

    Andreas Møller

    3 months ago

    How do you handle ot with React?
  • usama_saleem-1362669423810314391

    Usama

    2 months ago

    either with importing react library and writing the code inside an embed

    the other approach we follow is we create npm package for that component , import it inside Webflow and then use custom element feature in Webflow so write the markup for that react element.

    We are currently for the DevLink update from Webflow - it is currently one way Webflow -> React and not the other way

    hope they provide this option - but still it will be a hybrid solution not a full no code solution