-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2033 from Shopify/mobile-keyboard-accessories-docs
Add mobile keyboard accessories docs
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
name: Keyboard accessories | ||
category: Forms | ||
platforms: | ||
- android | ||
- ios | ||
keywords: | ||
- keyboard | ||
- soft | ||
- virtual | ||
- ios | ||
- android | ||
--- | ||
|
||
# Keyboard accessories | ||
|
||
On iOS and Android, software keyboards appear on the screen when typing. Keyboard accessories allows additional content and actions based on what merchants are doing. For example, when the merchant is updating a description and needs controls for bolding, italicizing, and underlining. | ||
|
||
--- | ||
|
||
## Best practices | ||
|
||
Keyboard accessories should: | ||
|
||
- Have a maximum height of: | ||
- 44pt on iOS | ||
- 48dp on Android | ||
- Include a horizontally swipeable interaction if there is a lot of content or a large number of actions you need to make available to merchants | ||
- Provide an easy hint or introduction to make the merchant aware of the swipe interaction | ||
- Make actions grouped and expandable if possible, in order to reduce visual noise and complexity for the merchant | ||
|
||
--- | ||
|
||
## Examples | ||
|
||
### Keyboard accessories with actions | ||
|
||
<!-- example-for: ios, android --> | ||
|
||
Use the action accessories to add actions that are relevant to what the merchant is entering on the screen. | ||
|
||
<!-- content-for: android --> | ||
|
||
![Keyboard accessory with actions](components/KeyboardAccessories/android/toolbar.png) | ||
|
||
<!-- /content-for --> | ||
|
||
<!-- content-for: ios --> | ||
|
||
![Keyboard accessory with actions](components/KeyboardAccessories/ios/toolbar.png) | ||
|
||
<!-- /content-for --> | ||
|
||
### Keyboard accessories with text field | ||
|
||
<!-- example-for: ios, android --> | ||
|
||
Use to make message entry easier in messaging and chat-based products. | ||
|
||
<!-- content-for: android --> | ||
|
||
![Keyboard accessory with text field](components/KeyboardAccessories/android/text-field.png) | ||
|
||
<!-- /content-for --> | ||
|
||
<!-- content-for: ios --> | ||
|
||
![Keyboard accessory with text field](components/KeyboardAccessories/ios/text-field.png) | ||
|
||
<!-- /content-for --> | ||
|
||
--- | ||
|
||
## Related components | ||
|
||
- To make more actions visible in keyboard accessories, use [the icon component](/components/images-and-icons/icon) for action labels | ||
- To group actions within keyboard accessories, use [the button group component](/components/actions/button-group) | ||
- For chat-based interfaces, use [the text field component](/components/forms/text-field) in keyboard accessories |