Template:Expandable button/doc

This template creates a button that expands when clicked

Usage

To use this template, you must enter the parameters "text", "expand-text" or "collapse-text" (preferably text) and then enter the parameter "contents" to control the what appears when you click the button. The button is by default blue but you can control the color with the parameter "background-color".

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Expandable button in articles based on its TemplateData.

TemplateData for Expandable button

A expandable button

Template parameters

ParameterDescriptionTypeStatus
texttext

Value of both the open and close text if they aren't entered.

Default
Open for expand-text, close for collapse-text.
Contentsuggested
contentscontents

The contents of the button.

Contentsuggested
expand-textexpand-text

The text of the open text.

Default
Value of the parameter text.
Contentsuggested
collapse-textcollapse-text

The text of the close text.

Default
Value of the parameter text.
Contentsuggested
background-colorbackground-color

Color of the background of the button.

Default
#3266cc
Stringsuggested
idid

The unique id of button. Required for using this template multiple times on the same page.

Default
id
Stringsuggested
text-colortext-color

The color of the text in the button.

Default
white
Stringoptional
stylestyle

Other style you would like to add.

Stringoptional
border-radiusborder-radius

The roundness of the button.

Default
2px
Numberoptional
paddingpadding

The padding of the button.

Default
5px
Numbersuggested
contents-top-bordercontents-top-border

The styling of the border between the text and contents.

Stringoptional
text-aligntext-align

The alignment of the text, expand-text and collapse-text parameters.

Default
center
Stringoptional


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.