Skip to content

[Primitive] Switch #55

@jbatte47

Description

@jbatte47

Summary

Introduce a Switch primitive for binary on/off state.

Intended role in Lattice

Switch provides a token-driven, accessible toggle control without domain logic.

Proposed API

  • checked / onCheckedChange (controlled)
  • size: sm | md | lg
  • state: default | invalid | disabled | loading

Variants

  • size: sm | md | lg
  • state: default | invalid | disabled | loading

Non-goals

  • Does not implement descriptive labels (compose externally).
  • Does not accept arbitrary colors.

States

  • default | hover | focus-visible | checked | invalid | disabled | loading.

Accessibility checklist

  • Implements switch ARIA pattern or native checkbox semantics.
  • Keyboard toggle behavior required.
  • Focus-visible styles required.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions