Icon Repeater

Intermediate · 10 min read

Overview

The Icon Repeater lets you display a row, column, or grid of repeated icons whose count is driven by your CSV data. Instead of typing "HP: 3" on a card, you can show three heart icons. Instead of writing "Rating: 4", you can display four filled stars. Common use cases include:

Chitmunk offers two ways to show repeated icons:

Quick Start: Your First Icon Repeater

The fastest way to get repeating icons on your cards:

  1. Load a CSV with a numeric column. For example, a column called "HP" with values like 1, 2, 3, 4, 5 across your card rows.
  2. Drag the numeric column onto the canvas. Chitmunk creates a text element bound to that column.
  3. Select the element, then find Display Mode in the properties panel. Click Icon Repeater.
  4. Click "Choose Icon" and pick a heart icon from the Clip Art Browser.

That is it. The element now shows hearts instead of a number, three hearts for cards where HP is 3, five hearts where HP is 5. Use the card navigator to flip through rows and see the count change on each card.

Tip: If you do not have a CSV loaded yet, you can still set up an Icon Repeater with a static count. Enter a number in the "Count" field in the properties panel, then bind it to a CSV column later.

Quick Start: Inline Icons in Text

If you want to mix icons with regular text: like "Rating: 3 stars" but with actual star icons, use inline icon tokens.

  1. Open Icon Tokens from the tool strip (left edge of the canvas) and add an icon. Give it a short name like "star".
  2. In your CSV data, type: Rating: [icon:star x3]
  3. Or use a CSV column to drive the count: Rating: [icon:star x{{Stars}}]

When the card renders, the [icon:star x3] token is replaced with three inline star icons right inside the text flow. The icons scale to match your font size automatically.

Choosing Your Icon

When you set up an Icon Repeater element or add an icon to Icon Tokens, you choose the artwork from one of several sources:

Tip: Monochrome SVG icons work best for repeaters because you can recolor them to match each card's theme. Detailed full-color artwork can look busy when repeated many times at small sizes.

Layout Options

The Icon Repeater supports three layout modes that control how the icons are arranged within the element's bounding box:

The flow direction property controls the fill order within the layout. For horizontal layout, you can fill left-to-right or right-to-left. For vertical, top-to-bottom or bottom-to-top. For grid, the flow direction sets whether rows fill left-to-right or right-to-left.

Fine-Tuning

Once you have the basic layout working, the properties panel gives you precise control over the details:

Tip: If your icons look cramped, try increasing horizontal spacing to 2-4 px. A little breathing room makes a big visual difference, especially at small card sizes.

Fractional Icons

Sometimes your data includes fractional values, a card with 2.5 HP, or a 3.5-star rating. The Icon Repeater handles this gracefully by clipping the last icon to show a partial fill.

For example, if the count is 3.5, the repeater shows three full icons followed by a fourth icon that is clipped to show only its left half. This gives you a natural "half-heart" or "half-star" effect without needing separate half-icon artwork.

The clip direction property controls which edge the partial icon is clipped from:

Tip: Symmetrical icons like hearts and stars look great with fractional clipping. Asymmetrical icons (like a sword) may look awkward when clipped, test your chosen icon at 0.5 to make sure it reads well.

Inline Icons in Text

Inline icon tokens let you embed icons directly inside text elements and CSV data. The syntax is straightforward:

SyntaxResult
[icon:star]A single star icon
[icon:star x3]Three star icons in a row
[icon:star x{{Rating}}]Star icons repeated by the Rating CSV column
[icon:star:20]A single star icon at 20px size
[icon:star:20 x3]Three star icons at 20px size

Inline icons render at the same size as the surrounding text by default, or at the pixel size you specify after the second colon. They sit on the text baseline and flow naturally with the text, just like emoji characters.

Because the count can be driven by {{ColumnName}} template variables, each card in your deck can show a different number of icons. For example, a text element containing Cost: [icon:coin x{{Gold}}] would show "Cost:" followed by the appropriate number of coin icons for each card's Gold value.

You can mix multiple icon tokens in a single text element:

[icon:sword x{{ATK}}] Attack · [icon:shield x{{DEF}}] Defense

This displays a row of sword icons, the word "Attack", a separator, a row of shield icons, and the word "Defense", all in one text element.

Icon Repeater Properties Reference

Full reference for every property available on an Icon Repeater element:

PropertyTypeOptions / RangeDefault
Display ModeEnumText, Icon RepeaterText
Icon SourceImageClip Art Browser, upload, or Icon TokensNone
CountNumber / Binding0 - 99 (or {{Column}})1
LayoutEnumHorizontal, Vertical, GridHorizontal
Flow DirectionEnumLTR, RTL, TTB, BTTLTR
Icon SizeNumber4 - 200 px24
H SpacingNumber0 - 50 px2
V SpacingNumber0 - 50 px2
AlignmentEnumStart, Center, EndStart
Cross AlignmentEnumStart, Center, EndCenter
WrapBooleanOn / OffOff
Fractional DisplayBooleanOn / OffOn
Clip DirectionEnumLTR, RTL, TTB, BTTLTR
Icon ColorColorAny color (SVG icons only)Inherit
OpacityNumber0 - 100%100%

Inline Token Syntax Reference

Every supported inline icon token variant:

TokenDescriptionExample Output
[icon:name]Single icon, text-sizedOne heart at current font size
[icon:name x5]Fixed repeat countFive hearts in a row
[icon:name x{{Col}}]CSV-driven repeat countHearts matching the Col value
[icon:name:16]Single icon at explicit size (px)One heart at 16px
[icon:name:16 x5]Fixed count at explicit sizeFive hearts at 16px each
[icon:name:16 x{{Col}}]CSV-driven count at explicit sizeHearts at 16px, count from Col

Tip: Icon names in the token syntax are case-sensitive. If you named your icon "Star" in Icon Tokens, use [icon:Star], not [icon:star].

Tips & Best Practices

Ready to try it?

Open the editor, it's free, just sign in.

Start Designing