A dice icon that draws itself on hover and tumbles over when rolled, landing on six with its pips in the result color, then goes back on its own.
React + HTML
無料
状態
下にさらに表示 ↓
組み込み済み
付属するもの
ライトとダークテーマのカラーを使用
パッケージ…
コードサイズ…
変更のたびに検証
型チェックTypeScript の strict モード
Lint とフォーマットESLint · Prettier
テストとビルドライトとダークのスクリーンショット
セキュリティ監査重大・高リスクの脆弱性なし
パッケージの公開期間すべてのバージョンが7日以上前に公開
アイドル時の CPU静止時は半コア未満、30 fps 以下
コード
このコンポーネントに気になる点がありますか? フィードバックを送る ›
dice-iconHTML
index.htmlpageThe markup to copy, between the copy-from-here comments, on a demo page.
style.cssstyleThe styles: copy them into your CSS.
script.jsscriptThe behavior: load it after the markup.
index.html
The markup to copy, between the copy-from-here comments, on a demo page.
読み込み中…
こんな用途に
Roll and randomize buttons, shuffle a pick, games and random name or color pickers.
仕組み
Hover it and the die draws in, then its five pips pop in. Roll it and the die hops and tumbles half a turn, lands with a squash, and its middle pip splits in two so it shows six, in the result color. Then it goes back.