Skip to content

Conversation

@prakashraman
Copy link
Contributor

@prakashraman prakashraman commented Dec 16, 2025

Fixes #21064

Background

Add documentation for the Switch component in the Point of Sale surface.

Solution

This PR adds comprehensive documentation for the Switch component in the Point of Sale surface, including:

  • Component description and usage guidelines
  • Property and event definitions
  • Default example showing basic usage with labels
  • Event handling example demonstrating how to respond to toggle changes
  • Accessibility best practices
  • Supporting screenshots for visual reference

The documentation explains that the Switch component creates a toggle control for binary choices that take effect immediately, such as enabling notifications or toggling features.

🎩

  • To be tophatted only by the App Platform Team, as the tophatting procedures for individual component additions are tricky at the moment

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

image.png

image.png

image.png

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@prakashraman prakashraman marked this pull request as ready for review December 16, 2025 19:53
@@ -0,0 +1,2 @@
<s-switch label="Option 1" />
<s-switch label="Option 2" defaultChecked />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Re: line +3]

nit, but switch has a blockish layout so for this to exist like the screenshot we would need a stack aroud these items.

Not a blocker but something we might want to consider

See this comment inline on Graphite.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point.

However the sake of readibility (and ease of understanding), I'd vote for not including the s-stack in the example code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants