-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Optional I/O or On/Off label for ion-toggle #20524
Comments
I am working on this feature |
Thanks for the issue! Here's an example of how it could be done now using iOS: https://codepen.io/brandyscarney/pen/YzyxeXa .ios.toggle-labels::before {
position: absolute;
top: 11px;
right: 7px;
content: "";
width: 8px;
height: 8px;
border: solid 1px rgba(0, 0, 0, 0.23);
border-radius: 50%;
}
.ios.toggle-labels::after {
position: absolute;
top: 12px;
left: 11px;
content: "";
width: 10px;
height: 10px;
border-left: 1px solid #fff;
} I like the idea of adding this for accessibility reasons, but we will need to think through how this should be handled in Material Design for Android. For example, if we add a |
Thanks for the issue. This has been resolved via #25459 and the feature will be available in an upcoming release of Ionic. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Ionic version:
[x] 4.x
Describe the Feature Request
I would like to have optional labels on
<ion-toggle>
elements - in iOS, you are still able to enable labels within the accessibility settings. We would like to honor these settings and to have a way to enable labels for the respective platforms (iOS/Android).Describe Preferred Solution
How? An optional parameter/directive would be nice.
It should look like this:
(Source: https://osxdaily.com/2014/04/15/ios-settings-switch-on-off-labels/)
As far as I know, there are also Android equivalents with on/off.
Describe Alternatives
I considered a DIY solution, but I'm not currently not sure how to achieve that effect without having to fork the Ionic project.
Related Code
Additional Context
None
The text was updated successfully, but these errors were encountered: