|
| 1 | +# UI Components |
| 2 | + |
| 3 | +PictoPy’s frontend uses a mix of shared primitives (based on ShadCN) and app-specific components. This page gives an overview of both so you can find and reuse the right parts when building or changing the UI. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +- **Primitives** live under `components/ui/` and provide buttons, inputs, dialogs, and other low-level building blocks. |
| 8 | +- **Feature components** implement gallery, onboarding, navigation, and media behaviour and often use these primitives. |
| 9 | + |
| 10 | +## ShadCN-style primitives (`components/ui/`) |
| 11 | + |
| 12 | +These are the base components used across the app: |
| 13 | + |
| 14 | +| Component | Role | |
| 15 | +|----------------|--------------------------------------------------| |
| 16 | +| `button` | Buttons with variants (default, outline, ghost) | |
| 17 | +| `card` | Card container with header, content, footer | |
| 18 | +| `dialog` | Modal dialogs | |
| 19 | +| `input` | Text inputs | |
| 20 | +| `label` | Form labels | |
| 21 | +| `textarea` | Multi-line text input | |
| 22 | +| `badge` | Tags and status badges | |
| 23 | +| `alert` | Inline alerts and messages | |
| 24 | +| `avatar` | User or entity avatars | |
| 25 | +| `dropdown-menu`| Dropdown menus | |
| 26 | +| `scroll-area` | Custom scrollable areas | |
| 27 | +| `sidebar` | App sidebar layout | |
| 28 | +| `sheet` | Slide-out panels | |
| 29 | +| `separator` | Visual dividers | |
| 30 | +| `slider` | Slider for volume, video-duration, etc. | |
| 31 | +| `switch` | Toggle switches | |
| 32 | +| `radio-group` | Radio button groups | |
| 33 | +| `pagination` | Pagination controls | |
| 34 | +| `progress` | Progress bars | |
| 35 | +| `skeleton` | Loading skeletons | |
| 36 | +| `tooltip` | Hover tooltips | |
| 37 | +| `aspect-ratio` | Fixed aspect-ratio wrapper | |
| 38 | + |
| 39 | +App-specific UI pieces in the same area: |
| 40 | + |
| 41 | +- **404** – Not-found page layout |
| 42 | +- **ErrorPage** – Full-page error view |
| 43 | +- **LoadingScreen** – App loading screen |
| 44 | +- **Icons** – Shared icon set |
| 45 | +- **PaginationControls** – Pagination tuned for the gallery |
| 46 | + |
| 47 | +## Feature components |
| 48 | + |
| 49 | +These implement specific features and often use the primitives above: |
| 50 | + |
| 51 | +### Media and gallery |
| 52 | + |
| 53 | +- **Media/** – `ChronologicalGallery`, `ImageCard`, `ImageViewer`, `MediaView`, `MediaThumbnails`, `MediaInfoPanel`, `MediaViewControls`, `ZoomControls`, `NavigationButtons`, `ImageTags` |
| 54 | +- **FaceCollections** – Face clusters and naming UI |
| 55 | + |
| 56 | +### Navigation and layout |
| 57 | + |
| 58 | +- **Navigation/Navbar** – Top app bar |
| 59 | +- **Navigation/Sidebar** – App sidebar (e.g. `AppSidebar`) |
| 60 | + |
| 61 | +### Onboarding and settings |
| 62 | + |
| 63 | +- **OnboardingSteps/** – Steps, folder setup, avatar choice, theme selection, server check, etc. |
| 64 | +- **account-settings** – User account and preference UI |
| 65 | + |
| 66 | +### Dialogs and feedback |
| 67 | + |
| 68 | +- **Dialog/** – `InfoDialog`, `FaceSearchDialog` |
| 69 | +- **Loader/** – `GlobalLoader` |
| 70 | +- **EmptyStates/** – `EmptyGalleryState`, `EmptyAITaggingState` |
| 71 | + |
| 72 | +### Other |
| 73 | + |
| 74 | +- **FolderPicker/** – Folder selection and related dialogs (e.g. `DeleteImageDialog`) |
| 75 | +- **ThemeToggle** – Light/dark theme switch |
| 76 | +- **Timeline/** – `TimelineScrollbar` |
| 77 | +- **Updater/** – `UpdateDialog` |
| 78 | +- **VideoPlayer/** – `NetflixStylePlayer` |
| 79 | +- **WebCam/** – `WebCamComponent` |
| 80 | + |
| 81 | +## Styling |
| 82 | + |
| 83 | +UI components are styled with **Tailwind CSS**. Shared look and behaviour (including themes) are kept consistent via Tailwind classes and the design tokens used by the ShadCN-based components. |
| 84 | + |
| 85 | +## Related documentation |
| 86 | + |
| 87 | +- [Gallery View](gallery-view.md) – How the main gallery is built from these components |
| 88 | +- [State Management](state-management.md) – How components connect to Redux |
| 89 | +- [Screenshots](screenshots.md) – Screenshots of the app using these components |
0 commit comments