UNPKG

carbon-components-angular

Version:
1,221 lines (1,133 loc) 146 kB
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>carbon-components-angular documentation</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="../images/favicon.ico"> <link rel="stylesheet" href="../styles/style.css"> <link rel="stylesheet" href="../styles/dark.css"> <style> footer.carbon { position: absolute; bottom: 0; width: 100%; z-index: 9999; } #root > div { /* * Subtracting the height of the footer to prevent * overlaying the footer ontop of content */ height: calc(100vh - 48px); } </style> </head> <body> <script> // Blocking script to avoid flickering dark mode // Dark mode toggle button var useDark = window.matchMedia('(prefers-color-scheme: dark)'); var darkModeState = useDark.matches; var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input'); var $darkModeToggles = document.querySelectorAll('.dark-mode-switch'); var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state'); function checkToggle(check) { for (var i = 0; i < $darkModeToggleSwitchers.length; i++) { $darkModeToggleSwitchers[i].checked = check; } } function toggleDarkMode(state) { if (window.localStorage) { localStorage.setItem('compodoc_darkmode-state', state); } checkToggle(state); const hasClass = document.body.classList.contains('dark'); if (state) { for (var i = 0; i < $darkModeToggles.length; i++) { $darkModeToggles[i].classList.add('dark'); } if (!hasClass) { document.body.classList.add('dark'); } } else { for (var i = 0; i < $darkModeToggles.length; i++) { $darkModeToggles[i].classList.remove('dark'); } if (hasClass) { document.body.classList.remove('dark'); } } } useDark.addEventListener('change', function (evt) { toggleDarkMode(evt.matches); }); if (darkModeStateLocal) { darkModeState = darkModeStateLocal === 'true'; } toggleDarkMode(darkModeState); </script> <div class="navbar navbar-default navbar-fixed-top d-md-none p-0"> <div class="d-flex"> <a href="../" class="navbar-brand">carbon-components-angular documentation</a> <button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button> </div> </div> <div class="xs-menu menu" id="mobile-menu"> <div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu> </div> <div class="container-fluid main"> <div class="row main"> <div class="d-none d-md-block menu"> <compodoc-menu mode="normal"></compodoc-menu> </div> <!-- START CONTENT --> <div class="content component"> <div class="content-data"> <ol class="breadcrumb"> <li class="breadcrumb-item">Components</li> <li class="breadcrumb-item" > Toggle</li> </ol> <ul class="nav nav-tabs" role="tablist"> <li class="nav-item"> <a href="#info" class="nav-link active" role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a> </li> <li class="nav-item"> <a href="#source" class="nav-link" role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a> </li> <li class="nav-item"> <a href="#tree" class="nav-link" role="tab" id="tree-tab" data-bs-toggle="tab" data-link="dom-tree">DOM Tree</a> </li> </ul> <div class="tab-content"> <div class="tab-pane fade active in" id="info"><p class="comment"> <h3>File</h3> </p> <p class="comment"> <code>src/toggle/toggle.component.ts</code> </p> <p class="comment"> <h3>Description</h3> </p> <p class="comment"> <p>Get started with importing the module:</p> <b>Example :</b><div><pre class="line-numbers"><code class="language-typescript">import { ToggleModule } from &#39;carbon-components-angular&#39;;</code></pre></div><b>Example :</b><div><pre class="line-numbers"><code class="language-html">&lt;cds-toggle [(ngModel)]=&quot;toggleState&quot;&gt;Toggle&lt;/cds-toggle&gt;</code></pre></div><p><a href="../../?path=/story/components-toggle--basic">See demo</a></p> </p> <p class="comment"> <h3>Extends</h3> </p> <p class="comment"> <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </p> <section data-compodoc="block-metadata"> <h3>Metadata</h3> <table class="table table-sm table-hover metadata"> <tbody> <tr> <td class="col-md-3">providers</td> <td class="col-md-9"> <code><a href="../components/Toggle.html" target="_self" >{ provide: NG_VALUE_ACCESSOR, useExisting: Toggle, multi: true }</a></code> </td> </tr> <tr> <td class="col-md-3">selector</td> <td class="col-md-9"><code>cds-toggle, ibm-toggle</code></td> </tr> <tr> <td class="col-md-3">template</td> <td class="col-md-9"><pre class="line-numbers"><code class="language-html">&lt;ng-container *ngIf&#x3D;&quot;!skeleton; else skeletonTemplate;&quot;&gt; &lt;button class&#x3D;&quot;cds--toggle__button&quot; [disabled]&#x3D;&quot;disabled&quot; [id]&#x3D;&quot;id&quot; role&#x3D;&quot;switch&quot; type&#x3D;&quot;button&quot; [attr.aria-checked]&#x3D;&quot;checked&quot; (click)&#x3D;&quot;onClick($event)&quot; [attr.aria-label]&#x3D;&quot;ariaLabel&quot;&gt; &lt;/button&gt; &lt;label class&#x3D;&quot;cds--toggle__label&quot; [for]&#x3D;&quot;id&quot;&gt; &lt;span class&#x3D;&quot;cds--toggle__label-text&quot; [ngClass]&#x3D;&quot;{ &#x27;cds--visually-hidden&#x27;: hideLabel }&quot;&gt; &lt;ng-container *ngIf&#x3D;&quot;!isTemplate(label)&quot;&gt;{{label}}&lt;/ng-container&gt; &lt;ng-template *ngIf&#x3D;&quot;isTemplate(label)&quot; [ngTemplateOutlet]&#x3D;&quot;label&quot;&gt;&lt;/ng-template&gt; &lt;/span&gt; &lt;div class&#x3D;&quot;cds--toggle__appearance&quot; [ngClass]&#x3D;&quot;{ &#x27;cds--toggle__appearance--sm&#x27;: size &#x3D;&#x3D;&#x3D; &#x27;sm&#x27; }&quot;&gt; &lt;div class&#x3D;&quot;cds--toggle__switch&quot; [ngClass]&#x3D;&quot;{ &#x27;cds--toggle__switch--checked&#x27;: checked }&quot;&gt; &lt;svg *ngIf&#x3D;&quot;size &#x3D;&#x3D;&#x3D; &#x27;sm&#x27;&quot; class&#x3D;&#x27;cds--toggle__check&#x27; width&#x3D;&quot;6px&quot; height&#x3D;&quot;5px&quot; viewBox&#x3D;&quot;0 0 6 5&quot;&gt; &lt;path d&#x3D;&quot;M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z&quot; /&gt; &lt;/svg&gt; &lt;/div&gt; &lt;span class&#x3D;&quot;cds--toggle__text&quot;&gt; {{(hideLabel ? label : (getCheckedText() | async))}} &lt;/span&gt; &lt;/div&gt; &lt;/label&gt; &lt;/ng-container&gt; &lt;ng-template #skeletonTemplate&gt; &lt;div class&#x3D;&quot;cds--toggle__skeleton-circle&quot;&gt;&lt;/div&gt; &lt;div class&#x3D;&quot;cds--toggle__skeleton-rectangle&quot;&gt;&lt;/div&gt; &lt;/ng-template&gt; </code></pre></td> </tr> </tbody> </table> </section> <section data-compodoc="block-index"> <h3 id="index">Index</h3> <table class="table table-sm table-bordered index-table"> <tbody> <tr> <td class="col-md-4"> <h6><b>Properties</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <span class="modifier">Protected</span> <a href="#_offValues" >_offValues</a> </li> <li> <span class="modifier">Protected</span> <a href="#_onValues" >_onValues</a> </li> <li> <a href="#id" >id</a> </li> <li> <span class="modifier"></span> <a href="#toggleClass" >toggleClass</a> </li> <li> <span class="modifier">Static</span> <a href="#toggleCount" >toggleCount</a> </li> <li> <a href="#_checked" >_checked</a> </li> <li> <a href="#_indeterminate" >_indeterminate</a> </li> <li> <span class="modifier">Static</span> <a href="#checkboxCount" >checkboxCount</a> </li> <li> <a href="#currentCheckboxState" >currentCheckboxState</a> </li> <li> <span class="modifier"></span> <a href="#inputCheckbox" >inputCheckbox</a> </li> <li> <a href="#onTouched" >onTouched</a> </li> <li> <a href="#propagateChange" >propagateChange</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>Methods</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#emitChangeEvent" >emitChangeEvent</a> </li> <li> <a href="#getCheckedText" >getCheckedText</a> </li> <li> <a href="#getOffText" >getOffText</a> </li> <li> <a href="#getOnText" >getOnText</a> </li> <li> <span class="modifier">Public</span> <a href="#isTemplate" >isTemplate</a> </li> <li> <a href="#setDisabledState" >setDisabledState</a> </li> <li> <span class="modifier"></span> <a href="#focusOut" >focusOut</a> </li> <li> <a href="#ngAfterViewInit" >ngAfterViewInit</a> </li> <li> <a href="#onChange" >onChange</a> </li> <li> <a href="#onClick" >onClick</a> </li> <li> <span class="modifier">Public</span> <a href="#registerOnChange" >registerOnChange</a> </li> <li> <span class="modifier">Public</span> <a href="#registerOnTouched" >registerOnTouched</a> </li> <li> <span class="modifier">Private</span> <a href="#setChecked" >setChecked</a> </li> <li> <span class="modifier">Public</span> <a href="#toggle" >toggle</a> </li> <li> <a href="#transitionCheckboxState" >transitionCheckboxState</a> </li> <li> <span class="modifier">Public</span> <a href="#writeValue" >writeValue</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>Inputs</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#ariaLabel" >ariaLabel</a> </li> <li> <a href="#hideLabel" >hideLabel</a> </li> <li> <a href="#label" >label</a> </li> <li> <a href="#offText" >offText</a> </li> <li> <a href="#onText" >onText</a> </li> <li> <a href="#size" >size</a> </li> <li> <a href="#skeleton" >skeleton</a> </li> <li> <a href="#ariaLabelledby" >ariaLabelledby</a> </li> <li> <a href="#checked" >checked</a> </li> <li> <a href="#disabled" >disabled</a> </li> <li> <a href="#id" >id</a> </li> <li> <a href="#indeterminate" >indeterminate</a> </li> <li> <a href="#name" >name</a> </li> <li> <a href="#required" >required</a> </li> <li> <a href="#value" >value</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>Outputs</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#checkedChange" >checkedChange</a> </li> <li> <a href="#click" >click</a> </li> <li> <a href="#indeterminateChange" >indeterminateChange</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>HostBindings</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#class.cds--form-item" >class.cds--form-item</a> </li> <li> <a href="#class.cds--toggle" >class.cds--toggle</a> </li> <li> <a href="#class.cds--toggle--disabled" >class.cds--toggle--disabled</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>HostListeners</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#focusout" >focusout</a> </li> </ul> </td> </tr> <tr> <td class="col-md-4"> <h6><b>Accessors</b></h6> </td> </tr> <tr> <td class="col-md-4"> <ul class="index-list"> <li> <a href="#offText" >offText</a> </li> <li> <a href="#onText" >onText</a> </li> <li> <a href="#disabledClass" >disabledClass</a> </li> <li> <a href="#formItem" >formItem</a> </li> </ul> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-constructor"> <h3 id="constructor">Constructor</h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <code>constructor(changeDetectorRef: ChangeDetectorRef, i18n: <a href="../injectables/I18n.html" target="_self">I18n</a>)</code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="170" class="link-to-prism">src/toggle/toggle.component.ts:170</a></div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Creates an instance of Toggle.</p> </div> <div> <b>Parameters :</b> <table class="params"> <thead> <tr> <td>Name</td> <td>Type</td> <td>Optional</td> </tr> </thead> <tbody> <tr> <td>changeDetectorRef</td> <td> <code>ChangeDetectorRef</code> </td> <td> No </td> </tr> <tr> <td>i18n</td> <td> <code><a href="../injectables/I18n.html" target="_self" >I18n</a></code> </td> <td> No </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-inputs"> <h3 id="inputs">Inputs</h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="ariaLabel"></a> <b>ariaLabel</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:151</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Set <code>aria-label</code> property for the button when label is empty</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="hideLabel"></a> <b>hideLabel</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>false</code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:146</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Set to <code>true</code> to hide the toggle label &amp; set toggle on/off text to label.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="label"></a> <b>label</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code>string | TemplateRef&lt;any&gt;</code> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <a href="" data-line="138" class="link-to-prism">src/toggle/toggle.component.ts:138</a></div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Text that is set as the label of the toggle.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="offText"></a> <b>offText</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code>string | Observable</code> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <a href="" data-line="116" class="link-to-prism">src/toggle/toggle.component.ts:116</a></div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Text that is set on the left side of the toggle.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="onText"></a> <b>onText</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code>string | Observable</code> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <a href="" data-line="128" class="link-to-prism">src/toggle/toggle.component.ts:128</a></div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Text that is set on the right side of the toggle.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="size"></a> <b>size</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code>&quot;sm&quot; | &quot;md&quot;</code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>&quot;md&quot;</code> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <a href="" data-line="142" class="link-to-prism">src/toggle/toggle.component.ts:142</a></div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Size of the toggle component.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="skeleton"></a> <b>skeleton</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>false</code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:153</a></code> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="ariaLabelledby"></a> <b>ariaLabelledby</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:109</a></code> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="checked"></a> <b>checked</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:148</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Sets the <code>checked</code> state. <code>true</code> for checked, <code>false</code> for unchecked</p> <p>Allows double binding with the <code>checkedChange</code> Output.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="disabled"></a> <b>disabled</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>false</code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:83</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Set to <code>true</code> for a disabled checkbox.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="id"></a> <b>id</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code> </td> </tr> <tr> <td class="col-md-4"> <i>Default value : </i><code>&#x60;checkbox-${Checkbox.checkboxCount}&#x60;</code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:99</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>The unique id for the checkbox component.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="indeterminate"></a> <b>indeterminate</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:116</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Set the checkbox&#39;s indeterminate state to match the parameter and transition the view to reflect the change.</p> <p>Allows double binding with the <code>indeterminateChange</code> Output.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="name"></a> <b>name</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:95</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Sets the name attribute on the <code>input</code> element.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="required"></a> <b>required</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:103</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Reflects the required attribute of the <code>input</code> element.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="value"></a> <b>value</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="../miscellaneous/typealiases.html#CheckboxValue" target="_self" >CheckboxValue</a></code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:107</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Sets the value attribute on the <code>input</code> element.</p> </div> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-outputs"> <h3 id="outputs">Outputs</h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="checkedChange"></a> <b>checkedChange</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code>EventEmitter</code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:169</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Emits an event when the value of the checkbox changes.</p> <p>Allows double biding with the <code>checked</code> Input.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="click"></a> <b>click</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code>EventEmitter</code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:162</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Emits click event.</p> </div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="indeterminateChange"></a> <b>indeterminateChange</b> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code>EventEmitter</code> </td> </tr> <tr> <td class="col-md-4" colspan="2"> <div class="io-line">Inherited from <code><a href="../components/Checkbox.html" target="_self" >Checkbox</a></code> </div> </td> </tr> <tr> <td class="col-md-2" colspan="2"> <div class="io-line">Defined in <code><a href="../components/Checkbox.html#source" target="_self" >Checkbox:175</a></code> </div> </td> </tr> <tr> <td class="col-md-4"> <div class="io-description"><p>Emits event notifying other classes when a change in state occurs specifically on an indeterminate checkbox.</p> </div> </td> </tr> </tbody> </table> </section> <section data-compodoc="block-properties"> <h3>HostBindings</h3> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4"> <a name="class.cds--form-item"></a> <span class="name"> <span ><b>class.cds--form-item</b></span> <a href="#class.cds--form-item"><span class="icon ion-ios-link"></span></a> </span> </td> </tr> <tr> <td class="col-md-4"> <i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code> </td> </tr> <tr> <td class="col-md-4"> <div class="io-line">Defined in <a href="" data-line="160" class="link-to-prism">src/toggle/toggle.component.ts:160</a></div> </td> </tr> </tbody> </table> <table class="table table-sm table-bordered"> <tbody> <tr> <td class="col-md-4">