@neynar/ui 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +195 -0
- package/dist/components/ui/accordion.d.ts +229 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +247 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert.d.ts +187 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +94 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/avatar.d.ts +244 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +163 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +281 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +129 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/calendar.d.ts +169 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +365 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/carousel.d.ts +369 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/chart.d.ts +442 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts +88 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/collapsible.d.ts +182 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/combobox.d.ts +270 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +355 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/container.d.ts +102 -0
- package/dist/components/ui/container.d.ts.map +1 -0
- package/dist/components/ui/context-menu.d.ts +339 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/date-picker.d.ts +145 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +322 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/drawer.d.ts +154 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +349 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/empty-state.d.ts +133 -0
- package/dist/components/ui/empty-state.d.ts.map +1 -0
- package/dist/components/ui/hover-card.d.ts +109 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +89 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +93 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/menubar.d.ts +306 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +318 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/pagination.d.ts +343 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +178 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/progress.d.ts +64 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/radio-group.d.ts +144 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/resizable.d.ts +164 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +82 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +316 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +80 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts +346 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sidebar.d.ts +1561 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +66 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/slider.d.ts +95 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/sonner.d.ts +101 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/stack.d.ts +192 -0
- package/dist/components/ui/stack.d.ts.map +1 -0
- package/dist/components/ui/stories/accordion.stories.d.ts +71 -0
- package/dist/components/ui/stories/accordion.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/alert-dialog.stories.d.ts +39 -0
- package/dist/components/ui/stories/alert-dialog.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/alert.stories.d.ts +48 -0
- package/dist/components/ui/stories/alert.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts +53 -0
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/avatar.stories.d.ts +49 -0
- package/dist/components/ui/stories/avatar.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/badge.stories.d.ts +64 -0
- package/dist/components/ui/stories/badge.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/breadcrumb.stories.d.ts +27 -0
- package/dist/components/ui/stories/breadcrumb.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/button.stories.d.ts +92 -0
- package/dist/components/ui/stories/button.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/calendar.stories.d.ts +94 -0
- package/dist/components/ui/stories/calendar.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/card.stories.d.ts +29 -0
- package/dist/components/ui/stories/card.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/carousel.stories.d.ts +42 -0
- package/dist/components/ui/stories/carousel.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/chart.stories.d.ts +51 -0
- package/dist/components/ui/stories/chart.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/checkbox.stories.d.ts +72 -0
- package/dist/components/ui/stories/checkbox.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/cn.stories.d.ts +19 -0
- package/dist/components/ui/stories/cn.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/collapsible.stories.d.ts +51 -0
- package/dist/components/ui/stories/collapsible.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/colors.stories.d.ts +31 -0
- package/dist/components/ui/stories/colors.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/combobox.stories.d.ts +89 -0
- package/dist/components/ui/stories/combobox.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/command.stories.d.ts +69 -0
- package/dist/components/ui/stories/command.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/container.stories.d.ts +42 -0
- package/dist/components/ui/stories/container.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/context-menu.stories.d.ts +32 -0
- package/dist/components/ui/stories/context-menu.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/date-picker.stories.d.ts +67 -0
- package/dist/components/ui/stories/date-picker.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/dialog.stories.d.ts +48 -0
- package/dist/components/ui/stories/dialog.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/drawer.stories.d.ts +33 -0
- package/dist/components/ui/stories/drawer.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/dropdown-menu.stories.d.ts +31 -0
- package/dist/components/ui/stories/dropdown-menu.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/empty-state.stories.d.ts +74 -0
- package/dist/components/ui/stories/empty-state.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/hover-card.stories.d.ts +35 -0
- package/dist/components/ui/stories/hover-card.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/input.stories.d.ts +69 -0
- package/dist/components/ui/stories/input.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/label.stories.d.ts +47 -0
- package/dist/components/ui/stories/label.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/menubar.stories.d.ts +39 -0
- package/dist/components/ui/stories/menubar.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/navigation-menu.stories.d.ts +44 -0
- package/dist/components/ui/stories/navigation-menu.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/pagination.stories.d.ts +33 -0
- package/dist/components/ui/stories/pagination.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/popover.stories.d.ts +36 -0
- package/dist/components/ui/stories/popover.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/progress.stories.d.ts +38 -0
- package/dist/components/ui/stories/progress.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/radio-group.stories.d.ts +76 -0
- package/dist/components/ui/stories/radio-group.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/resizable.stories.d.ts +49 -0
- package/dist/components/ui/stories/resizable.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/scroll-area.stories.d.ts +35 -0
- package/dist/components/ui/stories/scroll-area.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/select.stories.d.ts +51 -0
- package/dist/components/ui/stories/select.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/separator.stories.d.ts +58 -0
- package/dist/components/ui/stories/separator.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/sheet.stories.d.ts +43 -0
- package/dist/components/ui/stories/sheet.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/sidebar.stories.d.ts +60 -0
- package/dist/components/ui/stories/sidebar.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/skeleton.stories.d.ts +42 -0
- package/dist/components/ui/stories/skeleton.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/slider.stories.d.ts +99 -0
- package/dist/components/ui/stories/slider.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/sonner.stories.d.ts +9 -0
- package/dist/components/ui/stories/sonner.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/stack.stories.d.ts +39 -0
- package/dist/components/ui/stories/stack.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/switch.stories.d.ts +71 -0
- package/dist/components/ui/stories/switch.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/table.stories.d.ts +40 -0
- package/dist/components/ui/stories/table.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/tabs.stories.d.ts +62 -0
- package/dist/components/ui/stories/tabs.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/text-field.stories.d.ts +78 -0
- package/dist/components/ui/stories/text-field.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/textarea.stories.d.ts +57 -0
- package/dist/components/ui/stories/textarea.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/theme-toggle.stories.d.ts +71 -0
- package/dist/components/ui/stories/theme-toggle.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/theme.stories.d.ts +51 -0
- package/dist/components/ui/stories/theme.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/toggle-group.stories.d.ts +71 -0
- package/dist/components/ui/stories/toggle-group.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/toggle.stories.d.ts +78 -0
- package/dist/components/ui/stories/toggle.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/tooltip.stories.d.ts +37 -0
- package/dist/components/ui/stories/tooltip.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/typography.stories.d.ts +137 -0
- package/dist/components/ui/stories/typography.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/use-mobile.stories.d.ts +20 -0
- package/dist/components/ui/stories/use-mobile.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/use-theme.stories.d.ts +23 -0
- package/dist/components/ui/stories/use-theme.stories.d.ts.map +1 -0
- package/dist/components/ui/switch.d.ts +84 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts +321 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +260 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/text-field.d.ts +157 -0
- package/dist/components/ui/text-field.d.ts.map +1 -0
- package/dist/components/ui/textarea.d.ts +84 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/theme-toggle.d.ts +105 -0
- package/dist/components/ui/theme-toggle.d.ts.map +1 -0
- package/dist/components/ui/theme.d.ts +110 -0
- package/dist/components/ui/theme.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +133 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle.d.ts +84 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +202 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/typography.d.ts +287 -0
- package/dist/components/ui/typography.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +74 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-theme.d.ts +142 -0
- package/dist/hooks/use-theme.d.ts.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27498 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +43 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docs/llm/colors.md +273 -0
- package/docs/llm/components/buttons.md +68 -0
- package/docs/llm/components/cards.md +53 -0
- package/docs/llm/components/display.md +134 -0
- package/docs/llm/components/feedback.md +96 -0
- package/docs/llm/components/forms.md +90 -0
- package/docs/llm/components/layout.md +59 -0
- package/docs/llm/components/menus.md +70 -0
- package/docs/llm/components/navigation.md +80 -0
- package/docs/llm/components/overlays.md +83 -0
- package/docs/llm/components/tables.md +73 -0
- package/docs/llm/components/typography.md +199 -0
- package/docs/llm/components/utilities.md +114 -0
- package/docs/llm/guide.md +165 -0
- package/llms.txt +122 -0
- package/package.json +104 -0
- package/src/components/ui/accordion.tsx +285 -0
- package/src/components/ui/alert-dialog.tsx +387 -0
- package/src/components/ui/alert.tsx +243 -0
- package/src/components/ui/aspect-ratio.tsx +99 -0
- package/src/components/ui/avatar.tsx +288 -0
- package/src/components/ui/badge.tsx +205 -0
- package/src/components/ui/breadcrumb.tsx +378 -0
- package/src/components/ui/button.tsx +195 -0
- package/src/components/ui/calendar.tsx +371 -0
- package/src/components/ui/card.tsx +447 -0
- package/src/components/ui/carousel.tsx +624 -0
- package/src/components/ui/chart.tsx +802 -0
- package/src/components/ui/checkbox.tsx +113 -0
- package/src/components/ui/collapsible.tsx +207 -0
- package/src/components/ui/combobox.tsx +373 -0
- package/src/components/ui/command.tsx +518 -0
- package/src/components/ui/container.tsx +114 -0
- package/src/components/ui/context-menu.tsx +563 -0
- package/src/components/ui/date-picker.tsx +213 -0
- package/src/components/ui/dialog.tsx +447 -0
- package/src/components/ui/drawer.tsx +273 -0
- package/src/components/ui/dropdown-menu.tsx +578 -0
- package/src/components/ui/empty-state.tsx +145 -0
- package/src/components/ui/hover-card.tsx +144 -0
- package/src/components/ui/input.tsx +106 -0
- package/src/components/ui/label.tsx +110 -0
- package/src/components/ui/menubar.tsx +553 -0
- package/src/components/ui/navigation-menu.tsx +471 -0
- package/src/components/ui/pagination.tsx +456 -0
- package/src/components/ui/popover.tsx +216 -0
- package/src/components/ui/progress.tsx +88 -0
- package/src/components/ui/radio-group.tsx +183 -0
- package/src/components/ui/resizable.tsx +209 -0
- package/src/components/ui/scroll-area.tsx +132 -0
- package/src/components/ui/select.tsx +485 -0
- package/src/components/ui/separator.tsx +101 -0
- package/src/components/ui/sheet.tsx +495 -0
- package/src/components/ui/sidebar.tsx +2211 -0
- package/src/components/ui/skeleton.tsx +76 -0
- package/src/components/ui/slider.tsx +147 -0
- package/src/components/ui/sonner.tsx +120 -0
- package/src/components/ui/stack.tsx +180 -0
- package/src/components/ui/stories/accordion.stories.tsx +429 -0
- package/src/components/ui/stories/alert-dialog.stories.tsx +519 -0
- package/src/components/ui/stories/alert.stories.tsx +228 -0
- package/src/components/ui/stories/aspect-ratio.stories.tsx +200 -0
- package/src/components/ui/stories/avatar.stories.tsx +317 -0
- package/src/components/ui/stories/badge.stories.tsx +260 -0
- package/src/components/ui/stories/breadcrumb.stories.tsx +482 -0
- package/src/components/ui/stories/button.stories.tsx +266 -0
- package/src/components/ui/stories/calendar.stories.tsx +375 -0
- package/src/components/ui/stories/card.stories.tsx +308 -0
- package/src/components/ui/stories/carousel.stories.tsx +328 -0
- package/src/components/ui/stories/chart.stories.tsx +430 -0
- package/src/components/ui/stories/checkbox.stories.tsx +297 -0
- package/src/components/ui/stories/cn.stories.tsx +433 -0
- package/src/components/ui/stories/collapsible.stories.tsx +256 -0
- package/src/components/ui/stories/colors.stories.tsx +502 -0
- package/src/components/ui/stories/combobox.stories.tsx +301 -0
- package/src/components/ui/stories/command.stories.tsx +632 -0
- package/src/components/ui/stories/container.stories.tsx +250 -0
- package/src/components/ui/stories/context-menu.stories.tsx +446 -0
- package/src/components/ui/stories/date-picker.stories.tsx +378 -0
- package/src/components/ui/stories/dialog.stories.tsx +535 -0
- package/src/components/ui/stories/drawer.stories.tsx +364 -0
- package/src/components/ui/stories/dropdown-menu.stories.tsx +374 -0
- package/src/components/ui/stories/empty-state.stories.tsx +244 -0
- package/src/components/ui/stories/hover-card.stories.tsx +355 -0
- package/src/components/ui/stories/input.stories.tsx +289 -0
- package/src/components/ui/stories/label.stories.tsx +294 -0
- package/src/components/ui/stories/menubar.stories.tsx +764 -0
- package/src/components/ui/stories/navigation-menu.stories.tsx +539 -0
- package/src/components/ui/stories/pagination.stories.tsx +604 -0
- package/src/components/ui/stories/popover.stories.tsx +392 -0
- package/src/components/ui/stories/progress.stories.tsx +218 -0
- package/src/components/ui/stories/radio-group.stories.tsx +400 -0
- package/src/components/ui/stories/resizable.stories.tsx +417 -0
- package/src/components/ui/stories/scroll-area.stories.tsx +180 -0
- package/src/components/ui/stories/select.stories.tsx +389 -0
- package/src/components/ui/stories/separator.stories.tsx +192 -0
- package/src/components/ui/stories/sheet.stories.tsx +468 -0
- package/src/components/ui/stories/sidebar.stories.tsx +731 -0
- package/src/components/ui/stories/skeleton.stories.tsx +216 -0
- package/src/components/ui/stories/slider.stories.tsx +321 -0
- package/src/components/ui/stories/sonner.stories.tsx +373 -0
- package/src/components/ui/stories/stack.stories.tsx +222 -0
- package/src/components/ui/stories/switch.stories.tsx +202 -0
- package/src/components/ui/stories/table.stories.tsx +541 -0
- package/src/components/ui/stories/tabs.stories.tsx +544 -0
- package/src/components/ui/stories/text-field.stories.tsx +280 -0
- package/src/components/ui/stories/textarea.stories.tsx +245 -0
- package/src/components/ui/stories/theme-toggle.stories.tsx +275 -0
- package/src/components/ui/stories/theme.stories.tsx +412 -0
- package/src/components/ui/stories/toggle-group.stories.tsx +337 -0
- package/src/components/ui/stories/toggle.stories.tsx +325 -0
- package/src/components/ui/stories/tooltip.stories.tsx +444 -0
- package/src/components/ui/stories/typography.stories.tsx +1586 -0
- package/src/components/ui/stories/use-mobile.stories.tsx +420 -0
- package/src/components/ui/stories/use-theme.stories.tsx +531 -0
- package/src/components/ui/switch.tsx +106 -0
- package/src/components/ui/table.tsx +424 -0
- package/src/components/ui/tabs.tsx +316 -0
- package/src/components/ui/text-field.tsx +206 -0
- package/src/components/ui/textarea.tsx +98 -0
- package/src/components/ui/theme-toggle.tsx +185 -0
- package/src/components/ui/theme.tsx +148 -0
- package/src/components/ui/toggle-group.tsx +196 -0
- package/src/components/ui/toggle.tsx +115 -0
- package/src/components/ui/tooltip.tsx +253 -0
- package/src/components/ui/typography.tsx +468 -0
- package/src/hooks/use-mobile.ts +91 -0
- package/src/hooks/use-theme.ts +319 -0
- package/src/index.ts +77 -0
- package/src/lib/utils.ts +57 -0
- package/src/styles/globals.css +160 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# Colors - LLM Reference Guide
|
|
2
|
+
|
|
3
|
+
This document provides AI assistants with precise Tailwind CSS class references for the @neynar/ui design system colors.
|
|
4
|
+
|
|
5
|
+
## Available Tailwind Classes
|
|
6
|
+
|
|
7
|
+
### Background Colors
|
|
8
|
+
|
|
9
|
+
#### Core Backgrounds
|
|
10
|
+
```
|
|
11
|
+
bg-background /* Primary page background */
|
|
12
|
+
bg-foreground /* High contrast background (rare use) */
|
|
13
|
+
bg-card /* Elevated container background */
|
|
14
|
+
bg-popover /* Overlay/dropdown background */
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
#### Brand & Action Colors
|
|
18
|
+
```
|
|
19
|
+
bg-primary /* Farcaster Purple - primary actions */
|
|
20
|
+
bg-secondary /* Secondary actions, subtle emphasis */
|
|
21
|
+
bg-muted /* Subtle backgrounds, disabled states */
|
|
22
|
+
bg-accent /* Subtle accent backgrounds */
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### State Colors
|
|
26
|
+
```
|
|
27
|
+
bg-destructive /* Error states, dangerous actions */
|
|
28
|
+
bg-success /* Success states, confirmations */
|
|
29
|
+
bg-warning /* Warning states, cautions */
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### Interactive Elements
|
|
33
|
+
```
|
|
34
|
+
bg-input /* Form field backgrounds */
|
|
35
|
+
bg-border /* Not typically used as background */
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Chart Colors
|
|
39
|
+
```
|
|
40
|
+
bg-chart-1 /* Data visualization - Blue 1 */
|
|
41
|
+
bg-chart-2 /* Data visualization - Blue 2 */
|
|
42
|
+
bg-chart-3 /* Data visualization - Purple 1 */
|
|
43
|
+
bg-chart-4 /* Data visualization - Purple 2 */
|
|
44
|
+
bg-chart-5 /* Data visualization - Violet */
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Sidebar Colors
|
|
48
|
+
```
|
|
49
|
+
bg-sidebar /* Sidebar container background */
|
|
50
|
+
bg-sidebar-primary /* Active sidebar items */
|
|
51
|
+
bg-sidebar-accent /* Sidebar accent backgrounds */
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Text Colors
|
|
55
|
+
|
|
56
|
+
#### Core Text Colors
|
|
57
|
+
```
|
|
58
|
+
text-foreground /* Primary text color */
|
|
59
|
+
text-background /* Inverse text (rare use) */
|
|
60
|
+
text-card-foreground /* Text on card backgrounds */
|
|
61
|
+
text-popover-foreground /* Text on popover backgrounds */
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### Brand & Action Text Colors
|
|
65
|
+
```
|
|
66
|
+
text-primary /* Primary color text (not on backgrounds) */
|
|
67
|
+
text-primary-foreground /* Text on primary backgrounds */
|
|
68
|
+
text-secondary /* Secondary color text (not on backgrounds) */
|
|
69
|
+
text-secondary-foreground /* Text on secondary backgrounds */
|
|
70
|
+
text-muted-foreground /* Muted text, secondary information */
|
|
71
|
+
text-accent-foreground /* Text on accent backgrounds */
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
#### State Text Colors
|
|
75
|
+
```
|
|
76
|
+
text-destructive /* Error text (not on backgrounds) */
|
|
77
|
+
text-destructive-foreground /* Text on destructive backgrounds */
|
|
78
|
+
text-success /* Success text (not on backgrounds) */
|
|
79
|
+
text-success-foreground /* Text on success backgrounds */
|
|
80
|
+
text-warning /* Warning text (not on backgrounds) */
|
|
81
|
+
text-warning-foreground /* Text on warning backgrounds */
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Sidebar Text Colors
|
|
85
|
+
```
|
|
86
|
+
text-sidebar-foreground /* Text in sidebar */
|
|
87
|
+
text-sidebar-primary-foreground /* Text on active sidebar items */
|
|
88
|
+
text-sidebar-accent-foreground /* Text on sidebar accent backgrounds */
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Border Colors
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
border-border /* Default border color */
|
|
95
|
+
border-input /* Form field borders */
|
|
96
|
+
border-ring /* Not typically used for borders */
|
|
97
|
+
border-primary /* Primary color borders */
|
|
98
|
+
border-secondary /* Secondary color borders */
|
|
99
|
+
border-muted /* Muted borders */
|
|
100
|
+
border-accent /* Accent borders */
|
|
101
|
+
border-destructive /* Error borders */
|
|
102
|
+
border-success /* Success borders */
|
|
103
|
+
border-warning /* Warning borders */
|
|
104
|
+
border-sidebar-border /* Sidebar borders */
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Ring Colors (Focus States)
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
ring-ring /* Default focus ring */
|
|
111
|
+
ring-primary /* Primary focus ring */
|
|
112
|
+
ring-destructive /* Error focus ring */
|
|
113
|
+
ring-success /* Success focus ring */
|
|
114
|
+
ring-warning /* Warning focus ring */
|
|
115
|
+
ring-sidebar-ring /* Sidebar focus ring */
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Usage Patterns
|
|
119
|
+
|
|
120
|
+
### Proper Color Pairing
|
|
121
|
+
|
|
122
|
+
**Always pair backgrounds with their corresponding foreground colors:**
|
|
123
|
+
|
|
124
|
+
```tsx
|
|
125
|
+
// ✅ Correct pairing
|
|
126
|
+
<div className="bg-primary text-primary-foreground">Primary button</div>
|
|
127
|
+
<div className="bg-secondary text-secondary-foreground">Secondary button</div>
|
|
128
|
+
<div className="bg-card text-card-foreground">Card content</div>
|
|
129
|
+
<div className="bg-muted text-muted-foreground">Muted content</div>
|
|
130
|
+
|
|
131
|
+
// ❌ Incorrect pairing (poor contrast)
|
|
132
|
+
<div className="bg-primary text-foreground">Bad contrast</div>
|
|
133
|
+
<div className="bg-secondary text-primary">Wrong pairing</div>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Common Component Patterns
|
|
137
|
+
|
|
138
|
+
#### Buttons
|
|
139
|
+
```tsx
|
|
140
|
+
/* Primary button */
|
|
141
|
+
<button className="bg-primary text-primary-foreground hover:bg-primary/90">
|
|
142
|
+
Primary Action
|
|
143
|
+
</button>
|
|
144
|
+
|
|
145
|
+
/* Secondary button */
|
|
146
|
+
<button className="bg-secondary text-secondary-foreground hover:bg-secondary/80">
|
|
147
|
+
Secondary Action
|
|
148
|
+
</button>
|
|
149
|
+
|
|
150
|
+
/* Destructive button */
|
|
151
|
+
<button className="bg-destructive text-destructive-foreground hover:bg-destructive/90">
|
|
152
|
+
Delete
|
|
153
|
+
</button>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### Cards
|
|
157
|
+
```tsx
|
|
158
|
+
/* Standard card */
|
|
159
|
+
<div className="bg-card text-card-foreground border border-border rounded-lg">
|
|
160
|
+
Card content
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
/* Muted card */
|
|
164
|
+
<div className="bg-muted text-muted-foreground rounded-lg">
|
|
165
|
+
Subtle card
|
|
166
|
+
</div>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
#### Form Fields
|
|
170
|
+
```tsx
|
|
171
|
+
/* Input field */
|
|
172
|
+
<input className="bg-input text-foreground border border-input rounded-md focus:ring-2 focus:ring-ring" />
|
|
173
|
+
|
|
174
|
+
/* Error state */
|
|
175
|
+
<input className="bg-input text-foreground border border-destructive rounded-md focus:ring-2 focus:ring-destructive" />
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
#### Status Messages
|
|
179
|
+
```tsx
|
|
180
|
+
/* Success message */
|
|
181
|
+
<div className="bg-success text-success-foreground p-4 rounded-lg">
|
|
182
|
+
Success message
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
/* Error message */
|
|
186
|
+
<div className="bg-destructive text-destructive-foreground p-4 rounded-lg">
|
|
187
|
+
Error message
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
/* Warning message */
|
|
191
|
+
<div className="bg-warning text-warning-foreground p-4 rounded-lg">
|
|
192
|
+
Warning message
|
|
193
|
+
</div>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Text-Only Color Usage
|
|
197
|
+
|
|
198
|
+
For text that isn't on a colored background, use these classes:
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
/* Primary color text */
|
|
202
|
+
<span className="text-primary">Primary link</span>
|
|
203
|
+
|
|
204
|
+
/* Muted text */
|
|
205
|
+
<span className="text-muted-foreground">Secondary information</span>
|
|
206
|
+
|
|
207
|
+
/* Error text */
|
|
208
|
+
<span className="text-destructive">Error message</span>
|
|
209
|
+
|
|
210
|
+
/* Success text */
|
|
211
|
+
<span className="text-success">Success message</span>
|
|
212
|
+
|
|
213
|
+
/* Warning text */
|
|
214
|
+
<span className="text-warning">Warning message</span>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Color Opacity Modifiers
|
|
218
|
+
|
|
219
|
+
Use opacity modifiers for hover states and variations:
|
|
220
|
+
|
|
221
|
+
```tsx
|
|
222
|
+
/* Hover states */
|
|
223
|
+
<button className="bg-primary hover:bg-primary/90">Button</button>
|
|
224
|
+
<button className="bg-secondary hover:bg-secondary/80">Button</button>
|
|
225
|
+
|
|
226
|
+
/* Subtle backgrounds */
|
|
227
|
+
<div className="bg-primary/10 text-primary">Subtle primary background</div>
|
|
228
|
+
<div className="bg-destructive/10 text-destructive">Subtle error background</div>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Theme Adaptation
|
|
232
|
+
|
|
233
|
+
All colors automatically adapt between light and dark themes. No additional classes needed:
|
|
234
|
+
|
|
235
|
+
```tsx
|
|
236
|
+
/* This automatically uses light colors in light mode, dark colors in dark mode */
|
|
237
|
+
<div className="bg-background text-foreground">
|
|
238
|
+
Content adapts to theme
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<div className="bg-card text-card-foreground border border-border">
|
|
242
|
+
Card adapts to theme
|
|
243
|
+
</div>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Color Hierarchy
|
|
247
|
+
|
|
248
|
+
Use this hierarchy for importance:
|
|
249
|
+
|
|
250
|
+
1. **Primary** - Most important actions, brand elements
|
|
251
|
+
2. **Secondary** - Secondary actions, less prominent elements
|
|
252
|
+
3. **Accent** - Subtle emphasis, information highlights
|
|
253
|
+
4. **Muted** - Background elements, disabled states
|
|
254
|
+
5. **Foreground/Background** - Base content
|
|
255
|
+
|
|
256
|
+
## Accessibility Notes
|
|
257
|
+
|
|
258
|
+
- All color combinations maintain WCAG AA contrast ratios (4.5:1 minimum)
|
|
259
|
+
- Always use foreground colors with their corresponding backgrounds
|
|
260
|
+
- Use state colors (destructive, success, warning) appropriately for user feedback
|
|
261
|
+
- Focus rings provide clear visual focus indicators
|
|
262
|
+
|
|
263
|
+
## Quick Reference
|
|
264
|
+
|
|
265
|
+
**Most Common Classes:**
|
|
266
|
+
- `bg-background text-foreground` - Page content
|
|
267
|
+
- `bg-card text-card-foreground` - Cards, containers
|
|
268
|
+
- `bg-primary text-primary-foreground` - Primary buttons
|
|
269
|
+
- `bg-secondary text-secondary-foreground` - Secondary buttons
|
|
270
|
+
- `text-muted-foreground` - Secondary text
|
|
271
|
+
- `border-border` - Default borders
|
|
272
|
+
- `bg-destructive text-destructive-foreground` - Error states
|
|
273
|
+
- `bg-success text-success-foreground` - Success states
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Button Components
|
|
2
|
+
|
|
3
|
+
## Button
|
|
4
|
+
|
|
5
|
+
Primary interactive element with multiple variants and sizes.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Button } from "@neynar/ui"
|
|
9
|
+
|
|
10
|
+
// Basic usage
|
|
11
|
+
<Button onClick={() => console.log("clicked")}>Click me</Button>
|
|
12
|
+
|
|
13
|
+
// Variants
|
|
14
|
+
<Button variant="default">Default</Button>
|
|
15
|
+
<Button variant="destructive">Delete</Button>
|
|
16
|
+
<Button variant="outline">Outline</Button>
|
|
17
|
+
<Button variant="secondary">Secondary</Button>
|
|
18
|
+
<Button variant="ghost">Ghost</Button>
|
|
19
|
+
<Button variant="link">Link</Button>
|
|
20
|
+
|
|
21
|
+
// Sizes
|
|
22
|
+
<Button size="sm">Small</Button>
|
|
23
|
+
<Button size="default">Default</Button>
|
|
24
|
+
<Button size="lg">Large</Button>
|
|
25
|
+
<Button size="icon">🔥</Button>
|
|
26
|
+
|
|
27
|
+
// AsChild pattern - renders as different element
|
|
28
|
+
<Button asChild>
|
|
29
|
+
<a href="/profile">Go to Profile</a>
|
|
30
|
+
</Button>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Toggle
|
|
34
|
+
|
|
35
|
+
Single toggle state component for on/off interactions.
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { Toggle } from "@neynar/ui"
|
|
39
|
+
|
|
40
|
+
<Toggle pressed={isPressed} onPressedChange={setIsPressed}>
|
|
41
|
+
Bold
|
|
42
|
+
</Toggle>
|
|
43
|
+
|
|
44
|
+
<Toggle variant="outline" size="sm">
|
|
45
|
+
Italic
|
|
46
|
+
</Toggle>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## ToggleGroup
|
|
50
|
+
|
|
51
|
+
Group of related toggles with single or multiple selection.
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
import { ToggleGroup, ToggleGroupItem } from "@neynar/ui"
|
|
55
|
+
|
|
56
|
+
// Single selection
|
|
57
|
+
<ToggleGroup type="single" value={align} onValueChange={setAlign}>
|
|
58
|
+
<ToggleGroupItem value="left">Left</ToggleGroupItem>
|
|
59
|
+
<ToggleGroupItem value="center">Center</ToggleGroupItem>
|
|
60
|
+
<ToggleGroupItem value="right">Right</ToggleGroupItem>
|
|
61
|
+
</ToggleGroup>
|
|
62
|
+
|
|
63
|
+
// Multiple selection
|
|
64
|
+
<ToggleGroup type="multiple" value={features} onValueChange={setFeatures}>
|
|
65
|
+
<ToggleGroupItem value="bold">Bold</ToggleGroupItem>
|
|
66
|
+
<ToggleGroupItem value="italic">Italic</ToggleGroupItem>
|
|
67
|
+
</ToggleGroup>
|
|
68
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Cards
|
|
2
|
+
|
|
3
|
+
Card components for structured content with semantic sections.
|
|
4
|
+
|
|
5
|
+
## Components
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@neynar/ui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic Structure
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Card>
|
|
15
|
+
<CardHeader>
|
|
16
|
+
<CardTitle>Card Title</CardTitle>
|
|
17
|
+
<CardDescription>Optional description text</CardDescription>
|
|
18
|
+
</CardHeader>
|
|
19
|
+
<CardContent>
|
|
20
|
+
Main content area
|
|
21
|
+
</CardContent>
|
|
22
|
+
<CardFooter>
|
|
23
|
+
Footer actions or metadata
|
|
24
|
+
</CardFooter>
|
|
25
|
+
</Card>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Composition Patterns
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
// Profile card
|
|
32
|
+
<Card>
|
|
33
|
+
<CardHeader>
|
|
34
|
+
<CardTitle>@username</CardTitle>
|
|
35
|
+
<CardDescription>User bio text</CardDescription>
|
|
36
|
+
</CardHeader>
|
|
37
|
+
<CardContent>
|
|
38
|
+
<Avatar />
|
|
39
|
+
<p>Additional profile details</p>
|
|
40
|
+
</CardContent>
|
|
41
|
+
<CardFooter>
|
|
42
|
+
<Button>Follow</Button>
|
|
43
|
+
</CardFooter>
|
|
44
|
+
</Card>
|
|
45
|
+
|
|
46
|
+
// Data card with minimal sections
|
|
47
|
+
<Card>
|
|
48
|
+
<CardContent>
|
|
49
|
+
<h3>Analytics</h3>
|
|
50
|
+
<p>Key metrics and data</p>
|
|
51
|
+
</CardContent>
|
|
52
|
+
</Card>
|
|
53
|
+
```
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Display Components
|
|
2
|
+
|
|
3
|
+
## Avatar
|
|
4
|
+
User profile pictures with fallbacks and status indicators.
|
|
5
|
+
|
|
6
|
+
```tsx
|
|
7
|
+
import { Avatar, AvatarImage, AvatarFallback } from "@neynar/ui"
|
|
8
|
+
|
|
9
|
+
// Basic avatar with fallback
|
|
10
|
+
<Avatar>
|
|
11
|
+
<AvatarImage src="/user.jpg" alt="User" />
|
|
12
|
+
<AvatarFallback>JD</AvatarFallback>
|
|
13
|
+
</Avatar>
|
|
14
|
+
|
|
15
|
+
// Sizes: sm, default, lg
|
|
16
|
+
<Avatar className="h-6 w-6">
|
|
17
|
+
<AvatarImage src="/user.jpg" />
|
|
18
|
+
<AvatarFallback>U</AvatarFallback>
|
|
19
|
+
</Avatar>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Typography
|
|
23
|
+
Consistent text styling with semantic variants and accessibility features.
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Typography } from "@neynar/ui"
|
|
27
|
+
|
|
28
|
+
// Basic usage with semantic variants
|
|
29
|
+
<Typography variant="heading" as="h1">
|
|
30
|
+
Main Page Title
|
|
31
|
+
</Typography>
|
|
32
|
+
|
|
33
|
+
<Typography variant="subheading" as="h2">
|
|
34
|
+
Section Header
|
|
35
|
+
</Typography>
|
|
36
|
+
|
|
37
|
+
<Typography variant="body">
|
|
38
|
+
Standard paragraph text content with proper line height and spacing.
|
|
39
|
+
</Typography>
|
|
40
|
+
|
|
41
|
+
<Typography variant="bodyEmphasized">
|
|
42
|
+
Emphasized text for important information.
|
|
43
|
+
</Typography>
|
|
44
|
+
|
|
45
|
+
// Color and styling options
|
|
46
|
+
<Typography variant="body" color="muted">
|
|
47
|
+
Secondary information in muted color
|
|
48
|
+
</Typography>
|
|
49
|
+
|
|
50
|
+
<Typography variant="details" color="destructive">
|
|
51
|
+
Error or warning text
|
|
52
|
+
</Typography>
|
|
53
|
+
|
|
54
|
+
// Form field labels
|
|
55
|
+
<Typography variant="field" as="label" htmlFor="email">
|
|
56
|
+
Email Address
|
|
57
|
+
</Typography>
|
|
58
|
+
|
|
59
|
+
// Code snippets
|
|
60
|
+
<Typography variant="code" as="code">
|
|
61
|
+
const example = "Hello, world!";
|
|
62
|
+
</Typography>
|
|
63
|
+
|
|
64
|
+
// Table content
|
|
65
|
+
<Typography variant="tableHeader" as="th">
|
|
66
|
+
Column Header
|
|
67
|
+
</Typography>
|
|
68
|
+
|
|
69
|
+
<Typography variant="tableCell" as="td">
|
|
70
|
+
Cell content
|
|
71
|
+
</Typography>
|
|
72
|
+
|
|
73
|
+
// Microcopy for fine print
|
|
74
|
+
<Typography variant="microcopy" color="muted">
|
|
75
|
+
Terms and conditions apply
|
|
76
|
+
</Typography>
|
|
77
|
+
|
|
78
|
+
// Advanced styling
|
|
79
|
+
<Typography
|
|
80
|
+
variant="body"
|
|
81
|
+
color="accent"
|
|
82
|
+
italic
|
|
83
|
+
underline
|
|
84
|
+
align="center"
|
|
85
|
+
>
|
|
86
|
+
Styled text with multiple options
|
|
87
|
+
</Typography>
|
|
88
|
+
|
|
89
|
+
// Truncated text
|
|
90
|
+
<Typography variant="body" truncate className="max-w-xs">
|
|
91
|
+
Long text that will be truncated with ellipsis
|
|
92
|
+
</Typography>
|
|
93
|
+
|
|
94
|
+
// Screen reader only content
|
|
95
|
+
<Typography variant="details" srOnly>
|
|
96
|
+
Additional context for accessibility
|
|
97
|
+
</Typography>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Chart
|
|
101
|
+
Data visualization using Recharts with consistent theming.
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
import { ChartContainer, ChartTooltip, ChartTooltipContent } from "@neynar/ui"
|
|
105
|
+
import { Bar, BarChart, ResponsiveContainer } from "recharts"
|
|
106
|
+
|
|
107
|
+
<ChartContainer config={{ value: { label: "Value", color: "hsl(var(--chart-1))" } }}>
|
|
108
|
+
<BarChart data={data}>
|
|
109
|
+
<Bar dataKey="value" fill="var(--color-value)" />
|
|
110
|
+
<ChartTooltip content={<ChartTooltipContent />} />
|
|
111
|
+
</BarChart>
|
|
112
|
+
</ChartContainer>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Carousel
|
|
116
|
+
Image/content slideshows with navigation controls.
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
import { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext } from "@neynar/ui"
|
|
120
|
+
|
|
121
|
+
<Carousel className="w-full max-w-xs">
|
|
122
|
+
<CarouselContent>
|
|
123
|
+
{items.map((item, index) => (
|
|
124
|
+
<CarouselItem key={index}>
|
|
125
|
+
<div className="p-1">
|
|
126
|
+
<img src={item.image} alt={item.title} />
|
|
127
|
+
</div>
|
|
128
|
+
</CarouselItem>
|
|
129
|
+
))}
|
|
130
|
+
</CarouselContent>
|
|
131
|
+
<CarouselPrevious />
|
|
132
|
+
<CarouselNext />
|
|
133
|
+
</Carousel>
|
|
134
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Feedback Components
|
|
2
|
+
|
|
3
|
+
Components for providing user feedback, status updates, and progress indicators.
|
|
4
|
+
|
|
5
|
+
## Alert
|
|
6
|
+
|
|
7
|
+
Display important messages with different severity levels.
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Alert, AlertDescription, AlertTitle } from "@neynar/ui"
|
|
11
|
+
import { AlertCircle, CheckCircle2 } from "lucide-react"
|
|
12
|
+
|
|
13
|
+
// Error alert
|
|
14
|
+
<Alert variant="destructive">
|
|
15
|
+
<AlertCircle className="h-4 w-4" />
|
|
16
|
+
<AlertTitle>Error</AlertTitle>
|
|
17
|
+
<AlertDescription>Failed to load cast data.</AlertDescription>
|
|
18
|
+
</Alert>
|
|
19
|
+
|
|
20
|
+
// Success alert
|
|
21
|
+
<Alert>
|
|
22
|
+
<CheckCircle2 className="h-4 w-4" />
|
|
23
|
+
<AlertTitle>Success</AlertTitle>
|
|
24
|
+
<AlertDescription>Cast published successfully.</AlertDescription>
|
|
25
|
+
</Alert>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Badge
|
|
29
|
+
|
|
30
|
+
Show status, categories, or metadata with colored labels.
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { Badge } from "@neynar/ui"
|
|
34
|
+
|
|
35
|
+
<Badge variant="default">Active</Badge>
|
|
36
|
+
<Badge variant="secondary">Draft</Badge>
|
|
37
|
+
<Badge variant="destructive">Failed</Badge>
|
|
38
|
+
<Badge variant="outline">Pending</Badge>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Progress
|
|
42
|
+
|
|
43
|
+
Visual progress indicators for loading states and operations.
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { Progress } from "@neynar/ui"
|
|
47
|
+
|
|
48
|
+
<Progress value={65} className="w-full" />
|
|
49
|
+
<Progress value={uploadProgress} max={100} />
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Skeleton
|
|
53
|
+
|
|
54
|
+
Loading placeholders that match content structure.
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
import { Skeleton } from "@neynar/ui"
|
|
58
|
+
|
|
59
|
+
// Loading cast card
|
|
60
|
+
<div className="space-y-3">
|
|
61
|
+
<Skeleton className="h-4 w-[250px]" />
|
|
62
|
+
<Skeleton className="h-4 w-[200px]" />
|
|
63
|
+
<Skeleton className="h-16 w-full" />
|
|
64
|
+
</div>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## EmptyState
|
|
68
|
+
|
|
69
|
+
Handle empty data scenarios with helpful messaging.
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
import { EmptyState } from "@neynar/ui"
|
|
73
|
+
|
|
74
|
+
<EmptyState
|
|
75
|
+
title="No casts found"
|
|
76
|
+
description="Try adjusting your search criteria"
|
|
77
|
+
action={<Button>Refresh</Button>}
|
|
78
|
+
/>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Sonner (Toast)
|
|
82
|
+
|
|
83
|
+
Non-blocking notifications for actions and events.
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { toast } from "sonner"
|
|
87
|
+
|
|
88
|
+
// Success toast
|
|
89
|
+
toast.success("Cast published successfully")
|
|
90
|
+
|
|
91
|
+
// Error toast
|
|
92
|
+
toast.error("Failed to publish cast")
|
|
93
|
+
|
|
94
|
+
// Loading toast
|
|
95
|
+
toast.loading("Publishing cast...")
|
|
96
|
+
```
|