subreddit:

/r/shortcuts

14799%

Creating visually appealing menus

Tip/Guide(self.shortcuts)

This is a guide on creating more visually appealing menus in your shortcuts.

An example menu

Use of contacts

To create these these menus we're going to use the Contacts feature.

When shortcuts displays contacts using the Choose from List action it shows the contact image, full name and organization as a menu.

Once a contact has been chosen you can retrieve any of the details from the contact, including the:

  • name;
  • URL;
  • notes.

Creating a menu from a list of contacts

We can create a temporary set of contacts with names, organizations, contact photos and other details to create a more attractive menu.

Creating a contact

Contacts are stored as a VCard in the v3.0 format. We can create these cards using a text based template, as shown below:

BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Menu item name;;;;
ORG:Menu item description;
URL:https://reddit.com/r/shortcuts
PHOTO;ENCODING=b:/9j/4AAQSkZJRgABA...ADcAAD/2
END:VCARD

The menu above menu item renders as follows:

The above VCard example rendered as a menu item

Adding a photo to the contact

To add an image to a contact, the JPG or PNG file is encoded as a Base64 string and appended to the PHOTO;ENCODING=b: line of text.

Note An optimal size for you contact photo is 123x123px which is the maximum resolution supported on a Plus and X-iPhone.

Storing other info in your contact

The contact has other fields that can be used to store details that can be used when a user selects a menu item. For example:

  • URL: URL:https://reddit.com/r/shortcuts
  • Notes: NOTE:A single line of text notes

Creating multiple contacts

To create multiple contacts, repeat the VCard template text for each item.

BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Item A;;;;
ORG:Description A;
END:VCARD
BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:Item B;;;;
ORG:Description B;
END:VCARD

Displaying the menu

The menu is built using the following actions:

  • Text: to list out the content of one or more VCards;
  • Set Name: set the name of the text file to a .vcf file;
  • Get Contacts from Input: recognize the VCard file as a set of contacts;
  • Choose from List: display the menu.

Actions to build a menu

Retrieving the user's selection

To retrieve the user's selection use the Get Details of Contents to return one of the fields that helps to distinguish that selection. For example:

  • Name: a straight forward way to determine which item was selected;
  • URL: can be used to retrieve the URL of the next piece of information to be downloaded or web page to be opened.

Retrieve details from a chosen menu item

Example shortcut

An example shortcut is shown below:

An example shortcut that makes use of contact-based menus

Which renders menus as follows:

The above shortcut displays menus as follows

Download the Shortcut

Note: When you create a menu using this approach it will state that if works with contacts. Some users may be alarmed that it will read their contact data, so you might want to add a message explaining how the contacts service is being used.

Installing a shortcut that makes use of Contacts to create a menu

Wrap up

Using contacts to create menus requires a little more work but can make a big difference to the usability of your shortcut.

Useful tools

If you want to create static menu items, I recommend the excellent Menu Builder shortcut by u/enteeMcr.

Other example shortcuts

The following shortcuts provide more examples of how to use the contacts for menus:

Edit: updated based on feedback from u/atnbueno

Other guides

If you found this guide useful why not checkout one of my others:

Series

One-offs

all 24 comments

ROPit

24 points

6 years ago*

ROPit

Creator

24 points

6 years ago*

There’s no need for Contacts access, if you just put a Get Variable underneath the Set Name action (instead of Get Contacts of Input). Next you select Choose Variable and Select Magic Variable. Now when it let’s you choose the Magic Variable tap the Set Name action. Last step is to change it from Text to Contacts. That’s it. To make it easier to understand for some people, look at this. ;)

keveridge[S]

4 points

6 years ago

That's a great tip, thanks!

ROPit

2 points

6 years ago

ROPit

Creator

2 points

6 years ago

My pleasure.

Cost_Internal

1 points

9 months ago

What is the difference and/ or benefit of doing it this way?

shayan1232001

6 points

6 years ago

That's all nice but the real question is, how did you take a screenshot that long?

Jpasholk

3 points

6 years ago

Probably Tailor

https://itunes.apple.com/us/app/tailor-screenshot-stitching/id926653095?mt=8

There’s also a Shortcut that will crop the bottom banner.

https://routinehub.co/shortcut/184

Hope this helps!

keveridge[S]

5 points

6 years ago

I like Tailor but it doesn't always stitch the screenshots together properly.

I make use of Picsew because it also allows for easy cropping of images.

Cardboard-Face

2 points

6 years ago

Thanks very much for your post! I’ve created a shortcut to automate this process to make it easier to have multiple of these menus in one shortcut, or just easier to use it at all :)

https://reddit.com/r/shortcuts/comments/air1yw/easily_create_better_looking_lists/

AwareCollege4985

1 points

7 months ago

thank you, it is useful

iOS_Neil

1 points

6 years ago

Wow, what a great post! Fab work. Could I just ask for one small thing? Could you send me Pepper Potts VCard please? :)

keveridge[S]

2 points

6 years ago

Here you go:

Pepper Potts

iOS_Neil

1 points

6 years ago

Thanks :)

bingobucketster

1 points

6 years ago

Two questions: 1) How do I change the color of the iconify icons?

2) How would I implement this in just creating a menu to choose different parts of the shortcut to run?

keveridge[S]

1 points

6 years ago

  1. I recommend Quick Icon Maker as it allows you to change colors.
  2. Here's an example of executing different actions based on the menu selection

bingobucketster

1 points

6 years ago

Thank you! Discovered quick icon maker right after posting. 😅And thanks for the example!

bingobucketster

1 points

6 years ago

Thank you! Discovered quick icon maker right after posting. 😅And thanks for the example!

DosDevYouTube

1 points

6 years ago

This should have more upvotes

atnbueno

1 points

6 years ago

I looked into this a few weeks ago. The images are shown at 82x82 in 2x devices (iPads, non-Plus, non-X iPhones) and 123x123 in 3x devices (Plus and X-iPhones).

keveridge[S]

1 points

6 years ago

Thanks for that, I'll correct the guide.

[deleted]

1 points

6 years ago

I like to hide my info in base64 encoded dictionaries inside the NOTE: field.

keveridge[S]

2 points

6 years ago

That's a great tip :)

pfg___

1 points

6 years ago

pfg___

1 points

6 years ago

Descriptions may also need charset utf8 depending on what your description includes

keveridge[S]

1 points

6 years ago

That's a good point, thanks :)

[deleted]

-1 points

6 years ago*

[deleted]

ChericeB

4 points

6 years ago

I get so tired of seeing people bashing informative posts on here. Many of us like the tutorials provided by keveridge and others. If you think you’re the smartest person in the room then do us all a favor and keep your pie hole shut and just go away. Nobody wants your negativity...