Account slots

Every slot on the customer account pages, where it renders, and what context it passes.

Use account slots when you want to add a banner, a loyalty block or a custom section to the profile, orders, wallet, wishlist or notifications pages without replacing them. For how useHook, priority, fallback and cleanup work, see Slots and Page frame slots.

All account pages render inside CustomerLayout, so the account menu and page title come from the layout and sit outside every slot below.

Framework: TanStack Start

These slots are rendered by the engine's TanStack Start routes.

Context

None of the account slots pass their own context. Every handler receives only twilight (store, theme and more). Read order, wallet or wishlist data from your own hooks or loaders, not from the slot.

Profile

Route: Profile.

/account/profile
Header
Account menu
customer:profile.start
customer:profile.form.start
Profile form
customer:profile.form.end
Verification
Notification settings
customer:profile.end
Footer
Slot: add your content hereDrawn by the engine
Profile
SlotPositionContextNotes
customer:profile.startFirst thing on the page, above the form.twilightAlways rendered.
customer:profile.form.startDirectly above the profile form.twilightAlways rendered.
customer:profile.form.endDirectly below the profile form, above the verification block.twilightAlways rendered.
customer:profile.endLast thing on the page, below the notification settings.twilightAlways rendered.

Settings

Route: Settings.

/account/settings
Header
Account menu
customer:settings.start
User settings
customer:settings.end
Footer
Slot: add your content hereDrawn by the engine
Settings
SlotPositionContextNotes
customer:settings.startAbove the settings component.twilightAlways rendered.
customer:settings.endBelow the settings component.twilightAlways rendered.

The profile page also shows the user settings component, but it does not render the customer:settings.* slots. Use the profile slots there.

Notifications

Route: Notifications.

/account/notifications
Header
Account menu
customer:notifications.items.startalso when empty
Notification list or empty state
customer:notifications.items.endalso when empty
Footer
Slot: add your content hereDrawn by the engine
Notifications
SlotPositionContextNotes
customer:notifications.items.startAbove the notification list.twilightRendered even when there are no notifications.
customer:notifications.items.endBelow the notification list.twilightRendered even when there are no notifications.

Orders list

Route: Orders.

/account/orders
Header
Account menu
customer:orders.index.items.start
Status filters
Orders table or empty state
customer:orders.index.items.end
Footer
Slot: add your content hereDrawn by the engine
Orders list
SlotPositionContextNotes
customer:orders.index.items.startAbove the status filters and the table.twilightRendered even when the customer has no orders.
customer:orders.index.items.endBelow the table (or the empty state).twilightRendered even when the customer has no orders.

Single order

Route: Order.

/account/orders/123
Header
Account menu
customer:orders.single.details.start
Gift tag and edit order button
Order details, items and totals
customer:orders.single.details.end
Rating and reorder modals
Footer
Slot: add your content hereDrawn by the engine
Single order
SlotPositionContextNotes
customer:orders.single.details.startFirst thing in the order content, above the gift tag and the order details table.twilightAlways rendered.
customer:orders.single.details.endAfter the last order section (details, shipping, payment and rating blocks), before the modals.twilightAlways rendered. Modals render outside the slot.

Wallet

Route: Wallet.

With transactions:

/account/wallet
Header
Account menu
customer:wallet.transactions.start
Balance card
Transactions table
customer:wallet.transactions.end
Footer
Slot: add your content hereDrawn by the engine
Wallet with transactions

With no transactions:

/account/wallet
Header
Account menu
customer:wallet.transactions.start
Empty state
customer:wallet.transactions.end
Footer
Slot: add your content hereDrawn by the engine
Wallet, empty
SlotPositionContextNotes
customer:wallet.transactions.startTop of the page, above the balance card (or above the empty state).twilightAlways rendered.
customer:wallet.transactions.endBelow the transactions table (or below the empty state).twilightAlways rendered.

The wallet page renders each slot in two places because it has two layouts: the empty state when the customer has no transactions, and the balance plus table otherwise. Exactly one of them is on screen, so a handler never shows twice. The empty state has no balance card.

Wishlist

Route: Wishlist.

/account/wishlist
Header
Account menu
customer:wishlist.items.start
Share bar

Product list or empty state

customer:wishlist.items.end
Footer
Slot: add your content hereDrawn by the engine
Wishlist
SlotPositionContextNotes
customer:wishlist.items.startAbove the share bar and the product list.twilightRendered even when the wishlist is empty.
customer:wishlist.items.endBelow the product list (or empty state).twilightRendered even when the wishlist is empty.

Example

Show a banner above the customer's orders. Render the component once under your layout, as described in useHook.

app/components/account/OrdersBanner.tsx
import { useHook } from '@salla.sa/twilight-theme-engine/hooks/useHook';

export function OrdersBanner() {
  useHook('customer:orders.index.items.start', () => (
    <p className="mb-4 rounded bg-yellow-50 p-3 text-sm">
      Need help with an order? Contact support and quote the order number.
    </p>
  ));
  return null;
}

The banner also shows when the customer has no orders, because the slot sits above the empty state.

Next

  • Slots explains how registration, priority and fallback work.
  • useHook is the API used above.
  • Blog slots covers the blog pages.

On this page