Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

User Account Slots

The User Account drop-in exposes slots for customizing specific UI sections. Use slots to replace or extend container components. For default properties available to all slots, see Extending drop-in components.

Version: 3.2.0
ContainerSlots
AddressFormAddressFormActions, AddressFormInputs
AddressesNone
CustomerInformationCustomerData
OrdersListOrdersListAction, OrdersListCard, OrderItemImage
PaymentMethodsNone

The slots for the AddressForm container allow you to customize its appearance and behavior.

interface AddressFormProps {
slots?: {
AddressFormActions?: SlotProps<AddressFormActionsContext>;
AddressFormInputs?: SlotProps<AddressFormInputsContext>;
};
}

The AddressFormActions slot allows you to customize the address form actions section of the AddressForm container.

import { render as provider } from '@dropins/storefront-account/render.js';
import { AddressForm } from '@dropins/storefront-account/containers/AddressForm.js';
await provider.render(AddressForm, {
slots: {
AddressFormActions: (ctx) => {
// Your custom implementation
const element = document.createElement('div');
element.innerText = 'Custom AddressFormActions';
ctx.appendChild(element);
}
}
})(block);

The AddressFormInputs slot allows you to customize the address form inputs section of the AddressForm container.

import { render as provider } from '@dropins/storefront-account/render.js';
import { AddressForm } from '@dropins/storefront-account/containers/AddressForm.js';
await provider.render(AddressForm, {
slots: {
AddressFormInputs: (ctx) => {
// Your custom implementation
const element = document.createElement('div');
element.innerText = 'Custom AddressFormInputs';
ctx.appendChild(element);
}
}
})(block);

The slots for the Addresses container allow you to customize its appearance and behavior.

interface AddressesProps {
slots?: {
[key: string]: SlotProps;
};
}

The slots for the CustomerInformation container allow you to customize its appearance and behavior.

interface CustomerInformationProps {
slots?: {
CustomerData?: SlotProps<CustomerDataContext>;
};
}

The CustomerData slot allows you to customize the customer data section of the CustomerInformation container.

import { render as provider } from '@dropins/storefront-account/render.js';
import { CustomerInformation } from '@dropins/storefront-account/containers/CustomerInformation.js';
await provider.render(CustomerInformation, {
slots: {
CustomerData: (ctx) => {
// Your custom implementation
const element = document.createElement('div');
element.innerText = 'Custom CustomerData';
ctx.appendChild(element);
}
}
})(block);

The PaymentMethods container does not provide slots. Customize the layout and copy through dictionary keys, container props, and styles.

The slots for the OrdersList container allow you to customize its appearance and behavior.

interface OrdersListProps {
slots?: {
OrdersListAction?: SlotProps<OrdersListActionContext>;
OrdersListCard?: SlotProps<OrdersListCardContext>;
OrderItemImage?: SlotProps<{
data: OrderItem;
defaultImageProps: ImageProps;
}>;
};
}

The OrdersListAction slot allows you to customize the orders list action section of the OrdersList container.

import { render as provider } from '@dropins/storefront-account/render.js';
import { OrdersList } from '@dropins/storefront-account/containers/OrdersList.js';
await provider.render(OrdersList, {
slots: {
OrdersListAction: (ctx) => {
// Your custom implementation
const element = document.createElement('div');
element.innerText = 'Custom OrdersListAction';
ctx.appendChild(element);
}
}
})(block);

The OrdersListCard slot allows you to customize the orders list card section of the OrdersList container.

import { render as provider } from '@dropins/storefront-account/render.js';
import { OrdersList } from '@dropins/storefront-account/containers/OrdersList.js';
await provider.render(OrdersList, {
slots: {
OrdersListCard: (ctx) => {
// Your custom implementation
const element = document.createElement('div');
element.innerText = 'Custom OrdersListCard';
ctx.appendChild(element);
}
}
})(block);

The OrderItemImage slot allows you to customize the order item image section of the OrdersList container.

import { render as provider } from '@dropins/storefront-account/render.js';
import { OrdersList } from '@dropins/storefront-account/containers/OrdersList.js';
await provider.render(OrdersList, {
slots: {
OrderItemImage: (ctx) => {
// Your custom implementation
const element = document.createElement('div');
element.innerText = 'Custom OrderItemImage';
ctx.appendChild(element);
}
}
})(block);