ListButtonは、List Svelteコンポーネント内で使用するように設計されています。
以下のコンポーネントが含まれています。
ListButton| 名前 | タイプ | デフォルト | 説明 |
|---|---|---|---|
| colors | オブジェクト | Tailwind CSSカラークラスを含むオブジェクト | |
| colors.activeBgIos | 文字列 | 'active:bg-primary active:bg-opacity-15' | |
| colors.activeBgMaterial | 文字列 | '' | |
| colors.textIos | 文字列 | 'text-primary' | |
| colors.textMaterial | 文字列 | 'text-md-light-primary dark:text-md-dark-primary' | |
| colors.touchRipple | 文字列 | 'touch-ripple-primary' | |
| href | 文字列 | ボタンのリンク`href`属性 | |
| linkComponent | 文字列 | 'a' | ボタンHTML要素 |
| linkProps | 任意 | リンク/ボタンに渡す追加のプロパティ(属性)を含むオブジェクト | |
| target | 文字列 | ボタンのリンク`target`属性 | |
| touchRipple | ブール値 | true | Materialテーマでタッチリップル効果を有効にします。 |
| type | 文字列 | 未定義 | ボタンの`type`属性(`linkComponent: 'button'`で`<button>`としてレンダリングされる場合) |
| value | 任意 | ボタンの`type`属性(`linkComponent: 'button'`で`<button>`としてレンダリングされる場合) | |
| onClick | function(e) | `click`イベントハンドラ |
<script>import {Page,Navbar,NavbarBackLink,List,ListButton,} from 'konsta/svelte';</script><Page><Navbar title="List Button" /><List><ListButton>Button 1</ListButton><ListButton>Button 2</ListButton><ListButton>Button 3</ListButton></List><List inset><ListButton>Button 1</ListButton><ListButton>Button 2</ListButton><ListButton>Button 3</ListButton></List><List inset><ListButton className="k-color-brand-red">Red Button</ListButton></List></Page>