In svelte SMUI, what do the attributes "table$aria-label" and "input$autocomplete" actually mean?

Viewed 254

I am new to svelte and SMUI. I browsed the official docs from https://sveltematerialui.com/ and came across some weird attribute declarations like "table$aria-label" and "input$autocomplete". I am not sure what they mean, expecially confused about the naming convention using dollar signs as well as where the prefixes of "table" and "input" come about.

Any explanation is helpful and thanks.

1 Answers
  • You can add props to lower components and elements with "$" props, like input$maxlength="15".

  • All events are forwarded. This includes DOM events, SMUI events, and custom events.

    • You can add event modifiers with the on:click$preventDefault$capture={handler} syntax.
    • You have to use "$" instead of "|" like in native Svelte. (The extra S inside the | stands for SMUI.) Supported modifiers are: preventDefault, stopPropagation, passive, nonpassive, capture, and once

This is from the documentation

Related