Props

interface AddressSheetProps {
    accessible?: boolean;
    accessibilityActions?: readonly Readonly<{ name: string; label?: string }>[];
    accessibilityLabel?: string;
    "aria-label"?: string;
    accessibilityRole?: AccessibilityRole;
    accessibilityState?: AccessibilityState;
    "aria-busy"?: boolean;
    "aria-checked"?: boolean | "mixed";
    "aria-disabled"?: boolean;
    "aria-expanded"?: boolean;
    "aria-selected"?: boolean;
    accessibilityHint?: string;
    accessibilityValue?: AccessibilityValue;
    "aria-valuemax"?: number;
    "aria-valuemin"?: number;
    "aria-valuenow"?: number;
    "aria-valuetext"?: string;
    onAccessibilityAction?: (event: AccessibilityActionEvent) => void;
    importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants";
    "aria-hidden"?: boolean;
    "aria-modal"?: boolean;
    role?: Role;
    accessibilityLabelledBy?: string | string[];
    "aria-labelledby"?: string;
    accessibilityLiveRegion?: "none" | "polite" | "assertive";
    "aria-live"?: "off" | "polite" | "assertive";
    accessibilityElementsHidden?: boolean;
    accessibilityViewIsModal?: boolean;
    onAccessibilityEscape?: () => void;
    onAccessibilityTap?: () => void;
    onMagicTap?: () => void;
    accessibilityIgnoresInvertColors?: boolean;
    accessibilityLanguage?: string;
    accessibilityShowsLargeContentViewer?: boolean;
    accessibilityLargeContentTitle?: string;
    visible: boolean;
    presentationStyle?:
        | "automatic"
        | "fullscreen"
        | "popover"
        | "pageSheet"
        | "formSheet"
        | "overFullScreen";
    animationStyle?: "flip"
    | "curl"
    | "slide"
    | "dissolve";
    appearance?: RecursivePartial<
        {
            font: FontConfig;
            colors: | GlobalColorConfig
            | { light: GlobalColorConfig; dark: GlobalColorConfig };
            shapes: {
                borderRadius: number;
                borderWidth: number;
                shadow: ShadowConfig;
            };
            primaryButton: PrimaryButtonConfig;
        },
    >;
    defaultValues?: AddressDetails;
    additionalFields?: {
        phoneNumber?: "hidden"
        | "optional"
        | "required";
        checkboxLabel?: string;
    };
    allowedCountries?: string[];
    autocompleteCountries?: string[];
    primaryButtonTitle?: string;
    sheetTitle?: string;
    googlePlacesApiKey?: string;
    onSubmit: (result: Required) => void;
    onError: (error: StripeError<AddressSheetError>) => void;
}

Hierarchy

  • AccessibilityProps
    • AddressSheetProps

Properties

accessible?: boolean

When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.

accessibilityActions?: readonly Readonly<{ name: string; label?: string }>[]

Provides an array of custom actions available for accessibility.

accessibilityLabel?: string

Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.

"aria-label"?: string
accessibilityRole?: AccessibilityRole

Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on.

accessibilityState?: AccessibilityState

Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on.

"aria-busy"?: boolean
"aria-checked"?: boolean | "mixed"
"aria-disabled"?: boolean
"aria-expanded"?: boolean
"aria-selected"?: boolean
accessibilityHint?: string

An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.

accessibilityValue?: AccessibilityValue

Represents the current value of a component. It can be a textual description of a component's value, or for range-based components, such as sliders and progress bars, it contains range information (minimum, current, and maximum).

"aria-valuemax"?: number
"aria-valuemin"?: number
"aria-valuenow"?: number
"aria-valuetext"?: string
onAccessibilityAction?: (event: AccessibilityActionEvent) => void

When accessible is true, the system will try to invoke this function when the user performs an accessibility custom action.

importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants"

[Android] Controlling if a view fires accessibility events and if it is reported to accessibility services.

"aria-hidden"?: boolean

A value indicating whether the accessibility elements contained within this accessibility element are hidden.

"aria-modal"?: boolean
role?: Role

Indicates to accessibility services to treat UI component like a specific role.

accessibilityLabelledBy?: string | string[]

Identifies the element that labels the element it is applied to. When the assistive technology focuses on the component with this props, the text is read aloud. The value should should match the nativeID of the related element.

android

"aria-labelledby"?: string

Identifies the element that labels the element it is applied to. When the assistive technology focuses on the component with this props, the text is read aloud. The value should should match the nativeID of the related element.

android

accessibilityLiveRegion?: "none" | "polite" | "assertive"

Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only.

"aria-live"?: "off" | "polite" | "assertive"

Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only.

accessibilityElementsHidden?: boolean

A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden to the screen reader.

ios

accessibilityViewIsModal?: boolean

A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.

ios

onAccessibilityEscape?: () => void

When accessible is true, the system will invoke this function when the user performs the escape gesture (scrub with two fingers).

ios

onAccessibilityTap?: () => void

When accessible is true, the system will try to invoke this function when the user performs accessibility tap gesture.

ios

onMagicTap?: () => void

When accessible is true, the system will invoke this function when the user performs the magic tap gesture.

ios

accessibilityIgnoresInvertColors?: boolean

ios

accessibilityLanguage?: string

By using the accessibilityLanguage property, the screen reader will understand which language to use while reading the element's label, value and hint. The provided string value must follow the BCP 47 specification (https://www.rfc-editor.org/info/bcp47). https://reactnative.dev/docs/accessibility#accessibilitylanguage-ios

ios

accessibilityShowsLargeContentViewer?: boolean

A Boolean value that indicates whether or not to show the item in the large content viewer. Available on iOS 13.0+ https://reactnative.dev/docs/accessibility#accessibilityshowslargecontentviewer

ios

accessibilityLargeContentTitle?: string

When accessibilityShowsLargeContentViewer is set, this string will be used as title for the large content viewer. https://reactnative.dev/docs/accessibility#accessibilitylargecontenttitle

ios

visible: boolean

Whether the sheet is visible. Defaults to false.

presentationStyle?:
    | "automatic"
    | "fullscreen"
    | "popover"
    | "pageSheet"
    | "formSheet"
    | "overFullScreen"

Controls how the modal is presented (after animation). iOS only. Defaults to popover. See https://developer.apple.com/documentation/uikit/uimodalpresentationstyle for more info.

animationStyle?: "flip" | "curl" | "slide" | "dissolve"

Controls how the modal animates. iOS only.

appearance?: RecursivePartial<
    {
        font: FontConfig;
        colors: | GlobalColorConfig
        | { light: GlobalColorConfig; dark: GlobalColorConfig };
        shapes: {
            borderRadius: number;
            borderWidth: number;
            shadow: ShadowConfig;
        };
        primaryButton: PrimaryButtonConfig;
    },
>

Configuration for the look and feel of the UI.

defaultValues?: AddressDetails

The values to prepopulate the sheet's fields with.

additionalFields?: {
    phoneNumber?: "hidden" | "optional" | "required";
    checkboxLabel?: string;
}

Configuration for additional fields besides the physical address

Type declaration

  • OptionalphoneNumber?: "hidden" | "optional" | "required"

    Determines whether the phone number is hidden, required, or optional. Defaults to hidden.

  • OptionalcheckboxLabel?: string

    The label of a checkbox displayed below other fields. If null or undefined, the checkbox is not displayed.

allowedCountries?: string[]

A list of two-letter country codes representing countries the customers can select. If the list is empty (the default), we display all countries.

autocompleteCountries?: string[]

A list of two-letter country codes representing countries that support address autocomplete. Defaults to a list of countries that Stripe has audited to ensure a good autocomplete experience.

primaryButtonTitle?: string

The title of the primary button displayed at the bottom of the screen. Defaults to "Save Address".

sheetTitle?: string

Title displayed at the top of the sheet. Defaults to "Address".

googlePlacesApiKey?: string

Android only. Google Places api key used to provide autocomplete suggestions. When null, autocomplete is disabled on Android.

onSubmit: (result: Required) => void

Called when the user submits their information

onError: (error: StripeError<AddressSheetError>) => void

Called when the user taps the button to close the sheet before submitting their information, or when an error occurs.