🔥 新プロジェクトのご紹介 t0ggles - 究極のプロジェクト管理ツール! 🔥

リストボタン React コンポーネント

リストボタンはリスト React コンポーネント内で使用することを想定しています。

リストボタンコンポーネント

以下のコンポーネントが含まれています

  • ListButton

ListButton Props

名前タイプデフォルト説明
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'
component文字列'li'

コンポーネントのHTML要素

href文字列

ボタンのリンク href 属性

linkComponent文字列'a'

ボタンHTML要素

linkProps任意

リンク/ボタンに渡す追加のプロパティ(属性)を持つオブジェクト

target文字列

ボタンのリンク target 属性

touchRipple真偽値true

マテリアルテーマでタッチリップルエフェクトを有効にします

type文字列未定義

ボタンの type 属性 (linkComponent: 'button'<button> としてレンダリングされる場合)

value任意

ボタンの type 属性 (linkComponent: 'button'<button> としてレンダリングされる場合)

ListButton.jsx
import React from 'react';
import { Page, Navbar, NavbarBackLink, List, ListButton } from 'konsta/react';
export default function ListButtonPage() {
return (
<Page>
<Navbar
title="List Button"
/>
<List strong outlineIos>
<ListButton>Button 1</ListButton>
<ListButton>Button 2</ListButton>
<ListButton>Button 3</ListButton>
</List>
<List inset strong>
<ListButton>Button 1</ListButton>
<ListButton>Button 2</ListButton>
<ListButton>Button 3</ListButton>
</List>
<List inset strong>
<ListButton className="k-color-brand-red">Red Button</ListButton>
</List>
</Page>
);
}
コードライセンス MIT.
2022 © Konsta UI by nolimits4web.