Loading component…
Loading component…
Grid of short tips with one action each
To reuse this local React demo, copy all files from the Code tab into the same folder, then import TipsPanel from ./tips-panel.
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)} />;
}| Name | Type | Default | Description |
|---|---|---|---|
| tips | Tip[] | id, title, description, action, doneLabel, primary and onAction | |
| title | string | "Tips" | Heading in the gray tray |
| onClose | () => void | Shows a Close button in the footer | |
| closeLabel | string | "Close" | Text of the Close button |
| className | string | Extra class on the tray |
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"
@import "tailwindcss"; in your main CSS file.