Skip to content

v1.0.0

Compare
Choose a tag to compare
@metonym metonym released this 26 Aug 23:42
· 82 commits to master since this release

svelte-toggle has been redesigned.

PR #5

  • refactor default toggle styles to conform to the classic "switch" UI for boolean states (#2)
  • allow Toggle UI colors to be customized (switchColor, toggledColor, untoggledColor) (#3)
  • allow label to be visually hidden (set hideLabel to true) (#4)
  • default label text is changed from "Toggle label" to "Label"
  • make on/off labels optional (by default they're undefined)
  • add small variant for Toggle switch size
  • extract core component logic into standalone ToggleCore which instruments the accessibility aspects (this component is "renderless" in that it does not have any styles or markup)
    refactor default Toggle to use ToggleCore

Breaking Changes

  • on / off props are optional and must be truthy to use named slots