Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer tools
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Developer tools
SDKs
API
Testing
Workbench
Event Destinations
Workflows
Stripe CLI
Stripe Shell
Developers Dashboard
Agent toolkit
Build with LLMsStripe for Visual Studio CodeStripe health alertsFile uploads
Security and privacy
Security
Privacy
Extend Stripe
Stripe Apps
    Overview
    Get started
    Create an app
    How Stripe Apps work
    Sample apps
    Build an app
    Store secrets
    API authentication methods
    Authorisation flows
    Server-side logic
    Listen to events
    Handle different modes
    Enable sandbox support
    App settings page
    Build a UI
      How UI extensions work
      UI testing
      Developer tools
      Design your app
      Style your app
      Upgrade Stripe's UI extension SDK
    Onboarding
    Distribute your app
    Distribution options
    Upload your app
    Versions and releases
    Test your app
    Publish your app
    Promote your app
    Add deep links
    Create install links
    Assign roles in UI extensions
    Post-install actions
    App analytics
    Embedded components for Apps
    Embed third-party Stripe Apps
    Migrating to Stripe Apps
    Migrate or build an extension
    Migrate a plugin to Stripe Apps or Stripe Connect
    Reference
    App manifest
    CLI
    Extension SDK
    Permissions
    Viewports
    Design patterns
    Components
Stripe Connectors
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsStripe AppsBuild a UI

UI extension developer tools

Typecheck, lint, and test your code using bundled developer tools.

Copy page

When you create an app using the Stripe CLI, the generated package includes development environment tooling with best practices built in to help you build a UI extension. This document details the tools that we include and how to modify them (if desired) to suit your app.

Type checking

Apps come with Typescript support, and all of the supporting packages we ship have type definitions to aid development. Typescript warnings display in supported code editors automatically, but you can also check your code using the command line:

Command Line
yarn
yarn tsc

Your app’s root directory has a tsconfig.json file that extends our recommended configuration in the @stripe/ui-extension-tools package. Most developers won’t need to modify this file, but advanced users can add their own properties or even remove the extends property and create their own Typescript configuration.

To enable image imports, we include a ui-extensions.d.ts type definition file that references type definitions from the @stripe/ui-extension-tools package. We don’t recommend removing this file because it’s a helpful indicator of what image types our CLI can process.

Linting

Linting (checking code for syntax and formatting errors) is an invaluable developer tool, and apps come with an ESLint configuration. We include best-practice linter rules and also Stripe-specfic rules to prevent common mistakes. Linting warnings display in supported code editors automatically, but you can also check your code using the command line:

Command Line
yarn
yarn lint

The ESLint configuration is in the package.json file in the eslintConfig property. It extends the configuration in the @stripe/ui-extension-tools package. Most developers won’t need to modify this configuration, but advanced users can add their own properties or even remove the extends property and create their own set of linting rules.

Testing

App developers can write unit tests for their React components and utility functions using the bundled test harness built with Jest. Run your tests on the command line:

Command Line
yarn
yarn test

Your app’s root directory has a jest.config.js file that extends our recommended configuration in the @stripe/ui-extension-tools package. Most developers won’t need to modify this file, but advanced users can add their own properties or even remove the import and create their own configuration.

OptionalUpdate older apps to use the ui-extension-tools package

See also

  • How UI extensions work
  • UI testing
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc