aural-ui 2.0.0
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 +456 -0
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +1327 -0
- package/dist/components/aspect-ratio/index.tsx +10 -0
- package/dist/components/aspect-ratio/meta.ts +8 -0
- package/dist/components/avatar/Avatar.stories.tsx +645 -0
- package/dist/components/avatar/index.tsx +50 -0
- package/dist/components/avatar/meta.ts +8 -0
- package/dist/components/badge/Badge.stories.tsx +169 -0
- package/dist/components/badge/index.tsx +28 -0
- package/dist/components/badge/meta.ts +6 -0
- package/dist/components/banner/Banner.stories.tsx +475 -0
- package/dist/components/banner/index.tsx +256 -0
- package/dist/components/banner/meta.ts +36 -0
- package/dist/components/button/Button.stories.tsx +74 -0
- package/dist/components/button/index.tsx +158 -0
- package/dist/components/button/meta.ts +33 -0
- package/dist/components/card/Card.stories.tsx +377 -0
- package/dist/components/card/index.tsx +85 -0
- package/dist/components/card/meta.ts +14 -0
- package/dist/components/char-count/CharCount.stories.tsx +334 -0
- package/dist/components/char-count/index.tsx +51 -0
- package/dist/components/char-count/meta.ts +13 -0
- package/dist/components/checkbox/Checkbox.stories.tsx +209 -0
- package/dist/components/checkbox/index.tsx +34 -0
- package/dist/components/checkbox/meta.ts +19 -0
- package/dist/components/chip/Chip.stories.tsx +207 -0
- package/dist/components/chip/index.tsx +92 -0
- package/dist/components/chip/meta.ts +17 -0
- package/dist/components/circular-loader/CircularLoader.stories.tsx +741 -0
- package/dist/components/circular-loader/index.tsx +138 -0
- package/dist/components/circular-loader/meta.ts +11 -0
- package/dist/components/collapsible/Collapsible.stories.tsx +319 -0
- package/dist/components/collapsible/index.tsx +158 -0
- package/dist/components/collapsible/meta.ts +22 -0
- package/dist/components/command/Command.stories.tsx +996 -0
- package/dist/components/command/index.tsx +324 -0
- package/dist/components/command/meta.ts +18 -0
- package/dist/components/dialog/Dialog.stories.tsx +963 -0
- package/dist/components/dialog/index.tsx +250 -0
- package/dist/components/dialog/meta.ts +28 -0
- package/dist/components/divider/Divider.stories.tsx +633 -0
- package/dist/components/divider/index.tsx +181 -0
- package/dist/components/divider/meta.ts +12 -0
- package/dist/components/dot-loader/DotLoader.stories.tsx +352 -0
- package/dist/components/dot-loader/index.tsx +78 -0
- package/dist/components/dot-loader/meta.ts +14 -0
- package/dist/components/dropdown/Dropdown.stories.tsx +1210 -0
- package/dist/components/dropdown/index.tsx +479 -0
- package/dist/components/dropdown/meta.ts +21 -0
- package/dist/components/form/Form.stories.tsx +320 -0
- package/dist/components/form/index.tsx +183 -0
- package/dist/components/form/meta.ts +11 -0
- package/dist/components/helper-text/HelperText.stories.tsx +254 -0
- package/dist/components/helper-text/index.tsx +102 -0
- package/dist/components/helper-text/meta.ts +18 -0
- package/dist/components/hover-card/HoverCard.stories.tsx +1328 -0
- package/dist/components/hover-card/index.tsx +42 -0
- package/dist/components/hover-card/meta.ts +12 -0
- package/dist/components/icon-button/IconButton.stories.tsx +252 -0
- package/dist/components/icon-button/index.tsx +130 -0
- package/dist/components/icon-button/meta.ts +20 -0
- package/dist/components/if-else/if-else.stories.tsx +100 -0
- package/dist/components/if-else/index.tsx +56 -0
- package/dist/components/if-else/meta.ts +6 -0
- package/dist/components/index.ts +70 -0
- package/dist/components/input/Input.stories.tsx +431 -0
- package/dist/components/input/index.tsx +487 -0
- package/dist/components/input/meta.ts +28 -0
- package/dist/components/label/Label.stories.tsx +200 -0
- package/dist/components/label/index.tsx +43 -0
- package/dist/components/label/meta.ts +14 -0
- package/dist/components/list/List.stories.tsx +963 -0
- package/dist/components/list/index.tsx +567 -0
- package/dist/components/list/meta.ts +24 -0
- package/dist/components/marquee/Marquee.stories.tsx +819 -0
- package/dist/components/marquee/index.tsx +107 -0
- package/dist/components/marquee/meta.ts +6 -0
- package/dist/components/overlay/Overlay.stories.tsx +954 -0
- package/dist/components/overlay/index.tsx +58 -0
- package/dist/components/overlay/meta.ts +10 -0
- package/dist/components/pagination/Pagination.stories.tsx +354 -0
- package/dist/components/pagination/index.tsx +455 -0
- package/dist/components/pagination/meta.ts +29 -0
- package/dist/components/popover/Popover.stories.tsx +1037 -0
- package/dist/components/popover/index.tsx +67 -0
- package/dist/components/popover/meta.ts +12 -0
- package/dist/components/radio/Radio.stories.tsx +146 -0
- package/dist/components/radio/index.tsx +41 -0
- package/dist/components/radio/meta.ts +19 -0
- package/dist/components/resizable/Resizable.stories.tsx +866 -0
- package/dist/components/resizable/index.tsx +55 -0
- package/dist/components/resizable/meta.ts +12 -0
- package/dist/components/scroll-area/ScrollArea.stories.tsx +1104 -0
- package/dist/components/scroll-area/index.tsx +55 -0
- package/dist/components/scroll-area/meta.ts +8 -0
- package/dist/components/search/Search.stories.tsx +678 -0
- package/dist/components/search/index.tsx +141 -0
- package/dist/components/search/meta.ts +6 -0
- package/dist/components/select/Select.stories.tsx +962 -0
- package/dist/components/select/index.tsx +512 -0
- package/dist/components/select/meta.ts +40 -0
- package/dist/components/sheet/Sheet.stories.tsx +1060 -0
- package/dist/components/sheet/index.tsx +440 -0
- package/dist/components/sheet/meta.ts +38 -0
- package/dist/components/skelton/Skelton.stories.tsx +859 -0
- package/dist/components/skelton/index.tsx +17 -0
- package/dist/components/skelton/meta.ts +6 -0
- package/dist/components/slider/Slider.stories.tsx +876 -0
- package/dist/components/slider/index.tsx +156 -0
- package/dist/components/slider/meta.ts +29 -0
- package/dist/components/stepper/Stepper.stories.tsx +639 -0
- package/dist/components/stepper/index.tsx +650 -0
- package/dist/components/stepper/meta.ts +19 -0
- package/dist/components/switch/Switch.stories.tsx +85 -0
- package/dist/components/switch/index.tsx +37 -0
- package/dist/components/switch/meta.ts +24 -0
- package/dist/components/switch-case/SwitchCase.stories.tsx +209 -0
- package/dist/components/switch-case/index.tsx +89 -0
- package/dist/components/switch-case/meta.ts +6 -0
- package/dist/components/table/Table.stories.tsx +1095 -0
- package/dist/components/table/index.tsx +113 -0
- package/dist/components/table/meta.ts +20 -0
- package/dist/components/tabs/Tabs.stories.tsx +1379 -0
- package/dist/components/tabs/index.tsx +186 -0
- package/dist/components/tabs/meta.ts +25 -0
- package/dist/components/tag/Tag.stories.tsx +625 -0
- package/dist/components/tag/index.tsx +320 -0
- package/dist/components/tag/meta.ts +52 -0
- package/dist/components/textarea/TextArea.stories.tsx +723 -0
- package/dist/components/textarea/index.tsx +480 -0
- package/dist/components/textarea/meta.ts +23 -0
- package/dist/components/toast/Toast.stories.tsx +1427 -0
- package/dist/components/toast/index.tsx +26 -0
- package/dist/components/toast/meta.ts +19 -0
- package/dist/components/toggle/Toggle.stories.tsx +1093 -0
- package/dist/components/toggle/index.tsx +44 -0
- package/dist/components/toggle/meta.ts +19 -0
- package/dist/components/tooltip/Tooltip.stories.tsx +1548 -0
- package/dist/components/tooltip/index.tsx +304 -0
- package/dist/components/tooltip/meta.ts +21 -0
- package/dist/components/typography/Typography.stories.tsx +197 -0
- package/dist/components/typography/index.tsx +184 -0
- package/dist/components/typography/meta.ts +38 -0
- package/dist/fonts/LabGrotesque-Regular.ttf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Bold.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Light.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Medium.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Regular (1).otf +0 -0
- package/dist/fonts/PPSupplySans-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Ultralight.otf +0 -0
- package/dist/hooks/index.ts +3 -0
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +997 -0
- package/dist/hooks/use-previous/index.ts +15 -0
- package/dist/hooks/use-previous/meta.ts +6 -0
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +983 -0
- package/dist/hooks/use-standalone-pagination/index.ts +146 -0
- package/dist/hooks/use-standalone-pagination/meta.ts +6 -0
- package/dist/icons/Icons.stories.tsx +29 -0
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +991 -0
- package/dist/icons/alert-icon/index.tsx +48 -0
- package/dist/icons/alert-icon/meta.ts +8 -0
- package/dist/icons/all-icons.tsx +738 -0
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +1031 -0
- package/dist/icons/angle-down-icon/index.tsx +25 -0
- package/dist/icons/angle-down-icon/meta.ts +8 -0
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +1080 -0
- package/dist/icons/arrow-box-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-box-left-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +1151 -0
- package/dist/icons/arrow-right-icon/index.tsx +26 -0
- package/dist/icons/arrow-right-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +1273 -0
- package/dist/icons/arrow-right-up-icon/index.tsx +24 -0
- package/dist/icons/arrow-right-up-icon/meta.ts +8 -0
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +670 -0
- package/dist/icons/art-board-icon/index.tsx +24 -0
- package/dist/icons/art-board-icon/meta.ts +7 -0
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +1244 -0
- package/dist/icons/audio-bar-icon/index.tsx +19 -0
- package/dist/icons/audio-bar-icon/meta.ts +8 -0
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +1239 -0
- package/dist/icons/bubble-check-icon/index.tsx +24 -0
- package/dist/icons/bubble-check-icon/meta.ts +8 -0
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +1228 -0
- package/dist/icons/bubble-crossed-icon/index.tsx +24 -0
- package/dist/icons/bubble-crossed-icon/meta.ts +8 -0
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +912 -0
- package/dist/icons/bubble-sparkle-icon/index.tsx +26 -0
- package/dist/icons/bubble-sparkle-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-left-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-right-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +1001 -0
- package/dist/icons/chevron-down-icon/index.tsx +27 -0
- package/dist/icons/chevron-down-icon/meta.ts +8 -0
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +1029 -0
- package/dist/icons/chevron-left-icon/index.tsx +27 -0
- package/dist/icons/chevron-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-right-icon/index.tsx +27 -0
- package/dist/icons/chevron-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +1036 -0
- package/dist/icons/chevron-up-icon/index.tsx +27 -0
- package/dist/icons/chevron-up-icon/meta.ts +8 -0
- package/dist/icons/command-icon/CommandIcon.stories.tsx +1098 -0
- package/dist/icons/command-icon/index.tsx +24 -0
- package/dist/icons/command-icon/meta.ts +8 -0
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +1061 -0
- package/dist/icons/cross-circle-icon/index.tsx +23 -0
- package/dist/icons/cross-circle-icon/meta.ts +8 -0
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +1027 -0
- package/dist/icons/cross-icon/index.tsx +24 -0
- package/dist/icons/cross-icon/meta.ts +8 -0
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +1092 -0
- package/dist/icons/edit-big-icon/index.tsx +22 -0
- package/dist/icons/edit-big-icon/meta.ts +8 -0
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +1090 -0
- package/dist/icons/eye-close-icon/index.tsx +26 -0
- package/dist/icons/eye-close-icon/meta.ts +8 -0
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +1098 -0
- package/dist/icons/eye-open-icon/index.tsx +24 -0
- package/dist/icons/eye-open-icon/meta.ts +8 -0
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +1071 -0
- package/dist/icons/feature-shine-icon/index.tsx +29 -0
- package/dist/icons/feature-shine-icon/meta.ts +8 -0
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +1115 -0
- package/dist/icons/file-chart-icon/index.tsx +24 -0
- package/dist/icons/file-chart-icon/meta.ts +8 -0
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +668 -0
- package/dist/icons/file-text-icon/index.tsx +24 -0
- package/dist/icons/file-text-icon/meta.ts +8 -0
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +1239 -0
- package/dist/icons/grip-vertical-icon/index.tsx +28 -0
- package/dist/icons/grip-vertical-icon/meta.ts +8 -0
- package/dist/icons/image-icon/ImageIcon.stories.tsx +1181 -0
- package/dist/icons/image-icon/index.tsx +24 -0
- package/dist/icons/image-icon/meta.ts +8 -0
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +1248 -0
- package/dist/icons/import-folder-icon/index.tsx +22 -0
- package/dist/icons/import-folder-icon/meta.ts +8 -0
- package/dist/icons/index.ts +46 -0
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +1272 -0
- package/dist/icons/light-bulb-simple-icon/index.tsx +24 -0
- package/dist/icons/light-bulb-simple-icon/meta.ts +8 -0
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +1245 -0
- package/dist/icons/magic-book-icon/index.tsx +32 -0
- package/dist/icons/magic-book-icon/meta.ts +8 -0
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +1251 -0
- package/dist/icons/maintenance-icon/index.tsx +23 -0
- package/dist/icons/maintenance-icon/meta.ts +8 -0
- package/dist/icons/message-icon/MessageIcon.stories.tsx +595 -0
- package/dist/icons/message-icon/index.tsx +30 -0
- package/dist/icons/message-icon/meta.ts +8 -0
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +1245 -0
- package/dist/icons/move-horizontal-icon/index.tsx +23 -0
- package/dist/icons/move-horizontal-icon/meta.ts +8 -0
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +1196 -0
- package/dist/icons/move-vertical-icon/index.tsx +23 -0
- package/dist/icons/move-vertical-icon/meta.ts +8 -0
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +1167 -0
- package/dist/icons/page-search-icon/index.tsx +21 -0
- package/dist/icons/page-search-icon/meta.ts +8 -0
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +1131 -0
- package/dist/icons/pencil-icon/index.tsx +21 -0
- package/dist/icons/pencil-icon/meta.ts +8 -0
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +1151 -0
- package/dist/icons/plus-icon/index.tsx +24 -0
- package/dist/icons/plus-icon/meta.ts +8 -0
- package/dist/icons/search-icon/SearchIcon.stories.tsx +1181 -0
- package/dist/icons/search-icon/index.tsx +24 -0
- package/dist/icons/search-icon/meta.ts +8 -0
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +1167 -0
- package/dist/icons/site-logo-icon/index.tsx +79 -0
- package/dist/icons/site-logo-icon/meta.ts +8 -0
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +637 -0
- package/dist/icons/spinner-gradient-icon/index.tsx +53 -0
- package/dist/icons/spinner-gradient-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +644 -0
- package/dist/icons/spinner-solid-icon/index.tsx +59 -0
- package/dist/icons/spinner-solid-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +736 -0
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +53 -0
- package/dist/icons/spinner-solid-neutral-icon/meta.ts +8 -0
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +1204 -0
- package/dist/icons/tick-circle-icon/index.tsx +23 -0
- package/dist/icons/tick-circle-icon/meta.ts +8 -0
- package/dist/icons/tick-icon/TickIcon.stories.tsx +1340 -0
- package/dist/icons/tick-icon/index.tsx +24 -0
- package/dist/icons/tick-icon/meta.ts +8 -0
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +996 -0
- package/dist/icons/trash-icon/index.tsx +24 -0
- package/dist/icons/trash-icon/meta.ts +8 -0
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +947 -0
- package/dist/icons/upload-icon/index.tsx +24 -0
- package/dist/icons/upload-icon/meta.ts +8 -0
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +1045 -0
- package/dist/icons/vertical-menu-icon/index.tsx +27 -0
- package/dist/icons/vertical-menu-icon/meta.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +206 -0
- package/dist/lib/utils.ts +6 -0
- package/dist/styles/aural-theme.css +1008 -0
- package/package.json +142 -0
|
@@ -0,0 +1,819 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import {
|
|
3
|
+
AlertIcon,
|
|
4
|
+
EditBigIcon,
|
|
5
|
+
EyeOpenIcon,
|
|
6
|
+
FileChartIcon,
|
|
7
|
+
PlusIcon,
|
|
8
|
+
SearchIcon,
|
|
9
|
+
TickCircleIcon,
|
|
10
|
+
TrashIcon,
|
|
11
|
+
} from "@icons/index"
|
|
12
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
13
|
+
|
|
14
|
+
import Marquee from "."
|
|
15
|
+
|
|
16
|
+
const meta: Meta<typeof Marquee> = {
|
|
17
|
+
title: "Components/UI/Marquee",
|
|
18
|
+
component: Marquee,
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: "centered",
|
|
21
|
+
backgrounds: {
|
|
22
|
+
default: "dark",
|
|
23
|
+
values: [
|
|
24
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
25
|
+
{ name: "light", value: "#ffffff" },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
docs: {
|
|
29
|
+
description: {
|
|
30
|
+
component: `
|
|
31
|
+
# Marquee Component
|
|
32
|
+
|
|
33
|
+
A smooth, customizable marquee component for creating continuous scrolling content animations. Perfect for displaying logos, announcements, testimonials, or any repeating content.
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- **Horizontal & Vertical**: Support for both horizontal and vertical scrolling
|
|
38
|
+
- **Pause on Hover**: Optional pause animation when hovering
|
|
39
|
+
- **Reverse Direction**: Ability to reverse the animation direction
|
|
40
|
+
- **Customizable Speed**: Control animation duration via CSS custom properties
|
|
41
|
+
- **Responsive Design**: Adapts to container width and content
|
|
42
|
+
- **Smooth Animation**: Hardware-accelerated CSS animations
|
|
43
|
+
- **Repeat Control**: Configure how many times content repeats
|
|
44
|
+
- **Gap Control**: Customizable spacing between repeated items
|
|
45
|
+
|
|
46
|
+
## Props
|
|
47
|
+
|
|
48
|
+
### Core Props
|
|
49
|
+
- **children**: Content to be animated in the marquee
|
|
50
|
+
- **className**: Additional CSS classes for the container
|
|
51
|
+
- **itemClassName**: CSS classes for individual marquee items
|
|
52
|
+
- **vertical**: Switch between horizontal (default) and vertical scrolling
|
|
53
|
+
- **reverse**: Reverse the animation direction
|
|
54
|
+
- **pauseOnHover**: Pause animation when hovering (default: false)
|
|
55
|
+
- **repeat**: Number of times to repeat the content (default: 4)
|
|
56
|
+
|
|
57
|
+
## Usage Examples
|
|
58
|
+
|
|
59
|
+
### Basic Horizontal Marquee
|
|
60
|
+
\`\`\`tsx
|
|
61
|
+
<Marquee>
|
|
62
|
+
<div>Item 1</div>
|
|
63
|
+
<div>Item 2</div>
|
|
64
|
+
<div>Item 3</div>
|
|
65
|
+
</Marquee>
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
### Vertical Marquee
|
|
69
|
+
\`\`\`tsx
|
|
70
|
+
<Marquee vertical>
|
|
71
|
+
<div>Vertical Item 1</div>
|
|
72
|
+
<div>Vertical Item 2</div>
|
|
73
|
+
<div>Vertical Item 3</div>
|
|
74
|
+
</Marquee>
|
|
75
|
+
\`\`\`
|
|
76
|
+
|
|
77
|
+
### With Pause on Hover
|
|
78
|
+
\`\`\`tsx
|
|
79
|
+
<Marquee pauseOnHover>
|
|
80
|
+
<div>Hover to pause</div>
|
|
81
|
+
<div>This content</div>
|
|
82
|
+
</Marquee>
|
|
83
|
+
\`\`\`
|
|
84
|
+
|
|
85
|
+
### Reverse Direction
|
|
86
|
+
\`\`\`tsx
|
|
87
|
+
<Marquee reverse>
|
|
88
|
+
<div>Reversed</div>
|
|
89
|
+
<div>Animation</div>
|
|
90
|
+
</Marquee>
|
|
91
|
+
\`\`\`
|
|
92
|
+
|
|
93
|
+
### Custom Speed
|
|
94
|
+
\`\`\`tsx
|
|
95
|
+
<Marquee
|
|
96
|
+
className="[--duration:20s]"
|
|
97
|
+
style={{ '--duration': '20s' }}
|
|
98
|
+
>
|
|
99
|
+
<div>Faster animation</div>
|
|
100
|
+
</Marquee>
|
|
101
|
+
\`\`\`
|
|
102
|
+
|
|
103
|
+
## Use Cases
|
|
104
|
+
|
|
105
|
+
- **Logo Carousels**: Showcase partner or client logos
|
|
106
|
+
- **News Tickers**: Display breaking news or announcements
|
|
107
|
+
- **Testimonials**: Rotating customer testimonials
|
|
108
|
+
- **Social Media Feeds**: Live social media content
|
|
109
|
+
- **Product Showcases**: Continuous product displays
|
|
110
|
+
- **Stock Tickers**: Financial data displays
|
|
111
|
+
- **Event Announcements**: Scrolling event information
|
|
112
|
+
|
|
113
|
+
## Accessibility
|
|
114
|
+
|
|
115
|
+
- Consider users with motion sensitivity
|
|
116
|
+
- Provide pause controls for accessibility
|
|
117
|
+
- Ensure content is accessible via keyboard navigation
|
|
118
|
+
- Don't rely solely on marquee for critical information
|
|
119
|
+
- Test with screen readers for content accessibility
|
|
120
|
+
|
|
121
|
+
## Performance
|
|
122
|
+
|
|
123
|
+
- Uses CSS transforms for hardware acceleration
|
|
124
|
+
- Minimal JavaScript overhead
|
|
125
|
+
- Efficient DOM structure with repeated elements
|
|
126
|
+
- Smooth 60fps animations on modern browsers
|
|
127
|
+
`,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
tags: ["autodocs"],
|
|
132
|
+
argTypes: {
|
|
133
|
+
vertical: {
|
|
134
|
+
control: "boolean",
|
|
135
|
+
description: "Enable vertical scrolling instead of horizontal",
|
|
136
|
+
},
|
|
137
|
+
reverse: {
|
|
138
|
+
control: "boolean",
|
|
139
|
+
description: "Reverse the animation direction",
|
|
140
|
+
},
|
|
141
|
+
pauseOnHover: {
|
|
142
|
+
control: "boolean",
|
|
143
|
+
description: "Pause animation when hovering",
|
|
144
|
+
},
|
|
145
|
+
repeat: {
|
|
146
|
+
control: { type: "number", min: 1, max: 10, step: 1 },
|
|
147
|
+
description: "Number of times to repeat the content",
|
|
148
|
+
},
|
|
149
|
+
className: {
|
|
150
|
+
control: "text",
|
|
151
|
+
description: "Additional CSS classes for the container",
|
|
152
|
+
},
|
|
153
|
+
itemClassName: {
|
|
154
|
+
control: "text",
|
|
155
|
+
description: "CSS classes for individual marquee items",
|
|
156
|
+
},
|
|
157
|
+
gutter: {
|
|
158
|
+
control: "text",
|
|
159
|
+
description: "Spacing between repeated items (default: 1rem)",
|
|
160
|
+
},
|
|
161
|
+
duration: {
|
|
162
|
+
control: "text",
|
|
163
|
+
description: "Animation duration in seconds (default: 40s)",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export default meta
|
|
169
|
+
type Story = StoryObj<typeof Marquee>
|
|
170
|
+
|
|
171
|
+
// 1. Basic Marquee
|
|
172
|
+
export const Basic: Story = {
|
|
173
|
+
args: {
|
|
174
|
+
children: (
|
|
175
|
+
<>
|
|
176
|
+
<div className="flex h-16 w-32 items-center justify-center rounded-lg bg-blue-500/20 text-sm font-medium text-blue-300">
|
|
177
|
+
Item 1
|
|
178
|
+
</div>
|
|
179
|
+
<div className="flex h-16 w-32 items-center justify-center rounded-lg bg-green-500/20 text-sm font-medium text-green-300">
|
|
180
|
+
Item 2
|
|
181
|
+
</div>
|
|
182
|
+
<div className="flex h-16 w-32 items-center justify-center rounded-lg bg-purple-500/20 text-sm font-medium text-purple-300">
|
|
183
|
+
Item 3
|
|
184
|
+
</div>
|
|
185
|
+
<div className="flex h-16 w-32 items-center justify-center rounded-lg bg-orange-500/20 text-sm font-medium text-orange-300">
|
|
186
|
+
Item 4
|
|
187
|
+
</div>
|
|
188
|
+
</>
|
|
189
|
+
),
|
|
190
|
+
},
|
|
191
|
+
parameters: {
|
|
192
|
+
docs: {
|
|
193
|
+
description: {
|
|
194
|
+
story: "A basic horizontal marquee with simple content blocks.",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// 2. Logo Carousel
|
|
201
|
+
export const LogoCarousel: Story = {
|
|
202
|
+
render: () => (
|
|
203
|
+
<div className="w-full max-w-4xl">
|
|
204
|
+
<h3 className="mb-6 text-center text-lg font-medium text-white">
|
|
205
|
+
Our Partners
|
|
206
|
+
</h3>
|
|
207
|
+
<Marquee pauseOnHover={false} duration="30s">
|
|
208
|
+
<div className="flex h-20 w-40 items-center justify-center rounded-lg border border-white/10 bg-white/5 transition-colors hover:bg-white/10">
|
|
209
|
+
<div className="text-center">
|
|
210
|
+
<div className="text-2xl font-bold text-white">ACME</div>
|
|
211
|
+
<div className="text-xs text-white/60">Corporation</div>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
<div className="flex h-20 w-40 items-center justify-center rounded-lg border border-white/10 bg-white/5 transition-colors hover:bg-white/10">
|
|
215
|
+
<div className="text-center">
|
|
216
|
+
<div className="text-2xl font-bold text-blue-400">TechCorp</div>
|
|
217
|
+
<div className="text-xs text-white/60">Innovation</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
<div className="flex h-20 w-40 items-center justify-center rounded-lg border border-white/10 bg-white/5 transition-colors hover:bg-white/10">
|
|
221
|
+
<div className="text-center">
|
|
222
|
+
<div className="text-2xl font-bold text-green-400">GlobalTech</div>
|
|
223
|
+
<div className="text-xs text-white/60">Solutions</div>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
<div className="flex h-20 w-40 items-center justify-center rounded-lg border border-white/10 bg-white/5 transition-colors hover:bg-white/10">
|
|
227
|
+
<div className="text-center">
|
|
228
|
+
<div className="text-2xl font-bold text-purple-400">
|
|
229
|
+
InnovateLab
|
|
230
|
+
</div>
|
|
231
|
+
<div className="text-xs text-white/60">Research</div>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
<div className="flex h-20 w-40 items-center justify-center rounded-lg border border-white/10 bg-white/5 transition-colors hover:bg-white/10">
|
|
235
|
+
<div className="text-center">
|
|
236
|
+
<div className="text-2xl font-bold text-orange-400">FutureTech</div>
|
|
237
|
+
<div className="text-xs text-white/60">Systems</div>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</Marquee>
|
|
241
|
+
</div>
|
|
242
|
+
),
|
|
243
|
+
parameters: {
|
|
244
|
+
docs: {
|
|
245
|
+
description: {
|
|
246
|
+
story:
|
|
247
|
+
"A logo carousel showcasing partner companies with hover pause functionality.",
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// 3. News Ticker
|
|
254
|
+
export const NewsTicker: Story = {
|
|
255
|
+
render: () => (
|
|
256
|
+
<div className="w-full max-w-4xl">
|
|
257
|
+
<div className="flex items-center bg-red-600 px-4 py-2 text-sm font-medium text-white">
|
|
258
|
+
<span className="mr-3 rounded bg-white px-2 py-1 text-xs font-bold text-red-600">
|
|
259
|
+
LIVE
|
|
260
|
+
</span>
|
|
261
|
+
<Marquee duration="25s" pauseOnHover>
|
|
262
|
+
<span className="whitespace-nowrap">
|
|
263
|
+
🔴 Breaking: New product launch scheduled for next month
|
|
264
|
+
</span>
|
|
265
|
+
<span className="whitespace-nowrap">
|
|
266
|
+
📈 Stock market reaches new highs as tech sector surges
|
|
267
|
+
</span>
|
|
268
|
+
<span className="whitespace-nowrap">
|
|
269
|
+
🚀 Space mission successfully launches with international crew
|
|
270
|
+
</span>
|
|
271
|
+
<span className="whitespace-nowrap">
|
|
272
|
+
💡 Revolutionary AI breakthrough announced by research team
|
|
273
|
+
</span>
|
|
274
|
+
</Marquee>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
),
|
|
278
|
+
parameters: {
|
|
279
|
+
docs: {
|
|
280
|
+
description: {
|
|
281
|
+
story: "A news ticker with live updates and breaking news format.",
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// 4. Testimonials
|
|
288
|
+
export const Testimonials: Story = {
|
|
289
|
+
render: () => (
|
|
290
|
+
<div className="w-full max-w-5xl">
|
|
291
|
+
<h3 className="mb-6 text-center text-lg font-medium text-white">
|
|
292
|
+
What Our Customers Say
|
|
293
|
+
</h3>
|
|
294
|
+
<Marquee pauseOnHover duration="35s">
|
|
295
|
+
<div className="w-80 rounded-lg border border-white/10 bg-white/5 p-6 transition-colors hover:bg-white/10">
|
|
296
|
+
<div className="flex items-start space-x-4">
|
|
297
|
+
<div className="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-blue-500 to-purple-600">
|
|
298
|
+
<span className="font-semibold text-white">JD</span>
|
|
299
|
+
</div>
|
|
300
|
+
<div className="space-y-2">
|
|
301
|
+
<p className="text-sm leading-relaxed text-white/80">
|
|
302
|
+
"This product has completely transformed our workflow. The
|
|
303
|
+
intuitive design and powerful features make it indispensable."
|
|
304
|
+
</p>
|
|
305
|
+
<div>
|
|
306
|
+
<div className="text-sm font-medium text-white">John Doe</div>
|
|
307
|
+
<div className="text-xs text-white/60">CEO, TechStart</div>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
<div className="w-80 rounded-lg border border-white/10 bg-white/5 p-6 transition-colors hover:bg-white/10">
|
|
314
|
+
<div className="flex items-start space-x-4">
|
|
315
|
+
<div className="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-green-500 to-teal-600">
|
|
316
|
+
<span className="font-semibold text-white">SS</span>
|
|
317
|
+
</div>
|
|
318
|
+
<div className="space-y-2">
|
|
319
|
+
<p className="text-sm leading-relaxed text-white/80">
|
|
320
|
+
"Outstanding customer support and a product that delivers on all
|
|
321
|
+
its promises. Highly recommended for any team."
|
|
322
|
+
</p>
|
|
323
|
+
<div>
|
|
324
|
+
<div className="text-sm font-medium text-white">
|
|
325
|
+
Sarah Smith
|
|
326
|
+
</div>
|
|
327
|
+
<div className="text-xs text-white/60">
|
|
328
|
+
Designer, CreativeHub
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
|
|
335
|
+
<div className="w-80 rounded-lg border border-white/10 bg-white/5 p-6 transition-colors hover:bg-white/10">
|
|
336
|
+
<div className="flex items-start space-x-4">
|
|
337
|
+
<div className="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-orange-500 to-red-600">
|
|
338
|
+
<span className="font-semibold text-white">MJ</span>
|
|
339
|
+
</div>
|
|
340
|
+
<div className="space-y-2">
|
|
341
|
+
<p className="text-sm leading-relaxed text-white/80">
|
|
342
|
+
"The ROI has been incredible. We've seen a 300% increase in
|
|
343
|
+
productivity since implementation."
|
|
344
|
+
</p>
|
|
345
|
+
<div>
|
|
346
|
+
<div className="text-sm font-medium text-white">
|
|
347
|
+
Mike Johnson
|
|
348
|
+
</div>
|
|
349
|
+
<div className="text-xs text-white/60">CTO, InnovateNow</div>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
</div>
|
|
354
|
+
</Marquee>
|
|
355
|
+
</div>
|
|
356
|
+
),
|
|
357
|
+
parameters: {
|
|
358
|
+
docs: {
|
|
359
|
+
description: {
|
|
360
|
+
story:
|
|
361
|
+
"Customer testimonials in card format with avatars and company information.",
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// 5. Icon Showcase
|
|
368
|
+
export const IconShowcase: Story = {
|
|
369
|
+
render: () => (
|
|
370
|
+
<div className="w-full max-w-4xl space-y-8">
|
|
371
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
372
|
+
Feature Icons
|
|
373
|
+
</h3>
|
|
374
|
+
|
|
375
|
+
{/* Horizontal Icons */}
|
|
376
|
+
<div className="space-y-4">
|
|
377
|
+
<h4 className="text-center text-sm font-medium text-white/70">
|
|
378
|
+
Horizontal Scroll
|
|
379
|
+
</h4>
|
|
380
|
+
<Marquee pauseOnHover duration="20s">
|
|
381
|
+
<div className="flex w-24 flex-col items-center space-y-2">
|
|
382
|
+
<div className="flex h-16 w-16 items-center justify-center rounded-lg bg-blue-500/20">
|
|
383
|
+
<SearchIcon className="h-8 w-8 text-blue-400" />
|
|
384
|
+
</div>
|
|
385
|
+
<span className="text-xs text-white/70">Search</span>
|
|
386
|
+
</div>
|
|
387
|
+
<div className="flex w-24 flex-col items-center space-y-2">
|
|
388
|
+
<div className="flex h-16 w-16 items-center justify-center rounded-lg bg-green-500/20">
|
|
389
|
+
<TickCircleIcon className="h-8 w-8 text-green-400" />
|
|
390
|
+
</div>
|
|
391
|
+
<span className="text-xs text-white/70">Complete</span>
|
|
392
|
+
</div>
|
|
393
|
+
<div className="flex w-24 flex-col items-center space-y-2">
|
|
394
|
+
<div className="flex h-16 w-16 items-center justify-center rounded-lg bg-purple-500/20">
|
|
395
|
+
<EditBigIcon className="h-8 w-8 text-purple-400" />
|
|
396
|
+
</div>
|
|
397
|
+
<span className="text-xs text-white/70">Edit</span>
|
|
398
|
+
</div>
|
|
399
|
+
<div className="flex w-24 flex-col items-center space-y-2">
|
|
400
|
+
<div className="flex h-16 w-16 items-center justify-center rounded-lg bg-orange-500/20">
|
|
401
|
+
<FileChartIcon className="h-8 w-8 text-orange-400" />
|
|
402
|
+
</div>
|
|
403
|
+
<span className="text-xs text-white/70">Analytics</span>
|
|
404
|
+
</div>
|
|
405
|
+
<div className="flex w-24 flex-col items-center space-y-2">
|
|
406
|
+
<div className="flex h-16 w-16 items-center justify-center rounded-lg bg-red-500/20">
|
|
407
|
+
<AlertIcon className="h-8 w-8 text-red-400" />
|
|
408
|
+
</div>
|
|
409
|
+
<span className="text-xs text-white/70">Alert</span>
|
|
410
|
+
</div>
|
|
411
|
+
<div className="flex w-24 flex-col items-center space-y-2">
|
|
412
|
+
<div className="flex h-16 w-16 items-center justify-center rounded-lg bg-cyan-500/20">
|
|
413
|
+
<EyeOpenIcon className="h-8 w-8 text-cyan-400" />
|
|
414
|
+
</div>
|
|
415
|
+
<span className="text-xs text-white/70">View</span>
|
|
416
|
+
</div>
|
|
417
|
+
</Marquee>
|
|
418
|
+
</div>
|
|
419
|
+
|
|
420
|
+
{/* Reverse Direction */}
|
|
421
|
+
<div className="space-y-4">
|
|
422
|
+
<h4 className="text-center text-sm font-medium text-white/70">
|
|
423
|
+
Reverse Direction
|
|
424
|
+
</h4>
|
|
425
|
+
<Marquee reverse pauseOnHover duration="25s">
|
|
426
|
+
<div className="flex items-center space-x-3 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
427
|
+
<PlusIcon className="h-5 w-5 text-green-400" />
|
|
428
|
+
<span className="text-sm text-white">Add New</span>
|
|
429
|
+
</div>
|
|
430
|
+
<div className="flex items-center space-x-3 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
431
|
+
<TrashIcon className="h-5 w-5 text-red-400" />
|
|
432
|
+
<span className="text-sm text-white">Delete</span>
|
|
433
|
+
</div>
|
|
434
|
+
<div className="flex items-center space-x-3 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
435
|
+
<EditBigIcon className="h-5 w-5 text-blue-400" />
|
|
436
|
+
<span className="text-sm text-white">Edit</span>
|
|
437
|
+
</div>
|
|
438
|
+
<div className="flex items-center space-x-3 rounded-lg border border-white/10 bg-white/5 px-4 py-2">
|
|
439
|
+
<EyeOpenIcon className="h-5 w-5 text-purple-400" />
|
|
440
|
+
<span className="text-sm text-white">Preview</span>
|
|
441
|
+
</div>
|
|
442
|
+
</Marquee>
|
|
443
|
+
</div>
|
|
444
|
+
</div>
|
|
445
|
+
),
|
|
446
|
+
parameters: {
|
|
447
|
+
docs: {
|
|
448
|
+
description: {
|
|
449
|
+
story:
|
|
450
|
+
"Icon showcase with feature icons and action buttons in normal and reverse directions.",
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// 6. Vertical Marquee
|
|
457
|
+
export const VerticalMarquee: Story = {
|
|
458
|
+
render: () => (
|
|
459
|
+
<div className="flex justify-center space-x-8">
|
|
460
|
+
{/* Social Media Feed */}
|
|
461
|
+
<div className="space-y-4">
|
|
462
|
+
<h4 className="text-center text-sm font-medium text-white/70">
|
|
463
|
+
Social Feed
|
|
464
|
+
</h4>
|
|
465
|
+
<div className="h-96 w-80">
|
|
466
|
+
<Marquee vertical pauseOnHover duration="30s" className="h-full">
|
|
467
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10">
|
|
468
|
+
<div className="flex items-start space-x-3">
|
|
469
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-blue-500 to-purple-600">
|
|
470
|
+
<span className="text-sm font-semibold text-white">@A</span>
|
|
471
|
+
</div>
|
|
472
|
+
<div className="space-y-1">
|
|
473
|
+
<div className="text-sm font-medium text-white">
|
|
474
|
+
@alice_dev
|
|
475
|
+
</div>
|
|
476
|
+
<p className="text-sm text-white/70">
|
|
477
|
+
Just shipped a new feature! The team's hard work really paid
|
|
478
|
+
off. 🚀
|
|
479
|
+
</p>
|
|
480
|
+
<div className="text-xs text-white/50">2 minutes ago</div>
|
|
481
|
+
</div>
|
|
482
|
+
</div>
|
|
483
|
+
</div>
|
|
484
|
+
|
|
485
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10">
|
|
486
|
+
<div className="flex items-start space-x-3">
|
|
487
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-green-500 to-teal-600">
|
|
488
|
+
<span className="text-sm font-semibold text-white">@B</span>
|
|
489
|
+
</div>
|
|
490
|
+
<div className="space-y-1">
|
|
491
|
+
<div className="text-sm font-medium text-white">
|
|
492
|
+
@bob_designer
|
|
493
|
+
</div>
|
|
494
|
+
<p className="text-sm text-white/70">
|
|
495
|
+
Working on some exciting new designs. Can't wait to share
|
|
496
|
+
them with everyone! ✨
|
|
497
|
+
</p>
|
|
498
|
+
<div className="text-xs text-white/50">5 minutes ago</div>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
</div>
|
|
502
|
+
|
|
503
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10">
|
|
504
|
+
<div className="flex items-start space-x-3">
|
|
505
|
+
<div className="flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-orange-500 to-red-600">
|
|
506
|
+
<span className="text-sm font-semibold text-white">@C</span>
|
|
507
|
+
</div>
|
|
508
|
+
<div className="space-y-1">
|
|
509
|
+
<div className="text-sm font-medium text-white">
|
|
510
|
+
@charlie_pm
|
|
511
|
+
</div>
|
|
512
|
+
<p className="text-sm text-white/70">
|
|
513
|
+
Great sprint review today! The team exceeded all
|
|
514
|
+
expectations. 📊
|
|
515
|
+
</p>
|
|
516
|
+
<div className="text-xs text-white/50">8 minutes ago</div>
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
</div>
|
|
520
|
+
</Marquee>
|
|
521
|
+
</div>
|
|
522
|
+
</div>
|
|
523
|
+
|
|
524
|
+
{/* Notification Feed */}
|
|
525
|
+
<div className="space-y-4">
|
|
526
|
+
<h4 className="text-center text-sm font-medium text-white/70">
|
|
527
|
+
Notifications
|
|
528
|
+
</h4>
|
|
529
|
+
<div className="h-96 w-72">
|
|
530
|
+
<Marquee
|
|
531
|
+
vertical
|
|
532
|
+
reverse
|
|
533
|
+
pauseOnHover
|
|
534
|
+
duration="25s"
|
|
535
|
+
className="h-full"
|
|
536
|
+
>
|
|
537
|
+
<div className="flex items-center space-x-3 rounded-lg border border-blue-500/20 bg-blue-500/10 p-3">
|
|
538
|
+
<AlertIcon className="h-5 w-5 flex-shrink-0 text-blue-400" />
|
|
539
|
+
<div>
|
|
540
|
+
<div className="text-sm text-white">New message received</div>
|
|
541
|
+
<div className="text-xs text-white/60">From John Doe</div>
|
|
542
|
+
</div>
|
|
543
|
+
</div>
|
|
544
|
+
|
|
545
|
+
<div className="flex items-center space-x-3 rounded-lg border border-green-500/20 bg-green-500/10 p-3">
|
|
546
|
+
<TickCircleIcon className="h-5 w-5 flex-shrink-0 text-green-400" />
|
|
547
|
+
<div>
|
|
548
|
+
<div className="text-sm text-white">Task completed</div>
|
|
549
|
+
<div className="text-xs text-white/60">
|
|
550
|
+
Design review finished
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
</div>
|
|
554
|
+
|
|
555
|
+
<div className="flex items-center space-x-3 rounded-lg border border-purple-500/20 bg-purple-500/10 p-3">
|
|
556
|
+
<FileChartIcon className="h-5 w-5 flex-shrink-0 text-purple-400" />
|
|
557
|
+
<div>
|
|
558
|
+
<div className="text-sm text-white">Report generated</div>
|
|
559
|
+
<div className="text-xs text-white/60">
|
|
560
|
+
Monthly analytics ready
|
|
561
|
+
</div>
|
|
562
|
+
</div>
|
|
563
|
+
</div>
|
|
564
|
+
|
|
565
|
+
<div className="flex items-center space-x-3 rounded-lg border border-orange-500/20 bg-orange-500/10 p-3">
|
|
566
|
+
<EditBigIcon className="h-5 w-5 flex-shrink-0 text-orange-400" />
|
|
567
|
+
<div>
|
|
568
|
+
<div className="text-sm text-white">Document updated</div>
|
|
569
|
+
<div className="text-xs text-white/60">
|
|
570
|
+
Project specs modified
|
|
571
|
+
</div>
|
|
572
|
+
</div>
|
|
573
|
+
</div>
|
|
574
|
+
</Marquee>
|
|
575
|
+
</div>
|
|
576
|
+
</div>
|
|
577
|
+
</div>
|
|
578
|
+
),
|
|
579
|
+
parameters: {
|
|
580
|
+
docs: {
|
|
581
|
+
description: {
|
|
582
|
+
story:
|
|
583
|
+
"Vertical marquees showing social media feeds and notifications with different directions.",
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
// 7. Speed Variations
|
|
590
|
+
export const SpeedVariations: Story = {
|
|
591
|
+
render: () => (
|
|
592
|
+
<div className="w-full max-w-4xl space-y-8">
|
|
593
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
594
|
+
Speed Variations
|
|
595
|
+
</h3>
|
|
596
|
+
|
|
597
|
+
<div className="space-y-6">
|
|
598
|
+
{/* Slow */}
|
|
599
|
+
<div className="space-y-2">
|
|
600
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
601
|
+
Slow Speed (60s)
|
|
602
|
+
</h4>
|
|
603
|
+
<Marquee duration="60s" pauseOnHover>
|
|
604
|
+
<div className="rounded-lg bg-blue-500/20 px-6 py-3 text-blue-300">
|
|
605
|
+
Slow marquee content
|
|
606
|
+
</div>
|
|
607
|
+
<div className="rounded-lg bg-green-500/20 px-6 py-3 text-green-300">
|
|
608
|
+
Takes 60 seconds
|
|
609
|
+
</div>
|
|
610
|
+
<div className="rounded-lg bg-purple-500/20 px-6 py-3 text-purple-300">
|
|
611
|
+
To complete cycle
|
|
612
|
+
</div>
|
|
613
|
+
<div className="rounded-lg bg-orange-500/20 px-6 py-3 text-orange-300">
|
|
614
|
+
Very relaxed pace
|
|
615
|
+
</div>
|
|
616
|
+
</Marquee>
|
|
617
|
+
</div>
|
|
618
|
+
|
|
619
|
+
{/* Normal */}
|
|
620
|
+
<div className="space-y-2">
|
|
621
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
622
|
+
Normal Speed (40s - Default)
|
|
623
|
+
</h4>
|
|
624
|
+
<Marquee pauseOnHover>
|
|
625
|
+
<div className="rounded-lg bg-blue-500/20 px-6 py-3 text-blue-300">
|
|
626
|
+
Normal speed content
|
|
627
|
+
</div>
|
|
628
|
+
<div className="rounded-lg bg-green-500/20 px-6 py-3 text-green-300">
|
|
629
|
+
Standard 40 seconds
|
|
630
|
+
</div>
|
|
631
|
+
<div className="rounded-lg bg-purple-500/20 px-6 py-3 text-purple-300">
|
|
632
|
+
Balanced timing
|
|
633
|
+
</div>
|
|
634
|
+
<div className="rounded-lg bg-orange-500/20 px-6 py-3 text-orange-300">
|
|
635
|
+
Good for most cases
|
|
636
|
+
</div>
|
|
637
|
+
</Marquee>
|
|
638
|
+
</div>
|
|
639
|
+
|
|
640
|
+
{/* Fast */}
|
|
641
|
+
<div className="space-y-2">
|
|
642
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
643
|
+
Fast Speed (20s)
|
|
644
|
+
</h4>
|
|
645
|
+
<Marquee duration="20s" pauseOnHover>
|
|
646
|
+
<div className="rounded-lg bg-blue-500/20 px-6 py-3 text-blue-300">
|
|
647
|
+
Fast moving content
|
|
648
|
+
</div>
|
|
649
|
+
<div className="rounded-lg bg-green-500/20 px-6 py-3 text-green-300">
|
|
650
|
+
Only 20 seconds
|
|
651
|
+
</div>
|
|
652
|
+
<div className="rounded-lg bg-purple-500/20 px-6 py-3 text-purple-300">
|
|
653
|
+
Quick cycling
|
|
654
|
+
</div>
|
|
655
|
+
<div className="rounded-lg bg-orange-500/20 px-6 py-3 text-orange-300">
|
|
656
|
+
High energy
|
|
657
|
+
</div>
|
|
658
|
+
</Marquee>
|
|
659
|
+
</div>
|
|
660
|
+
|
|
661
|
+
{/* Very Fast */}
|
|
662
|
+
<div className="space-y-2">
|
|
663
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
664
|
+
Very Fast Speed (10s)
|
|
665
|
+
</h4>
|
|
666
|
+
<Marquee duration="10s" pauseOnHover>
|
|
667
|
+
<div className="rounded-lg bg-blue-500/20 px-6 py-3 text-blue-300">
|
|
668
|
+
Lightning fast
|
|
669
|
+
</div>
|
|
670
|
+
<div className="rounded-lg bg-green-500/20 px-6 py-3 text-green-300">
|
|
671
|
+
Just 10 seconds
|
|
672
|
+
</div>
|
|
673
|
+
<div className="rounded-lg bg-purple-500/20 px-6 py-3 text-purple-300">
|
|
674
|
+
Rapid movement
|
|
675
|
+
</div>
|
|
676
|
+
<div className="rounded-lg bg-orange-500/20 px-6 py-3 text-orange-300">
|
|
677
|
+
Dynamic feel
|
|
678
|
+
</div>
|
|
679
|
+
</Marquee>
|
|
680
|
+
</div>
|
|
681
|
+
</div>
|
|
682
|
+
|
|
683
|
+
<div className="text-center text-xs text-white/60">
|
|
684
|
+
<p>
|
|
685
|
+
All examples have pauseOnHover enabled - hover to pause any marquee
|
|
686
|
+
</p>
|
|
687
|
+
</div>
|
|
688
|
+
</div>
|
|
689
|
+
),
|
|
690
|
+
parameters: {
|
|
691
|
+
docs: {
|
|
692
|
+
description: {
|
|
693
|
+
story:
|
|
694
|
+
"Different animation speeds from very slow (60s) to very fast (10s) showing the flexibility of the marquee component.",
|
|
695
|
+
},
|
|
696
|
+
},
|
|
697
|
+
},
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// 8. Interactive Controls
|
|
701
|
+
export const InteractiveControls: Story = {
|
|
702
|
+
render: () => {
|
|
703
|
+
const [speed, setSpeed] = React.useState(40)
|
|
704
|
+
const [isPaused, setIsPaused] = React.useState(false)
|
|
705
|
+
const [isReverse, setIsReverse] = React.useState(false)
|
|
706
|
+
const [isVertical, setIsVertical] = React.useState(false)
|
|
707
|
+
|
|
708
|
+
return (
|
|
709
|
+
<div className="w-full max-w-4xl space-y-6">
|
|
710
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
711
|
+
Interactive Controls
|
|
712
|
+
</h3>
|
|
713
|
+
|
|
714
|
+
{/* Controls */}
|
|
715
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
716
|
+
<div className="grid grid-cols-2 gap-4 lg:grid-cols-4">
|
|
717
|
+
<div className="space-y-2">
|
|
718
|
+
<label className="text-sm text-white/70">Speed (seconds)</label>
|
|
719
|
+
<input
|
|
720
|
+
type="range"
|
|
721
|
+
min="5"
|
|
722
|
+
max="60"
|
|
723
|
+
value={speed}
|
|
724
|
+
onChange={(e) => setSpeed(Number(e.target.value))}
|
|
725
|
+
className="w-full"
|
|
726
|
+
/>
|
|
727
|
+
<div className="text-center text-xs text-white/60">{speed}s</div>
|
|
728
|
+
</div>
|
|
729
|
+
|
|
730
|
+
<div className="space-y-2">
|
|
731
|
+
<label className="text-sm text-white/70">Direction</label>
|
|
732
|
+
<button
|
|
733
|
+
onClick={() => setIsReverse(!isReverse)}
|
|
734
|
+
className={`w-full rounded px-3 py-2 text-sm transition-colors ${
|
|
735
|
+
isReverse
|
|
736
|
+
? "bg-blue-500 text-white"
|
|
737
|
+
: "bg-white/10 text-white/70 hover:bg-white/20"
|
|
738
|
+
}`}
|
|
739
|
+
>
|
|
740
|
+
{isReverse ? "Reverse" : "Normal"}
|
|
741
|
+
</button>
|
|
742
|
+
</div>
|
|
743
|
+
|
|
744
|
+
<div className="space-y-2">
|
|
745
|
+
<label className="text-sm text-white/70">Orientation</label>
|
|
746
|
+
<button
|
|
747
|
+
onClick={() => setIsVertical(!isVertical)}
|
|
748
|
+
className={`w-full rounded px-3 py-2 text-sm transition-colors ${
|
|
749
|
+
isVertical
|
|
750
|
+
? "bg-green-500 text-white"
|
|
751
|
+
: "bg-white/10 text-white/70 hover:bg-white/20"
|
|
752
|
+
}`}
|
|
753
|
+
>
|
|
754
|
+
{isVertical ? "Vertical" : "Horizontal"}
|
|
755
|
+
</button>
|
|
756
|
+
</div>
|
|
757
|
+
|
|
758
|
+
<div className="space-y-2">
|
|
759
|
+
<label className="text-sm text-white/70">Animation</label>
|
|
760
|
+
<button
|
|
761
|
+
onClick={() => setIsPaused(!isPaused)}
|
|
762
|
+
className={`w-full rounded px-3 py-2 text-sm transition-colors ${
|
|
763
|
+
isPaused
|
|
764
|
+
? "bg-red-500 text-white"
|
|
765
|
+
: "bg-white/10 text-white/70 hover:bg-white/20"
|
|
766
|
+
}`}
|
|
767
|
+
>
|
|
768
|
+
{isPaused ? "Paused" : "Playing"}
|
|
769
|
+
</button>
|
|
770
|
+
</div>
|
|
771
|
+
</div>
|
|
772
|
+
</div>
|
|
773
|
+
|
|
774
|
+
{/* Live Marquee */}
|
|
775
|
+
<div className={`${isVertical ? "h-64" : ""}`}>
|
|
776
|
+
<Marquee
|
|
777
|
+
vertical={isVertical}
|
|
778
|
+
reverse={isReverse}
|
|
779
|
+
pauseOnHover
|
|
780
|
+
duration={`${speed}s`}
|
|
781
|
+
className={`${isPaused ? "[animation-play-state:paused]" : ""} ${isVertical ? "h-full" : ""}`}
|
|
782
|
+
>
|
|
783
|
+
<div className="flex min-w-[120px] flex-col items-center space-y-2 rounded-lg bg-blue-500/20 p-4 text-blue-300">
|
|
784
|
+
<AlertIcon className="h-8 w-8" />
|
|
785
|
+
<span className="text-sm font-medium">Alert</span>
|
|
786
|
+
</div>
|
|
787
|
+
<div className="flex min-w-[120px] flex-col items-center space-y-2 rounded-lg bg-green-500/20 p-4 text-green-300">
|
|
788
|
+
<TickCircleIcon className="h-8 w-8" />
|
|
789
|
+
<span className="text-sm font-medium">Success</span>
|
|
790
|
+
</div>
|
|
791
|
+
<div className="flex min-w-[120px] flex-col items-center space-y-2 rounded-lg bg-purple-500/20 p-4 text-purple-300">
|
|
792
|
+
<EditBigIcon className="h-8 w-8" />
|
|
793
|
+
<span className="text-sm font-medium">Edit</span>
|
|
794
|
+
</div>
|
|
795
|
+
<div className="flex min-w-[120px] flex-col items-center space-y-2 rounded-lg bg-orange-500/20 p-4 text-orange-300">
|
|
796
|
+
<SearchIcon className="h-8 w-8" />
|
|
797
|
+
<span className="text-sm font-medium">Search</span>
|
|
798
|
+
</div>
|
|
799
|
+
</Marquee>
|
|
800
|
+
</div>
|
|
801
|
+
|
|
802
|
+
<div className="text-center text-xs text-white/60">
|
|
803
|
+
<p>
|
|
804
|
+
Adjust the controls above to see real-time changes to the marquee
|
|
805
|
+
behavior
|
|
806
|
+
</p>
|
|
807
|
+
</div>
|
|
808
|
+
</div>
|
|
809
|
+
)
|
|
810
|
+
},
|
|
811
|
+
parameters: {
|
|
812
|
+
docs: {
|
|
813
|
+
description: {
|
|
814
|
+
story:
|
|
815
|
+
"Interactive controls allowing real-time adjustment of marquee properties including speed, direction, orientation, and play state.",
|
|
816
|
+
},
|
|
817
|
+
},
|
|
818
|
+
},
|
|
819
|
+
}
|