{state.checked() ? "On" : "Off"}
>
)}
);
}
/** Toggle demo with pressed/unpressed. */
function ToggleDemo() {
return (
Bold
);
}
/** Inputs: Basic section with fundamental input components. */
export function InputsBasicSection() {
return (
<>
>
);
}
```
- [ ] **Step 2: Wire into app.tsx**
Add import:
```tsx
import { InputsBasicSection } from "./sections/inputs-basic";
```
Replace inputs-basic placeholder:
```tsx
```
- [ ] **Step 3: Verify in browser**
Expected: 6 input component demos render with working interactivity (checkbox toggles, switch slides, toggle presses).
- [ ] **Step 4: Commit**
```bash
git add packages/showcase/src/sections/inputs-basic.tsx packages/showcase/src/app.tsx
git commit -m "feat(showcase): add Inputs Basic section demos"
```
---
### Task 5: Inputs Selection section
**Files:**
- Create: `packages/showcase/src/sections/inputs-selection.tsx`
- Modify: `packages/showcase/src/app.tsx` — replace placeholder with ``
**Component exports used:**
- `RadioGroup` from `pettyui/radio-group` — compound: `RadioGroup`, `RadioGroup.Item`
- `ToggleGroup` from `pettyui/toggle-group` — compound: `ToggleGroup`, `ToggleGroup.Item`
- `Select, SelectRoot, SelectTrigger, SelectValue, SelectContent, SelectItem` from `pettyui/select` — named exports
- `Combobox, ComboboxRoot, ComboboxInput, ComboboxTrigger, ComboboxContent, ComboboxItem` from `pettyui/combobox` — named exports
- `Listbox` from `pettyui/listbox` — compound: `Listbox`, `Listbox.Item`
- `Slider` from `pettyui/slider` — compound: `Slider`, `Slider.Track`, `Slider.Range`, `Slider.Thumb`
- [ ] **Step 1: Create inputs-selection.tsx**
```tsx
import { createSignal, For } from "solid-js";
import { RadioGroup } from "pettyui/radio-group";
import { ToggleGroup } from "pettyui/toggle-group";
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "pettyui/select";
import { Combobox, ComboboxInput, ComboboxTrigger, ComboboxContent, ComboboxItem } from "pettyui/combobox";
import { Listbox } from "pettyui/listbox";
import { Slider } from "pettyui/slider";
import { ComponentDemo } from "../component-demo";
const fruits = ["Apple", "Banana", "Cherry", "Date", "Elderberry"];
/** RadioGroup demo with 3 options. */
function RadioGroupDemo() {
return (
{(state) => (
{(value) => (
{(itemState) => (
<>
{itemState.checked() && }
Option {value.split("-")[1]?.toUpperCase()}
>
)}
)}
)}
);
}
/** ToggleGroup demo with single selection. */
function ToggleGroupDemo() {
return (
Left
Center
Right
);
}
/** Select demo with fruit options. */
function SelectDemo() {
return (
);
}
/** Combobox demo with searchable fruit list. */
function ComboboxDemo() {
return (
▾
{(fruit) => (
{fruit}
)}
);
}
/** Listbox demo with inline selectable list. */
function ListboxDemo() {
return (
{(fruit) => (
{fruit}
)}
);
}
/** Slider demo with value display. */
function SliderDemo() {
const [value, setValue] = createSignal(40);
return (
Volume{value()}%
);
}
/** Inputs: Selection section with choice/range components. */
export function InputsSelectionSection() {
return (
<>
>
);
}
```
- [ ] **Step 2: Wire into app.tsx**
Add import:
```tsx
import { InputsSelectionSection } from "./sections/inputs-selection";
```
Replace inputs-selection placeholder:
```tsx
```
- [ ] **Step 3: Verify in browser**
Expected: 6 selection components render. Radio buttons toggle, select opens a dropdown, combobox filters on type, slider drags.
- [ ] **Step 4: Commit**
```bash
git add packages/showcase/src/sections/inputs-selection.tsx packages/showcase/src/app.tsx
git commit -m "feat(showcase): add Inputs Selection section demos"
```
---
### Task 6: Inputs Advanced section
**Files:**
- Create: `packages/showcase/src/sections/inputs-advanced.tsx`
- Modify: `packages/showcase/src/app.tsx` — replace placeholder with ``
**Component exports used:**
- `Form` from `pettyui/form` — compound: `Form`, `Form.Field`, `Form.Label`, `Form.Control`, `Form.Description`, `Form.ErrorMessage`, `Form.Submit`
- `DatePicker` from `pettyui/date-picker` — compound: `DatePicker`, `DatePicker.Input`, `DatePicker.Trigger`, `DatePicker.Content`
- [ ] **Step 1: Create inputs-advanced.tsx**
```tsx
import { Form } from "pettyui/form";
import { DatePicker } from "pettyui/date-picker";
import { ComponentDemo } from "../component-demo";
/** Form demo with validation and error display. */
function FormDemo() {
return (
NameRequired fieldEmail
Submit
);
}
/** DatePicker demo with calendar dropdown. */
function DatePickerDemo() {
return (
📅
);
}
/** Inputs: Advanced section with complex input components. */
export function InputsAdvancedSection() {
return (
<>
>
);
}
```
- [ ] **Step 2: Wire into app.tsx**
Add import:
```tsx
import { InputsAdvancedSection } from "./sections/inputs-advanced";
```
Replace inputs-advanced placeholder:
```tsx
```
- [ ] **Step 3: Verify in browser**
Expected: Form renders with name/email fields and submit button. DatePicker shows input with calendar trigger.
- [ ] **Step 4: Commit**
```bash
git add packages/showcase/src/sections/inputs-advanced.tsx packages/showcase/src/app.tsx
git commit -m "feat(showcase): add Inputs Advanced section demos"
```
---
### Task 7: Navigation section
**Files:**
- Create: `packages/showcase/src/sections/navigation.tsx`
- Modify: `packages/showcase/src/app.tsx` — replace placeholder with ``
**Component exports used:**
- `Link` from `pettyui/link` — simple: `Link`
- `Breadcrumbs` from `pettyui/breadcrumbs` — compound: `Breadcrumbs`, `Breadcrumbs.Item`, `Breadcrumbs.Link`, `Breadcrumbs.Separator`
- `Tabs` from `pettyui/tabs` — compound: `Tabs`, `Tabs.List`, `Tabs.Tab`, `Tabs.Panel`
- `Accordion` from `pettyui/accordion` — compound: `Accordion`, `Accordion.Item`, `Accordion.Header`, `Accordion.Trigger`, `Accordion.Content`
- `Collapsible` from `pettyui/collapsible` — compound: `Collapsible`, `Collapsible.Trigger`, `Collapsible.Content`
- `Pagination` from `pettyui/pagination` — simple: `Pagination`
- `NavigationMenu` from `pettyui/navigation-menu` — compound: `NavigationMenu`, `NavigationMenu.List`, `NavigationMenu.Item`, `NavigationMenu.Trigger`, `NavigationMenu.Content`, `NavigationMenu.Link`
- `Wizard` from `pettyui/wizard` — compound: `Wizard`, `Wizard.StepList`, `Wizard.Step`, `Wizard.StepTrigger`, `Wizard.StepContent`, `Wizard.Prev`, `Wizard.Next`
- [ ] **Step 1: Create navigation.tsx**
```tsx
import { For } from "solid-js";
import { Link } from "pettyui/link";
import { Breadcrumbs } from "pettyui/breadcrumbs";
import { Tabs } from "pettyui/tabs";
import { Accordion } from "pettyui/accordion";
import { Collapsible } from "pettyui/collapsible";
import { Pagination } from "pettyui/pagination";
import { NavigationMenu } from "pettyui/navigation-menu";
import { Wizard } from "pettyui/wizard";
import { ComponentDemo } from "../component-demo";
/** Link demo with variants. */
function LinkDemo() {
return (
Internal link
External link ↗
Disabled link
);
}
/** Breadcrumbs demo with 3 levels. */
function BreadcrumbsDemo() {
return (
Home/Components/Breadcrumbs
);
}
/** Tabs demo with 3 panels. */
function TabsDemo() {
return (
Account
Password
Settings
Account settings contentPassword settings contentGeneral settings content
);
}
/** Accordion demo with 3 sections. */
function AccordionDemo() {
const items = [
{ value: "item-1", title: "What is PettyUI?", content: "A headless SolidJS component library." },
{ value: "item-2", title: "Is it accessible?", content: "Yes, all components follow WAI-ARIA patterns." },
{ value: "item-3", title: "Can I style it?", content: "Absolutely. It's headless — bring your own styles." },
];
return (
{(item) => (
{item.title}
▾
{item.content}
)}
);
}
/** Collapsible demo with expand/collapse. */
function CollapsibleDemo() {
return (
▶
Show more details
Here are the additional details that were hidden. Click again to collapse.
);
}
/** Pagination demo. */
function PaginationDemo() {
return (
);
}
/** NavigationMenu demo with dropdown. */
function NavigationMenuDemo() {
return (
Home
Products ▾
Widget A
Widget B
About
);
}
/** Wizard demo with 3 steps. */
function WizardDemo() {
return (
{(label, i) => (
{i() + 1}
{label}
)}
Step 1: Enter your details here.
Step 2: Review your information.
Step 3: Confirm and submit.
Previous
Next
);
}
/** Navigation section with all navigation components. */
export function NavigationSection() {
return (
<>
>
);
}
```
- [ ] **Step 2: Wire into app.tsx**
Add import:
```tsx
import { NavigationSection } from "./sections/navigation";
```
Replace navigation placeholder:
```tsx
```
- [ ] **Step 3: Verify in browser**
Expected: 8 navigation component demos. Tabs switch panels, accordion expands/collapses, wizard steps through.
- [ ] **Step 4: Commit**
```bash
git add packages/showcase/src/sections/navigation.tsx packages/showcase/src/app.tsx
git commit -m "feat(showcase): add Navigation section demos"
```
---
### Task 8: Overlays section
**Files:**
- Create: `packages/showcase/src/sections/overlays.tsx`
- Modify: `packages/showcase/src/app.tsx` — replace placeholder with ``
**Component exports used:**
- `Dialog` from `pettyui/dialog` — compound
- `AlertDialog` from `pettyui/alert-dialog` — compound
- `Drawer` from `pettyui/drawer` — compound
- `Popover` from `pettyui/popover` — compound
- `Tooltip, TooltipRoot, TooltipTrigger, TooltipContent` from `pettyui/tooltip` — named exports
- `HoverCard, HoverCardRoot, HoverCardTrigger, HoverCardContent` from `pettyui/hover-card` — named exports
- `DropdownMenu, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator` from `pettyui/dropdown-menu` — named exports
- `ContextMenu, ContextMenuRoot, ContextMenuTrigger, ContextMenuContent, ContextMenuItem` from `pettyui/context-menu` — named exports
- `CommandPalette` from `pettyui/command-palette` — compound
- [ ] **Step 1: Create overlays.tsx**
```tsx
import { createSignal } from "solid-js";
import { Dialog } from "pettyui/dialog";
import { AlertDialog } from "pettyui/alert-dialog";
import { Drawer } from "pettyui/drawer";
import { Popover } from "pettyui/popover";
import { TooltipRoot, TooltipTrigger, TooltipContent } from "pettyui/tooltip";
import { HoverCardRoot, HoverCardTrigger, HoverCardContent } from "pettyui/hover-card";
import { DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from "pettyui/dropdown-menu";
import { ContextMenuRoot, ContextMenuTrigger, ContextMenuContent, ContextMenuItem } from "pettyui/context-menu";
import { CommandPalette } from "pettyui/command-palette";
import { ComponentDemo } from "../component-demo";
const triggerBtn = "px-3 py-1.5 text-sm font-medium rounded border border-gray-300 hover:bg-gray-50";
const overlayBg = "fixed inset-0 bg-black/40 z-40";
const panelBase = "bg-white rounded-lg shadow-xl p-6 z-50";
/** Dialog demo with trigger. */
function DialogDemo() {
return (
);
}
/** AlertDialog demo with confirm/cancel. */
function AlertDialogDemo() {
return (
Delete ItemAre you sure?
This action cannot be undone.
Cancel
Delete
);
}
/** Drawer demo sliding from right. */
function DrawerDemo() {
return (
Open DrawerDrawer Panel
This drawer slides in from the right.
Close
);
}
/** Popover demo with floating content. */
function PopoverDemo() {
return (
Toggle Popover
This is a popover with interactive content.
Dismiss
);
}
/** Tooltip demo on hover. */
function TooltipDemo() {
return (
Hover me
This is a tooltip
);
}
/** HoverCard demo with rich preview. */
function HoverCardDemo() {
return (
@pettyui
PettyUI
AI-native headless UI for SolidJS. 44 components.
);
}
/** DropdownMenu demo with grouped actions. */
function DropdownMenuDemo() {
return (
Actions ▾EditDuplicateDelete
);
}
/** ContextMenu demo with right-click area. */
function ContextMenuDemo() {
return (
Right-click here
CopyPasteInspect
);
}
/** CommandPalette demo with searchable commands. */
function CommandPaletteDemo() {
const [open, setOpen] = createSignal(false);
return (
New File
Open File
Save
No results found
);
}
/** Overlays section with all overlay/modal components. */
export function OverlaysSection() {
return (
<>
>
);
}
```
- [ ] **Step 2: Wire into app.tsx**
Add import:
```tsx
import { OverlaysSection } from "./sections/overlays";
```
Replace overlays placeholder:
```tsx
```
- [ ] **Step 3: Verify in browser**
Expected: 9 overlay component demos. Dialog opens/closes, alert dialog shows confirm prompt, drawer slides in, popover floats, tooltip shows on hover, dropdown menu opens, right-click shows context menu, command palette opens.
- [ ] **Step 4: Commit**
```bash
git add packages/showcase/src/sections/overlays.tsx packages/showcase/src/app.tsx
git commit -m "feat(showcase): add Overlays section demos"
```
---
### Task 9: Feedback & Status section
**Files:**
- Create: `packages/showcase/src/sections/feedback-status.tsx`
- Modify: `packages/showcase/src/app.tsx` — replace placeholder with ``
**Component exports used:**
- `Alert` from `pettyui/alert` — simple: `Alert` (with `.Title`, `.Description` accessed via dot syntax from the Alert export)
- `Toast, toast` from `pettyui/toast` — `Toast.Region` compound, `toast()` imperative API
- `Progress` from `pettyui/progress` — simple: `Progress`
- `Meter` from `pettyui/meter` — simple: `Meter`
- [ ] **Step 1: Check Alert export pattern**
Read `packages/core/src/components/alert/alert.tsx` to verify if Alert has compound sub-components or is a flat component.
- [ ] **Step 2: Create feedback-status.tsx**
```tsx
import { Alert } from "pettyui/alert";
import { Toast, toast } from "pettyui/toast";
import { Progress } from "pettyui/progress";
import { Meter } from "pettyui/meter";
import { ComponentDemo } from "../component-demo";
/** Alert demo with multiple variants. */
function AlertDemo() {
return (
InfoThis is an informational alert.SuccessOperation completed successfully.ErrorSomething went wrong.
);
}
/** Toast demo with trigger button. */
function ToastDemo() {
return (
{(toastData) => (
{toastData.title}
{toastData.description &&
{toastData.description}
}
)}
);
}
/** Progress demo at 60%. */
function ProgressDemo() {
return (
Uploading...60%
);
}
/** Meter demo with value gauge. */
function MeterDemo() {
return (
Disk Usage75%
{(state) => (
)}
);
}
/** Feedback & Status section with notification and indicator components. */
export function FeedbackStatusSection() {
return (
<>
>
);
}
```
- [ ] **Step 3: Wire into app.tsx**
Add import:
```tsx
import { FeedbackStatusSection } from "./sections/feedback-status";
```
Replace feedback-status placeholder:
```tsx
```
- [ ] **Step 4: Verify in browser**
Expected: Alert variants display, toast buttons trigger temporary notifications, progress bar at 60%, meter at 75%.
- [ ] **Step 5: Commit**
```bash
git add packages/showcase/src/sections/feedback-status.tsx packages/showcase/src/app.tsx
git commit -m "feat(showcase): add Feedback & Status section demos"
```
---
### Task 10: Data section
**Files:**
- Create: `packages/showcase/src/sections/data.tsx`
- Modify: `packages/showcase/src/app.tsx` — replace placeholder with ``
**Component exports used:**
- `Calendar` from `pettyui/calendar` — compound: `Calendar`, `Calendar.Header`, `Calendar.Heading`, `Calendar.Nav`, `Calendar.PrevButton`, `Calendar.NextButton`, `Calendar.Grid`, `Calendar.GridHead`, `Calendar.GridBody`, `Calendar.Cell`
- `DataTable, DataTableRoot` from `pettyui/data-table` — named export
- `VirtualList` from `pettyui/virtual-list` — compound with empty sub-object
- [ ] **Step 1: Create data.tsx**
```tsx
import { For } from "solid-js";
import { Calendar } from "pettyui/calendar";
import { DataTable } from "pettyui/data-table";
import { VirtualList } from "pettyui/virtual-list";
import { ComponentDemo } from "../component-demo";
/** Calendar demo with month grid. */
function CalendarDemo() {
return (
‹
›
{(day) => (
)}
);
}
const sampleData = [
{ id: 1, name: "Alice Johnson", role: "Engineer", status: "Active" },
{ id: 2, name: "Bob Smith", role: "Designer", status: "Active" },
{ id: 3, name: "Carol Williams", role: "PM", status: "Inactive" },
{ id: 4, name: "David Brown", role: "Engineer", status: "Active" },
{ id: 5, name: "Eve Davis", role: "QA", status: "Active" },
];
/** DataTable demo with sortable columns. */
function DataTableDemo() {
return (
{(table) => (
)}
);
}
/** Data section with data display components. */
export function DataSection() {
return (
<>
>
);
}
```
- [ ] **Step 2: Wire into app.tsx**
Add import:
```tsx
import { DataSection } from "./sections/data";
```
Replace data placeholder:
```tsx
```
- [ ] **Step 3: Verify in browser**
Expected: Calendar shows month grid with selectable dates, data table shows 5 rows with headers, virtual list scrolls smoothly through 10k items.
- [ ] **Step 4: Commit**
```bash
git add packages/showcase/src/sections/data.tsx packages/showcase/src/app.tsx
git commit -m "feat(showcase): add Data section demos"
```
---
### Task 11: Final integration and polish
**Files:**
- Modify: `packages/showcase/src/app.tsx` — verify all imports are wired
- No new files
- [ ] **Step 1: Verify all 8 sections render**
Run: `cd packages/showcase && pnpm dev`
Scroll through the entire page and verify:
- Sticky header stays at top with working category nav links
- Smooth scroll to each section on nav click
- All 44 components have visible, interactive demos
- No console errors
- [ ] **Step 2: Fix any component API mismatches**
If any component demos don't render due to API mismatches (wrong prop names, different compound component structure), read the specific component source file and fix the demo code to match the actual API.
- [ ] **Step 3: Final commit**
```bash
git add -A packages/showcase/
git commit -m "feat(showcase): complete kitchen sink with all 44 components"
```