Template:Chip container: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><div class="chip-container">{{#if:{{{title|}}}|<h2 class="chip-container-label">{{{title}}}</h2>}}<div class="chips">{{#arraymaptemplate:{{{1|}}}|{{{template}}}|,|}}</div></div>
<includeonly><div class="chip-container">{{#if:{{{title|}}}|<h2 class="chip-container-label">{{{title}}}</h2>}}<div class="chips">{{#arraymaptemplate:{{{1|}}}|{{{template}}}|,|}}</div></div>
</includeonly><noinclude>
</includeonly><noinclude>
An optional wrapper for Chip templates.
The Chip container template is an optional wrapper for chip templates, designed to group multiple chips together within a styled container.
==Usage==


== Usage ==
Use this template to organize multiple chips with a common theme or title. Each chip is rendered using a specified sub-template, and the list of items is processed in sequence.
 
===Syntax===
====Ink chips====
<pre>{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container}}</pre>
<pre>{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container}}</pre>
{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container}}
{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container}}
<pre>{{Chip container|GR 2700, GR 3750, GR 3770|template=Machine chip}}</pre>
<pre>{{Chip container|{{#ask:[[Category:Riso compatible inks]]|format=plainlist|headers=hide|link=none|limit=100}}|template=Ink chip|title=Riso Compatible Inks}}</pre>{{Chip container|{{#ask:[[Category:Riso compatible inks]]|format=plainlist|headers=hide|link=none|limit=100}}|template=Ink chip|title=Riso Compatible Inks}}
====Machine chips====
<pre>{{Chip container|GR2700, GR3750, GR3770|template=Machine chip}}</pre>
{{Chip container|GR2700, GR3750, GR3770|template=Machine chip}}
{{Chip container|GR2700, GR3750, GR3770|template=Machine chip}}
</noinclude>
===Parameters===
<pre>{{Chip container|<items>|template=<sub-template>|title=<container title>}}</pre>
* <code>1</code> (required): A comma-separated list of items to display as chips. You can provide these items:
**Directly, e.g., <code>Yellow, Cornflower, Burgundy</code>
**From a comma-separated array.
* <code>template</code> (required): A valid sub-template to format the chips. Accepted values include:
**<code>Ink chip</code>
**<code>Machine chip</code>
**<code>Brand chip</code>
* <code>title</code> (optional): A title for the container, displayed as a header. If omitted, no header will appear, but the chips will still be rendered.</noinclude>

Revision as of 02:38, 12 December 2024

The Chip container template is an optional wrapper for chip templates, designed to group multiple chips together within a styled container.

Usage

Use this template to organize multiple chips with a common theme or title. Each chip is rendered using a specified sub-template, and the list of items is processed in sequence.

Syntax

Ink chips

{{Chip container|Yellow, Cornflower, Burgundy, Medium Blue, Fluorescent Pink|template=Ink chip|title=Chip Container}}
{{Chip container|{{#ask:[[Category:Riso compatible inks]]|format=plainlist|headers=hide|link=none|limit=100}}|template=Ink chip|title=Riso Compatible Inks}}

Riso Compatible Inks

Machine chips

{{Chip container|GR2700, GR3750, GR3770|template=Machine chip}}

Parameters

{{Chip container|<items>|template=<sub-template>|title=<container title>}}
  • 1 (required): A comma-separated list of items to display as chips. You can provide these items:
    • Directly, e.g., Yellow, Cornflower, Burgundy
    • From a comma-separated array.
  • template (required): A valid sub-template to format the chips. Accepted values include:
    • Ink chip
    • Machine chip
    • Brand chip
  • title (optional): A title for the container, displayed as a header. If omitted, no header will appear, but the chips will still be rendered.