Easily create menus for your Shortcuts without any external apps.
Menu Generator can be embedded or run from the Run Shortcut
action to create stunning, feature-rich menus.
Feed it the command and menu data in a dictionary or text field, then it does the rest!
Flexible Icons: With four different types of icon choices, it should be easy to find an icon for any menu option. Supported Icons:
- Base64 icons (e.g., created from photos, or bring your own).
- Font Awesome icons.
- Emoji icons.
- Photo icons (resized to 123x123 pixels and converted to base64).
Quick menus: Create simple menus using a single text field similar to Toolbox Pro's Quick Menu feature.
Advanced menus: Define menu items individually using dictionaries for optimized menus with maximal customization, again like Toolbox Pro.
Unlimited Custom Fields: Include "hidden" fields to store data with menu items that is not shown in the created menu, and that can be accessed after a menu option is tapped. You can define as many custom fields as needed.
Create menus or base64 for later: Use to create full menus or convert images to base64 for other uses.
Embeddable: Put this shortcut inside any shortcut to add picture/icon menus without complicating installation/distribution.
Icon caching: Icons are cached to a file in your iCloud to increase performance.
Because no external apps (e.g. Toolbox Pro or Actions) are used, permission prompts are limited to just:
- Running another Shortcut (unless embedded within a shortcut).
- Loading web content (for Font Awesome icons).
Every time you run Menu Generator, you'll use an input dictionary that contains the command to run along with any necessary/optional information that goes along with the command. The commands and their inputs are listed below:
menu
- Create vCard menu as single text string
- Inputs:
"menu"
: list of valid menu item dictionaries - Output: vCard menu as a text string
menu items
- Create list of vCard menu text strings
- Inputs:
"menu"
: list of valid menu item dictionaries (described below) - Output: list of vCard items as text strings
get menu item details
- Get a chosen menu item's dictionary using its
title
andsub
(corresponding toName
andCompany
inside aContact
object), in order to easily access its properties. - Inputs:
"title"
and"sub"
: title and subtitle of menu item to get details for."menu items"
: list of menu item dictionaries used to make the menu in the first place, and that will be searched to find the specified title and subtitle
- Output: the found menu item matching the specified title and subtitle
- Get a chosen menu item's dictionary using its
quick menu
- Create vCard menu as single text string using quick menu string
- Inputs:
"menu"
: text string describing the quick menu - Output: vCard menu as a text string
quick menu items
- Create list of vCard menu item text strings from quick menu string
- Inputs:
"menu"
: text string describing the quick menu - Output: list of vCard items as text strings
base64 overlay
- Prepare icon base64 by overlaying transparent PNG image on the specified background color
- Inputs:
"icon"
: base64 string of a png image with some transparency"background"
: hex string or valid HTML color name"size"
: text or number, relative size of image in resulting icon (0 to 1 as ratio of resulting image)
- Output: base64 text string of overlaid image
emoji icon
- Prepare icon base64 from emoji
- Inputs:
“icon”
: text, the emoji to create image from“size”
: optional: number, the size of the resulting image, between 0.0 and 1.0. Defaults to global shortcut default in config dictionary.“background”
: optional: hex color or HTML color name of background. Defaults to transparent on macOS and dark/light based on device dark mode setting on iOS.
- Output: base64 text string of emoji icon
font awesome icon
- Prepare icon base64 from specified Font Awesome icon name
- HTML colors: https://www.w3schools.com/tags/ref_colornames.asp
- Inputs:
“icon”
: font awesome icon type and name, e.g. “fa-solid fa-font-awesome”“size”
: size of icon, from 0.0 to 1.0“color”
: hex color or HTML color name of icon, e.g. #1E3050“background”
: hex color or HTML color name of icon, e.g. #fff
- Outputs: base64 text string of emoji icon
You can use a list of menu item dictionaries to make menus, providing the most functionality and better performance than the text-based quick menus.
To make an advanced menu, you need to construct a list of dictionaries. Each dictionary can be created using the Dictionary
action with the following text keys (see also the above images):
title
- This will be the larger, bold text title for each menu option.sub
- This will be the smaller text below the title.icon
- Here is where you will specify either the base64 icon, emoji, or Font Awesome class name for the icon you want to use.- [optional] You can add additional fields that contain whatever information you want. These will not be printed in the created menu, and can be fetched later in order to drive more advanced behavior based on user selection. Here we use
field1
andfield2
as examples.
Once you've prepared your list of menu item dictionaries, we prepare an input dictionary for Menu Generator:
- Make a new dictionary with a text key named
command
with the valuemenu
. - Next, add a
Set Dictionary
action and set the value of themenu
key to your list of menu item dictionaries (here we've named the list variableMenu item list
). - Below that, use the
Run Shortcut
action to run Menu Generator, and pass the dictionary from step 1 as input.
The output of the Run Shortcut
action will be a single text object that contains the created menu.
- Use a
Set Name
action to set the name of theShortcut Result
tomenu.vcf
. - Finally, add a
Choose From List
action to choose fromRenamed Item
, and make sure the type ofRenamed Item
is set tocontact
.
If you added any non-printed "extra" fields to your menu (we added field1
and field2
in our example), you can use the get menu item details
command to fetch that data from the user-selected item.
- Create another dictionary with the following text keys:
command
- With the valueget menu item details
.title
- With the valueName
pulled from a magic variable of theRenamed Item
.sub
- With the valueCompany
also pulled from a magic variable of theRenamed Item
.
- Pass this dictionary as input to a
Run Shortcut
action pointing to Menu Generator. - The
Shortcut Result
will be the menu item dictionary corresponding to the user-selected menu item. - Using the returned dictionary, you can then access any of the extra fields you defined earlier.
If you need a quick and simple method of making menus, then you can just throw everything into a Text
action.
- Define your icon with base64, Font Awesome, or an emoji.
- Enter the text for each menu item.
- Use
title
,sub
, andicon
, followed by a colon like so:title: Hello World!
. - Make sure there is a line separating each menu option like the screenshot above.
- Use
- Add a
Dictionary
action under thetext
action. - In that
Dictionary
, add twoText
keys with the following values:command
With the valuequick menu
.menu
With the valueQuick menu text
pulled from the magic variable of theText
action.
- Now, place a
Run Shortcut
action below that and select Menu Generator. - Then, use a
Set Name
action to set the name of the Shortcut Result tomenu.vcf
. - Next, add a
Choose From List
action to choose from theRenamed Item
, and make sure the type is set tocontact
.
After that, you can then use If
actions to perform tasks based on the option selected.
- When using quick menus, you cannot define extra, non-printed fields.
- The
title
andsub
values of the selected menu item are accessed using theName
andCompany
values of the selected menu item (a Contact object).
The below example shortcuts demonstrate all of Menu Generator's features. Some analogous shortcuts doing the same things but using Toolbox Pro's menu capabilities are also provided, in order to make clear how similar the functionality and use are.
- Menu Generator Example - Menu
- Creates an advanced menu with Menu Generator using the different types of icons (base64, Font Awesome, and Emoji).
- Toolbox Pro Menu Generator - (Requires Toolbox Pro)
- Uses Toolbox Pro to create an advanced menu.
- Menu Generator Example - Menu Items
- Creates an advanced menu with Menu Generator, then uses the cache to present another menu without the need to regenerate anything.
- Menu Generator Example - Quick Menu
- Creates a quick menu utilizing a
text
action.
- Creates a quick menu utilizing a
- Toolbox Pro Quick Menu
- Uses Toolbox Pro's
Quick menu
action.
- Uses Toolbox Pro's
- Menu Generator Example - Photo Menu
- Pulls the last 10 photos from your Photo Library to create a menu with photos for icons.
- Menu Generator Example - Convert to base64
Use the Join Shortcuts shortcut by gluebyte to embed Menu Generator inside your own shortcut.
- Simplify installation and distribution of your shortcut by removing the need for the user to install Menu Generator as a separate shortcut
- Simplify running of your shortcut by removing the permissions prompt to "run another shortcut"
- Join Shortcuts works best on macOS, where it can sign the resulting merged shortcut
- As an alternative, you could start your own shortcut from a duplicate of the Menu Generator shortcut
- Make sure to collapse the If action in order to hide all the Menu Generator actions and simplify subsequent shortcut development
- As alternatives, you could
- Use the recently released Action Editor, also by gluebyte, or,
- Use the recently released Copy Shortcut Actions +++ by robric18.
- Start your own shortcut from a duplicate of the Menu Generator shortcut. Make sure to collapse the If action in order to hide all the Menu Generator actions and simplify subsequent shortcut development.
As an example, my Gemini Chat Manager shortcut has Menu Generator embedded inside it.
- Install Menu Generator (this Shortcut) and the Join Shortcuts Shortcut:
- Join Shortcuts works by allowing you to insert one Shortcut inside another.
- Each Comment action in the destination Shortcut serves as a placeholder for inserting a source Shortcut.
- Create a Comment action near the top of your Shortcut. Inside, put something like "menu generator".
- Run the Join Shortcuts Shortcut.
- Select your Shortcut at the destination Shortcut.
- Select the comment made in step 2 as the place to insert the source Shortcut.
- Select the Menu Generator Shortcut as the source Shortcut.
- Select "Finish Joining" and save the resulting Shortcut as a copy or by replacing your Shortcut with the joined version.
- Change any "Run Shortcut" actions to point to your Shortcut (so that it runs itself) instead of Menu Generator, and now your Shortcut has built-in pretty menus!
- jpasholk’s “vCard Menu Helper” (Inspiration for this shortcut, though other great vCard menu shortcuts also exist).
- DylanShortcuts’ “Emoji to Image” adapted to turn an emoji into an image.
- SACUL_6’s “Create Menu Using Font Awesome” adapted for Font Awesome icon fetching.
- gluebyte's Join Shortcuts shortcut was used in the development of this shortcut.
- Though unrelated, see also gluebyte's SF Emoji Menu Builder shortcut if you're looking for making pretty menus using SF icons.
- Toolbox Pro for Shortcuts (Inspiration for the structure of Quick Menu feature and of menu items when a dictionary is used as input).
- jpasholk wrote this description, and was pivotal in the preliminary design of this shortcut.
If you use Menu Generator in any of your Shortcuts, please place a comment with the below text at or near the top of your Shortcut:
Menus created by Menu Generator by @twilsonco.
If you publish your Shortcut to RoutineHub or any other Shortcuts sharing platform, please use this badge:
![Menu Generator by @twilsonco](https://github.com/twilsonco/SiriShortcuts/blob/main/img/made-with-menu-generator-badge.png?raw=true)
Markdown for GitHub & RoutineHub created with ♥ by jpasholk.
Thanks for stopping by, and if you have any questions don’t hesitate to reach out!