Molds"

From Documentation
m ((via JWB))
Line 27: Line 27:
 
</source>
 
</source>
  
 +
= Supported Mold =
 
To know which mold a component supports, please refer to [[ZK Component Reference]].
 
To know which mold a component supports, please refer to [[ZK Component Reference]].
  
=Version History=
+
=Custom Mold=
 
+
To largely change how a component renders in a browser, see [[ZK_Client-side_Reference/Customization/Custom_Mold]]
{| class='wikitable' | width="100%"
 
! Version !! Date !! Content
 
|-
 
| &nbsp;
 
| &nbsp;
 
| &nbsp;
 
|}
 
  
 
{{ZKDevelopersReferencePageFooter}}
 
{{ZKDevelopersReferencePageFooter}}

Revision as of 04:51, 4 October 2023

A component could have multiple different visual appearances. Each appearance is called a mold. A mold is basically a combination of a DOM structure plus CSS. That is, it is the visual representation of a component. Developers could dynamically change the mold by use of Component.setMold(String).

All components support at least a mold called default, which is the default value. Some components might have support two or more molds. For example, tabbox supports both default and accordion molds.

If tabbox's mold is not set, it uses the default mold.

<tabbox>
	<tabs>
		<tab label="First tab" />
		<tab label="Second tab" />
	</tabs>
	...
</tabbox>

And you could set tabbox's mold to "accordion" to change the look.

<tabbox mold="accordion">
	<tabs>
		<tab label="First tab" />
		<tab label="Second tab" />
	</tabs>
	...
</tabbox>

Supported Mold

To know which mold a component supports, please refer to ZK Component Reference.

Custom Mold

To largely change how a component renders in a browser, see ZK_Client-side_Reference/Customization/Custom_Mold



Last Update : 2023/10/04

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.