Saltar al contenido principal

Checkout Slots

Checkout slots are containers available in the checkout flow where you can render your UI components. These slots allow you to add custom content at specific points in the checkout process.

Available Slots

These are the slots that are available in checkout:

SlotPage
before_main_contentstart, payment
after_main_contentstart, payment
after_line_items_pricestart, payment
before_line_itemsstart
after_line_itemsstart, payment
after_contact_formstart
after_address_formstart
after_billing_formstart
after_payment_optionspayment
before_payment_optionspayment
before_address_formstart
before_billing_formstart
before_contact_formstart
before_shipping_formstart
after_shipping_formstart
after_shipping_descriptionstart

Visual Reference

Desktop Layout

This is the usual location of checkout slots on desktop:

Mobile Layout

And this is their usual location on mobile devices:

Examples

Shipping Options Slot

The after_shipping_description slot allows you to add custom content after the shipping method description in the checkout page.

import type { NubeSDK } from "@tiendanube/nube-sdk-types";
import { Text } from "@tiendanube/nube-sdk-jsx";

export function App(nube: NubeSDK) {
nube.render("after_shipping_description", [
<Text key="ne-correios-pac">This is a custom shipping description</Text>,
]);
}

Adding Content Before Payment Options

import type { NubeSDK } from "@tiendanube/nube-sdk-types";
import { Box, Text } from "@tiendanube/nube-sdk-jsx";

export function App(nube: NubeSDK) {
nube.render("before_payment_options", [
<Box key="payment-notice">
<Text>Please review your order before selecting a payment method.</Text>
</Box>,
]);
}

Adding Content After Contact Form

import type { NubeSDK } from "@tiendanube/nube-sdk-types";
import { Box, Text } from "@tiendanube/nube-sdk-jsx";

export function App(nube: NubeSDK) {
nube.render("after_contact_form", [
<Box key="contact-info">
<Text>We'll send order updates to this email address.</Text>
</Box>,
]);
}

Best Practices

  • Use descriptive key props for all components rendered into slots
  • Consider mobile and desktop layouts when positioning content
  • Keep content concise and relevant to the checkout context
  • Test your components on different screen sizes
  • Clear slots when they're no longer needed using nube.clearSlot()