affectUI › Components › Cards

Tips Panel

Grid of short tips with one action each – taken tips turn into a done state.

Free and open source (MIT). Install: npx shadcn@latest add https://www.affectui.com/r/tips-panel.json · Import from @/components/ui/tips-panel

When to use

  • Pointing new users to features they haven't tried yet
  • A “What's new” or getting-started panel in a dashboard or a dialog

When not to use

  • Steps that build on each other – use the Setup Guide
  • A single announcement – a banner or toast is lighter

Usage

import { Kbd, TipsPanel } from "@/components/ui/tips-panel";

const tips = [
  { id: "search", title: "Quick search", description: <>Press <Kbd>⌘K</Kbd> to jump anywhere.</>, action: "Try it" },
  { id: "pro", title: "Ready for Pro?", description: "Unlimited projects and priority support.", action: "See plans", primary: true },
];

export function Tips() {
  return <TipsPanel tips={tips} onClose={() => setOpen(false)} />;
}

Props

NameTypeDefaultDescription
tipsTip[]id, title, description, action, doneLabel, primary and onAction
titlestring"Tips"Heading in the gray tray
onClose() => voidShows a Close button in the footer
closeLabelstring"Close"Text of the Close button
classNamestringExtra class on the tray

Keyboard

  • Tab: Move between the tip actions and Close
  • Enter / Space: Take the focused action

Accessibility

  • Each tip is a list item with a real button; the done state is announced as a status
  • The counter in the heading is a polite live region

Responsive

  • Set --ui-tp-max-height on the panel to change how tall the list grows before it scrolls (420px by default)
  • Three columns, two below 560px panel width, one below 380px – based on the panel's own width
  • Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"

Requirements

  • React 19

Related

  • Setup Guide – Onboarding panel with a progress bar and collapsible task groups that strike through when done
  • Decision Inbox – Open decisions with two quick answers each – answered ones confirm and fold away