GRUB 2 Components Reference
Complete guide to every visual gfxmenu component: boot_menu, label, progress_bar, circular_progress, image, and special __timeout__ IDs.
On this page
Overview of visual components
Beyond layout containers (hbox, vbox, and canvas), GNU GRUB 2 provides five visual components (on-screen elements that do not hold child widgets). Grub Designer renders each one faithfully to GRUB's C engine.
boot_menu
Displays the list of operating systems and boot entries generated in grub.cfg. Every practical theme must include one boot_menu.
+ boot_menu {
left = 50%-280
top = 50%-180
width = 560
height = 360
item_font = "Inter Regular 20"
selected_item_font = "Inter Bold 20"
item_color = "#94A3B8"
selected_item_color = "#FFFFFF"
item_height = 42
item_padding = 10
item_spacing = 8
icon_width = 28
icon_height = 28
item_icon_space = 12
menu_pixmap_style = "menu_*.png"
selected_item_pixmap_style = "select_*.png"
scrollbar = true
scrollbar_width = 10
scrollbar_thumb = "thumb_*.png"
}
icon_width/icon_height: Icons are loaded fromicons/<class>.pngmatching eachmenuentry --classingrub.cfg.item_paddingvs.item_spacing:item_paddingadds horizontal inset inside the list, whileitem_spacingsets the vertical gap between consecutive entries.
label
Renders single-line bitmap text (gui_label.c). Its dimensions are computed automatically from its text and .pf2 font.
Built-in text macros
GRUB 2 automatically expands special macros inside text:
| Macro | Expanded content |
|---|---|
@KEYMAP_SHORT@ |
Short localized hint (enter: boot, e: options, c: cmd-line) |
@KEYMAP_LONG@ |
Longer localized keyboard instruction line |
@KEYMAP_SCROLL_ENTRY@ |
Horizontal scroll hint for long entry names |
@TIMEOUT_NOTIFICATION_SHORT@ |
Short countdown notice (when id = "__timeout__") |
@TIMEOUT_NOTIFICATION_MIDDLE@ |
Medium countdown notice |
@TIMEOUT_NOTIFICATION_LONG@ |
Full localized countdown sentence |
+ label {
id = "__timeout__"
left = 50%-200
top = 100%-64
width = 400
align = "center"
font = "Inter Regular 16"
color = "#9BB4FF"
text = "Booting automatically in %d seconds"
}
progress_bar
Draws a horizontal progress indicator — most commonly bound to id = "__timeout__" so users visually see the remaining seconds before the default OS boots.
- Solid color mode: Configure
fg_color,bg_color, andborder_color. - Pixmap 9-slice mode: Assign
bar_style = "bar_*.png"andhighlight_style = "fill_*.png"for rounded or glowing bars. - Optional text overlay: Set
show_text = trueandtext = "@TIMEOUT_NOTIFICATION_SHORT@"(or"%d s").
Defines the static container track rendered across the full width of the progress_bar. Its 9-slice borders act as inner padding around the active fill.
circular_progress
Draws a radial ring of tick sprites around a center bitmap (gui_circular_progress.c), ideal for minimal HUD boot screens:
An 8-bit RGBA PNG drawn once right in the middle of the widget — ideal for an OS emblem, dial backdrop, or subtle ring base.
+ circular_progress {
id = "__timeout__"
left = 50%-48
top = 74%
width = 96
height = 96
center_bitmap = "ring_center.png"
tick_bitmap = "ring_tick.png"
num_ticks = 24
ticks_disappear = false
start_angle = -64
}
start_angleuses GRUB's1/256circle units (-64equals 12 o'clock / top center).- Both
center_bitmapandtick_bitmapmust be 8-bit RGBA PNGs.
image
Displays a static bitmap (gui_image.c) scaled to fill its explicit width and height (object-fill). Ideal for distribution emblems, accent dividers, or decorative HUD badges.