Staaarter

Billing Invoice Email Settings

A settings panel for how billing emails get delivered: which notifications go out, an optional CC address for a finance inbox, and a save button that confirms once changes are stored. One toggle can be marked locked to represent a notification that's always on, like a mandatory payment confirmation. Built for account settings pages in multi-user or enterprise billing portals.

By Staaarter Team
Billing
Updated April 18, 2026
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, input, label dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/billing-invoice-email-settings.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing68.tsx instead.

Usage

The file also exports billing68Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Billing68, billing68Demo } from "@/components/blocks/billing/billing68";

export default function Page() {
  return <Billing68 {...billing68Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Invoice email settings"Heading shown at the top of the panel.
descriptionstringnoneOptional supporting text under the heading.
primaryEmailstringnoneThe account's default billing email, shown as read-only context above the toggles.
togglesEmailSettingToggle[]noneEach notification setting rendered as its own switch row.
defaultEnabledIdsstring[][]Which toggle ids start enabled on first render.
ccLabelstring"Also send to (CC)"Label above the CC email input.
ccPlaceholderstring"finance@company.com"Placeholder text in the CC email input.
defaultCcEmailstring""Initial value of the CC email input.
saveLabelstring"Save changes"Label on the save button when idle.
classNamestringnoneExtra classes for the outer container.

Types

interface EmailSettingToggle {
  id: string;
  label: string;
  description?: string;
  locked?: boolean;
}

Behavior notes

  • Toggle state, the CC email value, and the save status are all local component state; nothing here calls an API on its own.
  • A toggle marked locked renders disabled and can't be switched off, for a notification you want to represent as always-on, like a mandatory payment confirmation.
  • Changing any toggle or the CC field resets the save button back to its idle label, so a stale 'Saved' state never lingers after a new edit.
  • Clicking save runs a 700ms local 'Saving' state, then shows 'Saved' with a checkmark for 2.5 seconds before returning to idle. There's no real persistence, wire the click handler to your own save endpoint.
  • Every switch is a real button with role=switch and aria-checked rather than a native checkbox input.

Frequently asked questions