Checkbox

不確定状態を持つネイティブのチェックボックス。フィールドでラベルと組み合わせ、フォームや「すべて選択」のリストに使えます。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 対応

使い方

Partly read.

インポート

ts
import {
  SoneCheckboxDirective,
} from "@surface-one/angular/checkbox";

API リファレンス

SoneCheckboxDirectiveディレクティブ

`input[soneCheckbox]` — the native checkbox (spartan/ui Checkbox, native first): it stays an `<input type="checkbox">`, so `[checked]`, `(change)`, `ngModel`, `formControl`, `required` and a `<label for>` all work as they do on any checkbox, and the global form styles draw it. The directive adds the mixed state the markup cannot express: `[(indeterminate)]`, cleared when the user toggles it.

セレクター
input[soneCheckbox]
エクスポート名
soneCheckbox
入力
名前型 デフォルト
indeterminate双方向

The mixed state ("some of them") — `[(indeterminate)]`; a click clears it.

booleanfalse