Build a mobile popover menu with Svelte & OpenProps

Поділитися
Вставка
  • Опубліковано 4 чер 2024
  • In this video, I'll discuss how to use the new Popover API and use Svelte & OpenProps to build a animated mobile menu.
    Source Code: github.com/joshnuss/open-prop...
    Links:
    - Popover API: developer.mozilla.org/en-US/d...
    - OpenProps: open-props.style
  • Наука та технологія

КОМЕНТАРІ • 9

  • @blokche_dev
    @blokche_dev 24 дні тому +1

    Really like how Svelte leverage the platform with a minimal impact on the bundle size. Thanks for sharing!

  • @TomSmallwood
    @TomSmallwood 22 дні тому +2

    Built these plenty of times but so nice to see how someone else builds it, picked up a few things. Enjoyed the video Josh, thank you!!!!

  • @adamshand
    @adamshand 24 дні тому

    Helpful, thanks!

  • @ScottSpencePlease
    @ScottSpencePlease 24 дні тому

    Super simple explanation Josh! Thanks for the content

    • @josh_nussbaum
      @josh_nussbaum  23 дні тому

      Thanks Scott! 🙇
      Was just reading your piece about patching, the newsletter is great 🙌

  • @sinankesk_in
    @sinankesk_in 22 дні тому

    Great tricks. Thank you Josh.

  • @HaaniJaber
    @HaaniJaber 23 дні тому +1

    What's the best way to close the popover when clicking on a ?
    Looking for good a11y as well as the menu to close once a link is clicked.

    • @josh_nussbaum
      @josh_nussbaum  23 дні тому +1

      A few ways to do that in an SPA
      Handle on:click on links (without doing a preventDefault) and call popover.hidePopover()
      Another way, with SvelteKit, is to handle beforeNavigate and call popover.hidePopover()