Jump to content

Template:Search: Difference between revisions

From The Petit Planet Wiki
Created Template:Search
 
mNo edit summary
 
Line 5: Line 5:
Template that creates a generic search input box.
Template that creates a generic search input box.


==Usage==
==Syntax==
<pre>{{Search|dataKey=|placeholder=}}</pre>
<pre>{{Search|dataKey=|placeholder=}}</pre>
* <code>dataKey</code> &mdash; The data-* attribute that the filter-element will be searched/filtered on. Default: <code>name</code>
* <code>dataKey</code> &mdash; The data-* attribute that the filter-element will be searched/filtered on. Default: <code>name</code>

Latest revision as of 11:18, 20 November 2025

Source: Template:Search

Template that creates a generic search input box.

Syntax[edit source]

{{Search|dataKey=|placeholder=}}
  • dataKey — The data-* attribute that the filter-element will be searched/filtered on. Default: name
  • placeholder — Placeholder text in the search
  • width — Adjust width of the search input box
  • margin-top and margin-bottom — Adjust the margins of the search input box. Default: 0.5rem

Examples[edit source]

{{Search}}
{{Search|dataKey=sample|placeholder=Example placeholder}}