Accéder directement au contenu
Créez un compte
ou
connecter-vous
Logo de la documentation Stripe
/
Demander à l'assistant IA
Créez un compte
Connectez-vous
Démarrer
Paiements
Automatisation des opérations financières
Plateformes et places de marché
Gestion de fonds
Outils de développement
Démarrer
Paiements
Automatisation des opérations financières
Démarrer
Paiements
Automatisation des opérations financières
Plateformes et places de marché
Gestion de fonds
Aperçu
Gestion des versions
Journal des modifications
Mettre à niveau votre version de l'API
Actualiser votre version du SDK
Outils de développement
SDK
API
Tests
Workbench
Destinations d'événements
Workflows
CLI Stripe
Shell Stripe
Dashboard des développeurs
Boîte à outils des agents
Intégrer des LLMStripe pour Visual Studio CodeAlertes d'intégrité de StripeChargements de fichiers
Sécurité et confidentialité
Sécurité
Confidentialité
Extensions Stripe
Stripe Apps
    Présentation
    Démarrer
    Créer une application
    Fonctionnement de Stripe Apps
    Exemples d'application
    Créer une application
    Enregistrer des clés secrètes
    Méthodes d'authentification de l'API
    Flux d'autorisation
    Logique côté serveur
    Écouter les événements
    Gérer différents modes
    Activer la prise en charge de l'environnement de test
    Page des paramètres d'application
    Concevoir une interface utilisateur
    Inscription des utilisateurs
    Distribuer votre application
    Options de distribution
    Charger votre application
    Versions
    Tester votre application
    Publier votre application
    Faire la promotion de votre application
    Ajouter des liens profonds
    Créer des liens d'installation
    Assigner des rôles dans les extensions d'interface utilisateur
    Actions post-installation
    Analyses de l'application
    Composants intégrés pour les applications
    Intégrer des applications tierces conçues pour Stripe
    Migrer vers Stripe Apps
    Migrer ou développer une extension
    Migrer un plugin vers Stripe Apps ou Stripe Connect
    Référence
    Manifeste de l'application
    Interface de ligne de commande
    SDK d'extension
    Autorisations
    Fenêtres d'affichage
    Modèles de conception
    Composants
      Accordéon
      Badge
      Bannière
      BarChart
      Composant box
      Bouton
      ButtonGroup
      Case à cocher
      Puce
      ContextView
      DateField
      Séparateur
      FocusView
      FormFieldGroup
      Icône
      Img
      Inline
      LineChart
      Link
      Liste
      Menu
      PropertyList
      Radio
      Sélectionner
      SettingsView
      SignInView
      Sparkline
      Indicateur de chargement
      Changer
      Table
      Onglets
      Liste des tâches
      TextArea
      TextField
      Message transitoire
      Infobulle
Connecteurs Stripe
Partenaires
Partner ecosystem
Certification des partenaires
AccueilOutils de développementStripe AppsComponents

Remarque

Cette page n'est pas encore disponible dans cette langue. Nous faisons tout notre possible pour proposer notre documentation dans davantage de langues et nous vous fournirons la version traduite dès qu'elle sera disponible.

ContextView component for Stripe AppsDashboard only

ContextView allows apps to render next to Stripe content in a drawer so users can look at them side by side and share context.

Copier la page

The root view of your app must be a ContextView.

These in-context modules allow the app to meet users in their existing workflows and provide contextual information and actions.

A user’s interaction with an app always begins with a view type called a ContextView view. Each app must have a single ContextView view (per viewport), which acts as the default view when the page loads (similar to the index.html of a website).

ContextView in an application

What ContextView looks like

Remarque

To create a view within an existing ContextView, see FocusView.

ContextView props

PropertyType

children

Required

React.ReactNode

The contents of the component.

title

Required

string

The title of the ContextView. This will be displayed at the top of the drawer under that app’s name.

actions

Optional

React.ReactNode

A React fragment containing up to three Buttons that will be displayed directly under the header and above the children of the ContextView.

banner

Optional

React.ReactElement | undefined

A Banner component that will be displayed directly under the header and above the children of the ContextView.

brandColor

Optional

string | undefined

A CSS color that contrasts well with brandIcon.

brandIcon

Optional

string | undefined

A square, 1-color SVG that contrasts well with brandColor.

description

Optional

string | undefined

A description of the view’s purpose, can also be used as a subtitle.

externalLink

Optional

ExternalLink | undefined

A link to an external webpage. This should generally allow the user to view related information on another site with more context than what the app makes available in the app drawer.

Related types: ExternalLink.

footerContent

Optional

React.ReactNode

React node adjacent to any actions in the footer.

primaryAction

Optional

React.ReactElement | undefined

A primary call to action (“Save” or “Continue”) Button placed in the footer.

secondaryAction

Optional

React.ReactElement | undefined

A secondary call to action (“Cancel”) Button placed in the footer.

ExternalLink

PropertyType

href

Required

string

URL of an external link.

label

Required

string

Label of an external link.

Example

import { Box, Button, ContextView, } from '@stripe/ui-extension-sdk/ui'; import appIcon from './icon.svg'; const HappyView = () => ( <ContextView title="Get started with Stripe Apps" actions={ <> <Button>Action 1</Button> <Button>Action 2</Button> </> } brandColor="#635bff" brandIcon={appIcon} > <Box>Example Content</Box> </ContextView> );

Voir aussi

  • Design patterns to follow
  • Style your app
  • UI testing
Cette page vous a-t-elle été utile ?
OuiNon
Besoin d'aide ? Contactez le service Support.
Rejoignez notre programme d'accès anticipé.
Consultez notre log des modifications.
Des questions ? Contactez l'équipe commerciale.
LLM ? Lire llms.txt.
Propulsé par Markdoc