Forms
Setting Row
Title, description and a control — inline or leading — grouped under setting sections.
Preview
Sending
Control how sequences send email.
Pause on reply
Stop the sequence when a prospect replies.
Sending window
Emails go out in the prospect’s local time.
Export data
Download every sequence as CSV.
Notifications
Replies and meetings
When a prospect replies or books a meeting.
Product updates
New features and tips.
"use client";
import { Button } from "@/components/ui/button";
import { Select, SelectItem } from "@/components/ui/select";
import { SettingRow, SettingSection } from "@/components/ui/setting-row";
import { Switch } from "@/components/ui/switch";
export default function Example() {
return (
<div className="flex w-full max-w-xl flex-col gap-10">
<SettingSection title="Sending" description="Control how sequences send email.">
<SettingRow title="Pause on reply" description="Stop the sequence when a prospect replies." control={<Switch aria-label="Pause on reply" defaultSelected />} />
<SettingRow
title="Sending window"
description="Emails go out in the prospect’s local time."
control={
<Select aria-label="Sending window" defaultSelectedKey="business" className="w-44">
<SelectItem id="business">9 AM – 5 PM</SelectItem>
<SelectItem id="morning">8 AM – 12 PM</SelectItem>
</Select>
}
/>
<SettingRow title="Export data" description="Download every sequence as CSV." control={<Button size="sm">Export</Button>} />
</SettingSection>
<SettingSection title="Notifications">
<SettingRow layout="leading" title="Replies and meetings" description="When a prospect replies or books a meeting." control={<Switch aria-label="Replies and meetings" defaultSelected />} />
<SettingRow layout="leading" title="Product updates" description="New features and tips." control={<Switch aria-label="Product updates" />} />
</SettingSection>
</div>
);
}Installation
Components are copied into your project — no runtime package.
Create a
setting-row.tsxfile and paste the following code into it.src/components/ui/setting-row.tsximport type { ReactNode } from "react"; import { cx } from "@/utils/cx"; export interface SettingRowProps { title: ReactNode; description?: ReactNode; /** The control: a <Switch>, <Select>, <Button>… */ control: ReactNode; /** `inline` puts the control on the right; `leading` puts it before the text (toggle lists). */ layout?: "inline" | "leading"; className?: string; } /** Title + description + control. The building block of settings pages. */ export function SettingRow({ title, description, control, layout = "inline", className }: SettingRowProps) { if (layout === "leading") { return ( <div className={cx("flex items-start gap-3", className)}> <div className="pt-px">{control}</div> <div className="min-w-0"> <div className="text-base font-medium text-fg">{title}</div> {description && <p className="mt-0.5 text-sm text-fg-secondary">{description}</p>} </div> </div> ); } return ( <div className={cx("flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-8", className)}> <div className="min-w-0"> <div className="text-base font-medium text-fg">{title}</div> {description && <p className="mt-0.5 text-sm text-fg-secondary">{description}</p>} </div> <div className="shrink-0">{control}</div> </div> ); } /** Section heading + divider used between groups of setting rows. */ export function SettingSection({ title, description, children, className }: { title: string; description?: string; children: ReactNode; className?: string }) { return ( <section className={cx("flex flex-col gap-5", className)}> <header className="border-b border-line pb-4"> <h3 className="text-lg font-medium text-fg">{title}</h3> {description && <p className="mt-0.5 text-base text-fg-secondary">{description}</p>} </header> {children} </section> ); }Add the theme tokens and the
cxhelper from Installation if you haven’t yet, then update the import paths to match your project setup.