コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
売上
プラットフォームおよびマーケットプレイス
資金管理
Developer resources
概要
バージョン管理
変更ログ
API バージョンのアップグレード
SDK バージョンをアップグレードする
Tools
SDK
API
テスト
ワークベンチ
イベントの送信先
ワークフロー
Stripe CLI
Stripe Shell
開発者ダッシュボード
エージェントツールキット
LLM を使用した構築Visual Studio Code をご利用の場合Stripe 健全性アラートファイルのアップロード
セキュリティとプライバシー
セキュリティ
プライバシー
Stripe を拡張する
Stripe Apps
    概要
    始める
    アプリを作成する
    Stripe アプリの仕組み
    サンプルアプリ
    アプリを構築する
    シークレットを保存
    API 認証方法
    認証フロー
    サーバー側のロジック
    イベントのリッスン
    さまざまな環境を処理
    サンドボックスのサポートを有効にする
    アプリの設定ページ
    UI を構築する
    アカウント登録
    アプリを配布する
    配布オプション
    アプリをアップロード
    バージョンとリリース
    アプリをテストする
    アプリを公開する
    自分のアプリを宣伝する
    ディープリンクを追加する
    インストールリンクを作成
    UI 拡張機能で役割を割り当て
    インストール後のアクション
    アプリのアナリティクス
    アプリの埋め込みコンポーネント
    サードパーティーの Stripe アプリを埋め込む
    Stripe Apps に移行
    拡張機能を移行または構築
    Stripe Apps または Stripe Connect にプラグインを移行
    参照情報
    アプリマニフェスト
    CLI
    拡張 SDK
    権限
    ビューポート
    設計パターン
    コンポーネント
      アコーディオン
      バッジ
      バナー
      BarChart
      ボックス
      ボタン
      ButtonGroup
      チェックボックス
      チップ
      ContextView
      DateField
      ディバイダー
      FocusView
      FormFieldGroup
      アイコン
      Img
      インライン
      LineChart
      Link
      リスト
      メニュー
      PropertyList
      ラジオ
      選択してください
      SettingsView
      SignInView
      Sparkline
      スピナー
      切り替える
      テーブル
      タブ
      タスクリスト
      テキスト領域
      テキストフィールド
      トースト
      ツールチップ
Stripe のコネクター
パートナー
Partner Ecosystem
パートナー認定
ホームDeveloper resourcesStripe AppsComponents

注

このページはまだ日本語ではご利用いただけません。より多くの言語で文書が閲覧できるように現在取り組んでいます。準備が整い次第、翻訳版を提供いたしますので、もう少しお待ちください。

Stripe Apps の List コンポーネント

事前設定されたさまざまなフォーマットで情報のリストを表示します。

ページをコピー

List コンポーネントをアプリに追加するには、以下のようにします。

import {List, ListItem} from '@stripe/ui-extension-sdk/ui';

リストアイテムに対する press イベントに応答するには、onAction ハンドラを使用します。

サンプルを読み込み中...
<Box css={{ backgroundColor: 'surface', padding: 'medium', borderRadius: 'medium', }} > <List onAction={(id: string | number) => console.log(`Pressed row #${id}`)} aria-label="Example of a List" > <ListItem value="$100.00" id="1" title={<Box>Payment #1862</Box>} secondaryTitle={<Box>customer@test.com</Box>} /> <ListItem value="$63.00" id="2" title={<Box>Payment #9273</Box>} secondaryTitle={<Box>frank@example.com</Box>} /> <ListItem value="$7,471.62" id="3" title={<Box>Payment #643</Box>} secondaryTitle={<Box>robert@google.com</Box>} /> <ListItem value="$871.01" id="4" title={<Box>Payment #123</Box>} secondaryTitle={<Box>example@gmail.com</Box>} /> </List> </Box>

List プロパティ

プロパティータイプ

children

必須

React.ReactNode

One or more ListItem components.

onAction

オプション

((id: React.Key) => void) | undefined

Press event handler which receives the corresponding key of the ListItem that was pressed.

リストアイテム

すべてのリストは、ListItem コンポーネントのコレクションで構成されます。key プロパティを使用して各リストアイテムを一意に識別します。

サンプルを読み込み中...
<Box css={{ backgroundColor: 'surface', padding: 'medium', borderRadius: 'medium', }} > <List onAction={(id: string | number) => console.log(id)} aria-label="Example of a List" > <ListItem id="apple" title={<Box>Apple</Box>} /> <ListItem id="orange" title={<Box>Orange</Box>} /> <ListItem id="banana" title={<Box>Banana</Box>} /> </List> </Box>

ListItem プロパティ

プロパティータイプ

icon

オプション

React.ReactNode

コンテンツと説明の左側に表示されるアイコン。両方が存在する場合、image によって上書きされます。

id

オプション

string | undefined

アイテムの ID。これは List の onAction ハンドラーに渡されます。

image

オプション

React.ReactNode

コンテンツと説明の左側に表示される画像。両方が存在する場合、icon を上書きします。

secondaryTitle

オプション

React.ReactNode

Secondary content for the ListItem component.

size

オプション

("default" | "large") | undefined

Size of the ListItem component.

title

オプション

React.ReactNode

Title content for the ListItem component.

value

オプション

React.ReactNode

アイテムの右側に表示する値。

副題

secondaryTitle プロパティを使用して、リストアイテムに副題を追加できます。

サンプルを読み込み中...
<Box css={{ backgroundColor: 'surface', padding: 'medium', borderRadius: 'medium', }} > <List onAction={(id: string | number) => console.log(id)} aria-label="Example of a List" > <ListItem id="1" title={<Box>John Smith</Box>} secondaryTitle={<Box>johnsmith@test.com</Box>} /> <ListItem id="2" title={<Box>Jane Doe</Box>} secondaryTitle={<Box>janedoe@test.com</Box>} /> <ListItem id="3" title={<Box>Mark Foster</Box>} secondaryTitle={<Box>markfoster@test.com</Box>} /> </List> </Box>

値

ListItem の value プロパティは任意の JSX を受け付けることができます。

サンプルを読み込み中...
<Box css={{ backgroundColor: 'surface', padding: 'medium', borderRadius: 'medium', }} > <List onAction={(id) => console.log(id)} aria-label="Example of a List"> <ListItem value={ <Box css={{marginLeft: 'medium', marginRight: 'xsmall'}}> <Icon name="truck" /> </Box> } id="1" title={<Box>Payment #123</Box>} secondaryTitle={<Box>example@gmail.com</Box>} /> <ListItem value={ <Box css={{marginLeft: 'medium'}}> <Button onPress={() => console.log('delete')} type="destructive"> <Box css={{marginRight: 'xsmall'}}> <Icon name="trash" /> </Box> Delete </Button> </Box> } id="2" title={<Box>Payment #456</Box>} secondaryTitle={<Box>example@gmail.com</Box>} /> <ListItem value={ <Box css={{marginLeft: 'medium'}}> <Button onPress={() => console.log('edit')} type="primary"> Edit </Button> </Box> } id="3" title={<Box>Payment #789</Box>} secondaryTitle={<Box>example@gmail.com</Box>} /> </List> </Box>

サポートされていないコンポーネント

一部のインタラクティブなコンポーネントは ListItem の value プロパティとして機能しないことに注意してください。

  • Select
  • TextArea
  • TextField

参照情報

  • 従うべき設計パターン
  • アプリのスタイル設定
  • UI テスト
このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc