Template:Drop down list/doc

Kufuma Wikipedia

Usage[kulemba source]

This template can be transcluded to display a Drop down list. This template had 3 parameters (described below). The Id parameter is very important if you are using 2 drop down lists on the same page.

Parameters[kulemba source]

This template contains 11 parameters for different purposes:

Name[kulemba source]

This is the name parameter that shall display the name of the list, defaults to 'Text'. To set the name parameter type {{Drop down list|Name=Items|Value1=One|Value2=Two|Value3=Three}} which will render as:


As another examples, links can also be used as names, as shown below:

{{Drop down list|Name=[[WP:TW|TW]]}} renders as


Values[kulemba source]

The list can hold up to 8 values i.e the text within the list. To add the values type {{Drop down list|Name=Name|Value1=Hello|Value2=Wikipedia|Value3=Blah!}} and so on until

Value8 .
The values support both Wikilinks and external links i.e you can also type {{Drop down list|Name=Name|Value1=[[Hello]]|Value2=[[Wikipedia|'pedia]]|Value3=[https://www.google.co.in/ Google]}} which will render as


Note that any blank parameters will be omitted when rendering the template.

Id[kulemba source]

If you are using more than one drop down list on the same page this parameter is very important. The Id parameter for each list should be different and unique (if using more than one on the same page). To set the ID type {{Drop down list|id=Your Id name}}

<div class="dropdown">
  <button class="dropbtn">Dropdown</button>
  <div class="dropdown-content">
    <a href="#">Link 1</a>
    <a href="#">Link 2</a>
    <a href="#">Link 3</a>
  </div>
</div>

.

Colors[kulemba source]

Additionally, the background and border of the dropdown can also be customized. When either parameter is left blank, it will default to the template's white background and grey-ish border colors.

To change the background color, set a value for the parameter background-color.

{{Drop down list|background-color=#444654|Name=Items|Value1=One|Value2=Two|Value3=Three}}

Which will render as:



This can be set to none to effectively disable the background.

{{Drop down list|background-color=none|Name=Items|Value1=One|Value2=Two|Value3=Three}}

Which will render as:


Similarly, you can change the border color by setting a value for the parameter border-color.

{{Drop down list|border-color=black|Name=Items|Value1=One|Value2=Two|Value3=Three}}

Which will render as:


This can also be set to none to also disable the border.

{{Drop down list|border-color=red|Name=Items|Value1=One|Value2=Two|Value3=Three}}

Which will render as: