Crestron Components Lib - Showcase App

ch5-button: type

Type attribute

Possible values are danger, text, warning, info, success, default, primary, secondary
<div>
		<h5>normal button faces below:</h5>
		<ch5-button type="danger" label="Danger"></ch5-button>
		<ch5-button type="text" label="Text"></ch5-button>
		<ch5-button type="warning" label="Warning"></ch5-button>
		<ch5-button type="info" label="Info"></ch5-button>
		<ch5-button type="success" label="Success"></ch5-button>
		<ch5-button type="default" label="Default"></ch5-button>
		<ch5-button type="primary" label="Primary"></ch5-button>
		<ch5-button type="secondary" label="Secondary"></ch5-button>
</div>
<br/>
<div>
		<h5>selected button faces below:</h5>
		<ch5-button selected type="danger" label="Danger"></ch5-button>
		<ch5-button selected type="text" label="Text"></ch5-button>
		<ch5-button selected type="warning" label="Warning"></ch5-button>
		<ch5-button selected type="info" label="Info"></ch5-button>
		<ch5-button selected type="success" label="Success"></ch5-button>
		<ch5-button selected type="default" label="Default"></ch5-button>
		<ch5-button selected type="primary" label="Primary"></ch5-button>
		<ch5-button selected type="secondary" label="Secondary"></ch5-button>
</div>
normal button faces below:

selected button faces below:

Use receiveStateType attribute in order to change the button type through signal

<div>
		<h5>The type attribute is changed for the button below:</h5>
		<ch5-button type="danger" label="Danger" receivestatetype="current_type"></ch5-button>
</div>
<br /><br />
<div>
		<h5>Change the above button type attribute by clicking on the below buttons:</h5>
		<ch5-button type="primary" sendeventonclick="trigger_type_change_primary" label="Primary"></ch5-button>
		<ch5-button type="danger" sendeventonclick="trigger_type_change_danger" label="Danger"></ch5-button>
		<ch5-button type="success" sendeventonclick="trigger_type_change_success" label="Success"></ch5-button>
		<ch5-button type="warning" sendeventonclick="trigger_type_change_warning" label="Warning"></ch5-button>
</div>
<br/>
The type attribute is changed for the button below:


Change the above button type attribute by clicking on the below buttons:

Mutli-mode: Setting type attribute in ch5-button-mode overrides the type attribute in ch5-button.

<h5>Change the mode below from "0" to "1" in the 'HTML' editor.</h5>
<br/>

<ch5-button mode="0" stretch="width" label="Verify Type for ch5-button-mode" type="danger">
		<ch5-button-mode type="default" iconClass="fa fa-play"></ch5-button-mode>
		<ch5-button-mode type="warning" iconClass="fas fa-pause"></ch5-button-mode>
</ch5-button>

<hr/>

<h5>Change the mode (receiveStateMode) by clicking on the '+ Mode' / '- Mode' button.</h5>

<br/>

<ch5-button type="primary" sendeventonclick="trigger_type_increment_mode" iconClass="fas fa-plus" label="Mode"></ch5-button>
<ch5-button type="primary" sendeventonclick="trigger_type_decrement_mode" iconClass="fas fa-minus" label="Mode"></ch5-button>

<br/><br/>

<ch5-button receiveStateMode="current_mode" stretch="width" label="Verify Type for ch5-button-mode" type="danger">
		<ch5-button-mode type="success" iconClass="fa fa-play"></ch5-button-mode>
		<ch5-button-mode type="warning" iconClass="fas fa-pause"></ch5-button-mode>
		<ch5-button-mode type="danger" iconClass="fab fa-amilia"></ch5-button-mode>
		<ch5-button-mode type="text" iconClass="fas fa-anchor"></ch5-button-mode>
		<ch5-button-mode type="info" iconClass="fas fa-battery-quarter"></ch5-button-mode>
		<ch5-button-mode type="primary" iconClass="fas fa-at"></ch5-button-mode>
		<ch5-button-mode type="secondary" iconClass="fab fa-apple"></ch5-button-mode>
</ch5-button>
Change the mode below from "0" to "1" in the 'HTML' editor.


Change the mode (receiveStateMode) by clicking on the '+ Mode' / '- Mode' button.



Mutli-mode: Setting type attribute in ch5-button-mode-state overrides the type attribute in ch5-button-mode and ch5-button.

<h5>Click on the button to see the change of 'type' attribute based on 'state'.</h5>

<br/>

<ch5-button label="Verify Type for Mode State" stretch="width" type="text" mode="0" receivestateselected="receive_selected_state" sendeventonclick="trigger_set_selected_state">
		<ch5-button-mode type="secondary">
				<ch5-button-mode-state state="normal" iconclass="fa fa-play" type="warning"></ch5-button-mode-state>
				<ch5-button-mode-state state="pressed" iconclass="fa-2x fas fa-circle-notch" type="info"></ch5-button-mode-state>
				<ch5-button-mode-state state="selected" iconclass="fas fa-pause" type="success"></ch5-button-mode-state>
		</ch5-button-mode>
</ch5-button>
Click on the button to see the change of 'type' attribute based on 'state'.