Ink Story Template

Quick Reference

Quick reference for all template features. For detailed explanations and examples, follow the links to individual documentation pages.

Table of Contents

Text Formatting

Syntax Result
__text__ Bold
_text_ Italic
___text___ Bold italic
`code` Inline code
: Header H2 header
:: Header H3 header
::: Header H4 header
> item Bullet point
>> text Block quote
[text](url) Link
[text](class) Styled span
[---] Horizontal line
%_ Escape (literal _)

Built-in style classes: highlight (yellow), important (red bold), quiet (gray small), center (centered)

Full documentation →

Special Tags

Story Metadata

Tag Purpose Reference
# TITLE: Story title Metadata
# AUTHOR: Story author Metadata
# THEME: Default theme (light/dark) Metadata

Choices

Tag Purpose Aliases Reference
# CHOICE_NUMBERS: Keyboard hints CHOICE_NUMBERING, KEYBOARD_HINTS Choices
# TONE: Define tone icon Choices
# TONE_INDICATORS: Enable tone icons SHOW_TONES Choices
# TONE_TRAILING Icons after text TRAILING_TONES Choices
# UNCLICKABLE Disable choice UNCLICKABLE, DISABLED, DISABLE Choices

Content

Tag Purpose Aliases Reference
# STATBAR: Progress bar STAT_BAR, PROGRESSBAR, PROGRESS_BAR Stat Bars
# USER_INPUT: Text input INPUT, PROMPT, TEXT_INPUT User Input

Media

Tag Purpose Aliases Reference
# IMAGE: Display image IMG, PICTURE, PIC Images
# BACKGROUND: Set backdrop BG, BACKGROUND_IMAGE Images
# AUDIO: Play sound SOUND, SFX, SOUND_EFFECT Audio
# AUDIOLOOP: Loop music MUSIC, BGM, BACKGROUND_MUSIC, AUDIO_LOOP Audio

Notifications

Tag Purpose Aliases Reference
# NOTIFICATION: Info message NOTIFY, MESSAGE, INFO Notifications
# ACHIEVEMENT: Success message SUCCESS Notifications
# WARNING: Warning message WARN Notifications
# ERROR: Error message ERR Notifications

Pages & Layout

Tag Purpose Aliases Reference
# SPECIAL_PAGE: Reference page PAGE Special Pages
# PAGE_MENU: Menu order MENU, MENU_ORDER, PAGE_ORDER, SPECIAL_PAGE_ORDER Special Pages

Styling & Control

Tag Purpose Aliases Reference
# CLASS: Add CSS class CSS, CSS_CLASS, STYLE Styling
# CLEAR Clear screen Styling
# RESTART Restart story RESET, NEW_GAME Styling

Tag Tips

  • These tags are processed by the template, not by Ink itself. You won’t see any effect in the Inky editor. They only work when you run your story in the browser.

  • Tags are case-insensitive. # IMAGE:, # Image:, # image: and even # ImAgE are all equivalent.

  • Combine effects on the same line:

# AUDIO: thunder.mp3
# CLASS: scary
Lightning flashes overhead!
  • Audio and notifications trigger when the text appears.

  • All file paths are relative to the template folder. Use forward slashes on all platforms.

Functions

Declare once at the top of your .ink file with EXTERNAL, then use anywhere.

String

Function Example
UPPERCASE(str) "hello""HELLO"
LOWERCASE(str) "HELLO""hello"
CAPITALIZE(str) "john""John"
TRIM(str) " hi ""hi"
LENGTH(str) "hello"5
CONTAINS(str, search) "hello", "ell"true
STARTS_WITH(str, search) "hello", "he"true
ENDS_WITH(str, search) "hello", "lo"true
REPLACE(str, old, new) "hello", "l", "L""heLlo"
REPLACE_ALL(str, old, new) "hello", "l", "L""heLLo"

Math

Function Example
ROUND(x) 3.74
CLAMP(x, min, max) 150, 0, 100100
ABS(x) -55
PERCENT(value, total) 25, 20013

Fairmath

Function Description
FAIRADD(stat, percent) Add with diminishing returns near 100
FAIRSUB(stat, percent) Subtract with diminishing returns near 0

Time

Function Example
NOW() Current Unix timestamp
SECONDS_SINCE(start) Seconds elapsed
MINUTES_SINCE(start) Minutes elapsed
TIME_SINCE(start) "5 minutes"
FORMAT_DATE(ts, locale) "November 26, 2025"
FORMAT_TIME(ts, locale) "3:45 PM"
FORMAT_DATETIME(ts, locale) "November 26, 2025, 3:45 PM"
OFFSET_DATE(ts, y, mo, d, h, mi) Add/subtract from timestamp

Full documentation →

Keyboard Shortcuts

Key Action
1 - 9 Select choice 1-9
A - Z Select choice 10+
/ Scroll (small)
Page Up / Page Down Scroll (large)
Home / End Jump to top/bottom
Ctrl+S Save menu
Ctrl+R Restart story
Ctrl+, Settings
Ctrl+H Keyboard help
Esc Close menu

On Mac, use Cmd instead of Ctrl.

Full documentation →

Reader Settings

These are controlled by readers in the Settings menu:

  • Theme: Light, dark, or auto (system preference)
  • Font: Serif, sans-serif, monospace, or dyslexia-friendly
  • Text size: Small, medium, large, extra-large
  • Line height: Tight, normal, loose
  • Autosave: On/off
  • Animations: On/off
  • Keyboard shortcuts: On/off
  • Tone indicators: On/off (if your story uses them)
  • Choice number hints: Auto, on, or off

Found a bug or have a feature idea?
Open an issue on GitHub, or use the feedback forms: Bug report · Feature request