@deriv-com/dds-marketing 1.1.3 → 1.2.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/.llm/components/accordion.md +6 -0
- package/.llm/components/accordionitem.md +6 -0
- package/.llm/components/aspectratio.md +6 -0
- package/.llm/components/awards.md +6 -0
- package/.llm/components/background.md +49 -10
- package/.llm/components/badge.md +6 -0
- package/.llm/components/bottomsheet.md +6 -0
- package/.llm/components/breadcrumb.md +6 -0
- package/.llm/components/breadcrumbitem.md +6 -0
- package/.llm/components/button.md +9 -3
- package/.llm/components/buttonicon.md +7 -1
- package/.llm/components/card.md +6 -0
- package/.llm/components/cardbody.md +7 -1
- package/.llm/components/cardbutton.md +6 -0
- package/.llm/components/checkbox.md +6 -0
- package/.llm/components/comparisoncards.md +9 -3
- package/.llm/components/comparisontable.md +6 -0
- package/.llm/components/ctabanner.md +6 -0
- package/.llm/components/ctabannerslider.md +6 -0
- package/.llm/components/datatable.md +6 -0
- package/.llm/components/divider.md +6 -0
- package/.llm/components/documentlink.md +237 -0
- package/.llm/components/documents.md +268 -0
- package/.llm/components/downloadbanner.md +7 -1
- package/.llm/components/dropdownmenu.md +6 -0
- package/.llm/components/estimator.md +6 -0
- package/.llm/components/faqaccordion.md +6 -0
- package/.llm/components/featurebullets.md +6 -0
- package/.llm/components/featurecards.md +42 -2
- package/.llm/components/featurecardscarousel.md +7 -1
- package/.llm/components/featurescroll.md +6 -0
- package/.llm/components/featuresplit.md +6 -0
- package/.llm/components/featurestack.md +6 -0
- package/.llm/components/featuretabs.md +369 -0
- package/.llm/components/filterchip.md +6 -0
- package/.llm/components/footer.md +6 -0
- package/.llm/components/footergroup.md +6 -0
- package/.llm/components/grid.md +30 -1
- package/.llm/components/icon.md +6 -0
- package/.llm/components/illustrationcard.md +52 -2
- package/.llm/components/illustrationcheck.md +193 -0
- package/.llm/components/illustrationchoice.md +187 -0
- package/.llm/components/illustrationcode.md +192 -0
- package/.llm/components/illustrationlist.md +175 -0
- package/.llm/components/illustrationscene.md +29 -3
- package/.llm/components/imagebanner.md +30 -5
- package/.llm/components/landinghero.md +6 -0
- package/.llm/components/link.md +7 -1
- package/.llm/components/logocolumns.md +7 -1
- package/.llm/components/logorows.md +42 -2
- package/.llm/components/menuitem.md +6 -0
- package/.llm/components/navbar.md +6 -0
- package/.llm/components/navbaritem.md +6 -0
- package/.llm/components/navbarmenu.md +6 -0
- package/.llm/components/navbarmenugroup.md +6 -0
- package/.llm/components/navbarpanel.md +6 -0
- package/.llm/components/navbarswitcher.md +6 -0
- package/.llm/components/navbarswitcheroption.md +6 -0
- package/.llm/components/option.md +6 -0
- package/.llm/components/pageheader.md +6 -0
- package/.llm/components/pagination.md +6 -0
- package/.llm/components/paginationdots.md +6 -0
- package/.llm/components/producthero.md +6 -0
- package/.llm/components/progressbar.md +305 -0
- package/.llm/components/removablechip.md +6 -0
- package/.llm/components/resourcebanner.md +6 -0
- package/.llm/components/row.md +6 -0
- package/.llm/components/scenescroll.md +38 -24
- package/.llm/components/scenescrollword.md +267 -0
- package/.llm/components/scroller.md +6 -0
- package/.llm/components/searchinput.md +6 -0
- package/.llm/components/segmentedcontrol.md +28 -1
- package/.llm/components/segmentedcontrolitem.md +6 -0
- package/.llm/components/select.md +6 -0
- package/.llm/components/selectchip.md +6 -0
- package/.llm/components/spinner.md +6 -0
- package/.llm/components/stack.md +6 -0
- package/.llm/components/stats.md +46 -1
- package/.llm/components/statscarousel.md +227 -0
- package/.llm/components/statusdot.md +41 -1
- package/.llm/components/steps.md +6 -0
- package/.llm/components/stickycards.md +6 -0
- package/.llm/components/subdomainnavbar.md +6 -0
- package/.llm/components/tab.md +6 -0
- package/.llm/components/table.md +6 -0
- package/.llm/components/tablebody.md +6 -0
- package/.llm/components/tablecell.md +6 -0
- package/.llm/components/tablehead.md +6 -0
- package/.llm/components/tableheadercell.md +6 -0
- package/.llm/components/tablerow.md +6 -0
- package/.llm/components/tablist.md +6 -0
- package/.llm/components/teamgrid.md +6 -0
- package/.llm/components/testimonialrow.md +43 -3
- package/.llm/components/testimonialslider.md +8 -2
- package/.llm/components/textarea.md +6 -0
- package/.llm/components/textinput.md +6 -0
- package/.llm/components/textscroll.md +6 -0
- package/.llm/components/tiers.md +13 -7
- package/.llm/components/tooltip.md +6 -0
- package/.llm/components/typography.md +63 -1
- package/.llm/digest/background.md +14 -6
- package/.llm/digest/button.md +1 -1
- package/.llm/digest/buttonicon.md +1 -1
- package/.llm/digest/documentlink.md +52 -0
- package/.llm/digest/documents.md +51 -0
- package/.llm/digest/downloadbanner.md +1 -1
- package/.llm/digest/featurecards.md +7 -0
- package/.llm/digest/featuretabs.md +50 -0
- package/.llm/digest/grid.md +1 -0
- package/.llm/digest/illustrationcard.md +6 -1
- package/.llm/digest/illustrationcheck.md +42 -0
- package/.llm/digest/illustrationchoice.md +43 -0
- package/.llm/digest/illustrationcode.md +41 -0
- package/.llm/digest/illustrationlist.md +38 -0
- package/.llm/digest/illustrationscene.md +4 -2
- package/.llm/digest/imagebanner.md +9 -3
- package/.llm/digest/logocolumns.md +1 -1
- package/.llm/digest/logorows.md +8 -1
- package/.llm/digest/progressbar.md +56 -0
- package/.llm/digest/scenescroll.md +6 -5
- package/.llm/digest/scenescrollword.md +56 -0
- package/.llm/digest/segmentedcontrol.md +3 -0
- package/.llm/digest/stats.md +8 -0
- package/.llm/digest/statscarousel.md +48 -0
- package/.llm/digest/statusdot.md +7 -0
- package/.llm/digest/testimonialrow.md +8 -1
- package/.llm/digest/testimonialslider.md +1 -1
- package/.llm/digest/typography.md +18 -0
- package/.llm/index.md +14 -4
- package/.llm/rules.md +10 -0
- package/.llm/tokens.md +12 -3
- package/AGENTS.md +13 -2
- package/dist/components/arrival.d.ts +32 -0
- package/dist/components/arrival.js +140 -0
- package/dist/components/arrives.d.ts +17 -0
- package/dist/components/arrives.js +14 -0
- package/dist/components/blocks/awards/Awards.js +2 -27
- package/dist/components/blocks/block-pattern.css +23 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +29 -0
- package/dist/components/blocks/documents/Documents.css +90 -0
- package/dist/components/blocks/documents/Documents.d.ts +22 -0
- package/dist/components/blocks/documents/Documents.js +30 -0
- package/dist/components/blocks/documents/Documents.types.d.ts +37 -0
- package/dist/components/blocks/documents/Documents.types.js +14 -0
- package/dist/components/blocks/documents/documents-impl.css +103 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +1 -1
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +1 -1
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +10 -7
- package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +9 -1
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +15 -3
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +1 -1
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +12 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.css +100 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.d.ts +23 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.js +38 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.d.ts +35 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.js +14 -0
- package/dist/components/blocks/feature-tabs/feature-tabs-impl.css +53 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +1 -1
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +1 -1
- package/dist/components/blocks/image-banner/ImageBanner.js +2 -2
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +9 -7
- package/dist/components/blocks/image-banner/ImageBanner.types.js +1 -1
- package/dist/components/blocks/image-banner/image-banner-impl.css +107 -29
- package/dist/components/blocks/laurel.d.ts +16 -0
- package/dist/components/blocks/laurel.js +28 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -1
- package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.d.ts +2 -1
- package/dist/components/blocks/logo-rows/LogoRows.js +7 -4
- package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +9 -1
- package/dist/components/blocks/pattern-tone.d.ts +11 -0
- package/dist/components/blocks/pattern-tone.js +7 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +7 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.js +9 -7
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +5 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +1 -1
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +139 -41
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.css +105 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.d.ts +31 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.js +67 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.d.ts +39 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.js +18 -0
- package/dist/components/blocks/scene-scroll-word/scene-scroll-word-impl.css +370 -0
- package/dist/components/blocks/stats/Stats.d.ts +2 -1
- package/dist/components/blocks/stats/Stats.js +17 -14
- package/dist/components/blocks/stats/Stats.types.d.ts +8 -0
- package/dist/components/blocks/stats/stats-impl.css +31 -2
- package/dist/components/blocks/stats/use-wheel.d.ts +1 -1
- package/dist/components/blocks/stats/use-wheel.js +8 -4
- package/dist/components/blocks/stats-carousel/StatsCarousel.css +209 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.d.ts +20 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.js +48 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.d.ts +43 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.js +23 -0
- package/dist/components/blocks/stats-carousel/stats-carousel-impl.css +233 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +8 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +2 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +16 -13
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +9 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +1 -1
- package/dist/components/blocks/tiers/Tiers.types.d.ts +1 -1
- package/dist/components/core/background/Background.css +19 -0
- package/dist/components/core/background/Background.types.d.ts +2 -1
- package/dist/components/core/background/background-impl.css +47 -15
- package/dist/components/core/background/halftone.js +1 -1
- package/dist/components/core/button/Button.css +5 -5
- package/dist/components/core/button-icon/ButtonIcon.types.d.ts +1 -1
- package/dist/components/core/card-body/CardBody.css +5 -0
- package/dist/components/core/card-body/CardBody.types.d.ts +1 -1
- package/dist/components/core/document-link/DocumentLink.css +59 -0
- package/dist/components/core/document-link/DocumentLink.d.ts +19 -0
- package/dist/components/core/document-link/DocumentLink.js +21 -0
- package/dist/components/core/document-link/DocumentLink.types.d.ts +41 -0
- package/dist/components/core/document-link/DocumentLink.types.js +11 -0
- package/dist/components/core/document-link/document-link-impl.css +23 -0
- package/dist/components/core/illustration-card/IllustrationCard.css +7 -0
- package/dist/components/core/illustration-card/IllustrationCard.d.ts +5 -1
- package/dist/components/core/illustration-card/IllustrationCard.js +34 -8
- package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +8 -1
- package/dist/components/core/illustration-card/IllustrationCard.types.js +1 -0
- package/dist/components/core/illustration-card/illustration-card-impl.css +117 -3
- package/dist/components/core/illustration-check/IllustrationCheck.css +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.d.ts +16 -0
- package/dist/components/core/illustration-check/IllustrationCheck.js +22 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.d.ts +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.js +9 -0
- package/dist/components/core/illustration-check/illustration-check-impl.css +76 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.css +62 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.d.ts +16 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.js +31 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.d.ts +25 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.js +11 -0
- package/dist/components/core/illustration-choice/illustration-choice-impl.css +103 -0
- package/dist/components/core/illustration-code/IllustrationCode.css +25 -0
- package/dist/components/core/illustration-code/IllustrationCode.d.ts +12 -0
- package/dist/components/core/illustration-code/IllustrationCode.js +20 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.d.ts +23 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.js +8 -0
- package/dist/components/core/illustration-code/illustration-code-impl.css +42 -0
- package/dist/components/core/illustration-list/IllustrationList.css +19 -0
- package/dist/components/core/illustration-list/IllustrationList.d.ts +16 -0
- package/dist/components/core/illustration-list/IllustrationList.js +18 -0
- package/dist/components/core/illustration-list/IllustrationList.types.d.ts +15 -0
- package/dist/components/core/illustration-list/IllustrationList.types.js +6 -0
- package/dist/components/core/illustration-list/illustration-list-impl.css +52 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +6 -0
- package/dist/components/core/illustration-scene/IllustrationScene.d.ts +3 -2
- package/dist/components/core/illustration-scene/IllustrationScene.js +4 -3
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +5 -1
- package/dist/components/core/illustration-scene/IllustrationScene.types.js +2 -1
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +65 -0
- package/dist/components/core/link/link-impl.css +5 -19
- package/dist/components/core/progress-bar/ProgressBar.css +101 -0
- package/dist/components/core/progress-bar/ProgressBar.d.ts +5 -0
- package/dist/components/core/progress-bar/ProgressBar.js +34 -0
- package/dist/components/core/progress-bar/ProgressBar.types.d.ts +52 -0
- package/dist/components/core/progress-bar/ProgressBar.types.js +12 -0
- package/dist/components/core/progress-bar/progress-bar-impl.css +45 -0
- package/dist/components/core/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/core/segmented-control/SegmentedControl.js +13 -5
- package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +5 -1
- package/dist/components/core/segmented-control/segmented-control-impl.css +35 -0
- package/dist/components/core/status-dot/StatusDot.d.ts +1 -1
- package/dist/components/core/status-dot/StatusDot.js +7 -4
- package/dist/components/core/status-dot/StatusDot.types.d.ts +9 -1
- package/dist/components/core/status-dot/status-dot-impl.css +101 -0
- package/dist/components/core/typography/Typography.d.ts +3 -283
- package/dist/components/core/typography/Typography.js +9 -1
- package/dist/components/core/typography/Typography.types.d.ts +9 -15
- package/dist/components/core/typography/TypographyMotion.d.ts +28 -0
- package/dist/components/core/typography/TypographyMotion.js +43 -0
- package/dist/components/core/typography/typography-impl.css +106 -0
- package/dist/components/illustration-data.d.ts +15 -0
- package/dist/components/illustration-data.js +7 -0
- package/dist/components/index.d.ts +22 -1
- package/dist/components/index.js +20 -0
- package/dist/components/layout/grid/Grid.css +5 -0
- package/dist/components/layout/grid/Grid.types.d.ts +2 -1
- package/dist/components/scene-scroll-data.d.ts +35 -0
- package/dist/components/tiers-data.d.ts +3 -2
- package/dist/marketing.css +24 -6
- package/package.json +1 -1
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
<!-- GENERATED from progress-bar.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# ProgressBar
|
|
4
|
+
|
|
5
|
+
Shows how much of a task is done.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
9
|
+
The share of a task that is done, drawn as a bar and stated as a number. It is a report and not a control: nothing here is pressable, and the value is the page's to compute — this draws whatever it is handed.
|
|
10
|
+
|
|
11
|
+
What it owns is that the reading and the width can never disagree. The value is held inside its range before either is written, so a bar that would have run past its own end draws full and announces full, and one handed a negative draws empty and announces empty. A reader comparing what they see with what a screen reader says is comparing two statements of the same number.
|
|
12
|
+
|
|
13
|
+
It needs a measurable end. A task whose size is unknown has no share to state, and a bar that invented one would be answering a question nobody can answer — that is ProgressBarIndeterminate, which says work is happening and declines to say how much.
|
|
14
|
+
|
|
15
|
+
## Use when
|
|
16
|
+
|
|
17
|
+
- A task has measurable completion and the user needs to see how much is done
|
|
18
|
+
- A longer operation — uploads, setup, or processing — needs progress feedback to reassure the user
|
|
19
|
+
|
|
20
|
+
## Do not use
|
|
21
|
+
|
|
22
|
+
- The work has no measurable end — connecting, waiting on a system that reports nothing → `Spinner`
|
|
23
|
+
- The task finishes as fast as a reader can notice → nothing here does this
|
|
24
|
+
- Placing icons or labels inside the bar. The fill is a measurement: it is the width that carries the meaning, so anything sitting in it is clipped at one value and swimming at another, and the reader is left judging a number against a moving edge. Put them beside the bar, where they hold still
|
|
25
|
+
- Stacking several bars for one operation. A reader sums what they see, and three bars at a third each read as three tasks rather than one — the one number that matters, how much of the whole is done, is the one nobody can work out. One bar, one task, and the value label says the rest
|
|
26
|
+
- Standing in for a result. A bar at full says the work finished, not that it succeeded, and a failed upload that ends at 100% tells the reader the opposite of what happened. What came of it is a message, not a measurement
|
|
27
|
+
|
|
28
|
+
## Anatomy
|
|
29
|
+
|
|
30
|
+
ProgressBar renders 6 elements. A token binding names the part it applies to.
|
|
31
|
+
|
|
32
|
+
- `root` — `<div>`, class `dds-progressbar`. Wraps the track and its labels. Carries the variant and size attributes. Under `motion="fill"` it fills once on arrival (`data-arrival`).
|
|
33
|
+
- `track` — `<div>`, class `dds-progressbar__track`. The background rail that represents the full range of progress.
|
|
34
|
+
- `fill` — `<div>`, class `dds-progressbar__fill`. The filled portion inside the track. Its width represents the current value as a fraction of the maximum.
|
|
35
|
+
- `label` — `<span>`, class `dds-progressbar__label`. Names what is loading. Rendered only when a label is given, and may be visually hidden while still announcing what is in progress — a bar named by what surrounds it renders no span at all rather than an empty one, which would cost a gap in the column and buy nothing. Rendered only when `label` is set.
|
|
36
|
+
- `value-label` — `<span>`, class `dds-progressbar__value-label`. Shows the formatted progress value, such as '75%' or '3 of 10'. Rendered only when `showValueLabel` is set.
|
|
37
|
+
- `description-text` — `<p>`, class `dds-progressbar__description-text`. Freeform context below the track, such as a status message, step count, or time remaining. Rendered only when `description` is set.
|
|
38
|
+
|
|
39
|
+
Apply these classes from the generated `progressBarParts` constant rather than writing the strings by hand.
|
|
40
|
+
|
|
41
|
+
## Composition
|
|
42
|
+
|
|
43
|
+
- Takes no children. Everything it renders comes from props
|
|
44
|
+
|
|
45
|
+
## Props
|
|
46
|
+
|
|
47
|
+
### size — `sm` | `md` (default `md`)
|
|
48
|
+
|
|
49
|
+
- `sm` — Dense layouts or inline indicators where vertical space is limited
|
|
50
|
+
- `md` — Default for standalone progress indicators in forms or dialogs
|
|
51
|
+
|
|
52
|
+
### variant — `default` | `accent` | `success` | `warning` | `error` | `info` (default `default`)
|
|
53
|
+
|
|
54
|
+
- `default` — The default, and neutral: no status and no brand. Most progress is merely progress — a step count filling as a form is completed, a bar moving while a file uploads — and the fact that work is moving is all the colour has to say. StepperItem is named and defaults the same way, and the two draw the same neutral, so a stepper and a bar reporting one task agree.
|
|
55
|
+
- `accent` — Brand-coloured, and asked for rather than arrived at. Reach for it where the page is drawing attention to this progress — the one thing on screen a reader is waiting on. It carries no status: what it adds over the neutral is prominence, not meaning, so a page reaching for it everywhere has spent the emphasis it buys.
|
|
56
|
+
- `success` — Indicating completion or a successful process
|
|
57
|
+
- `warning` — Progress that needs attention, such as approaching a limit
|
|
58
|
+
- `error` — Progress of a process that has encountered a problem
|
|
59
|
+
- `info` — Informational progress such as downloads, syncing, or data loading
|
|
60
|
+
|
|
61
|
+
### value — `number` (default `0`)
|
|
62
|
+
|
|
63
|
+
Use when: The amount of work completed — a number between 0 and max. Defaults to 0, which is the honest rendering of nothing started
|
|
64
|
+
Never for: A number outside the range this bar declares. It is held between nought and max before anything is drawn or announced, so a value past the end reads as full to the eye and to the ear alike — the clamp used to be on the width only, and a bar given 150 of 100 was drawn full while announcing 150 of 100.
|
|
65
|
+
|
|
66
|
+
### max — `number` (default `100`)
|
|
67
|
+
|
|
68
|
+
Use when: The total amount of work differs from the default of 100
|
|
69
|
+
Never for: Nought or less. Nothing can be a fraction of nothing, so there is no percentage to state and the bar reads as empty rather than complete — which is the one answer that is certainly wrong. A task whose size is unknown is ProgressBarIndeterminate.
|
|
70
|
+
|
|
71
|
+
### label — `string`
|
|
72
|
+
|
|
73
|
+
Use when: Naming what is in progress, when the bar is not already named by what surrounds it. Omit it for a bar that is part of a labelled flow — an onboarding stepper under its own heading — and name the bar with aria-labelledby instead
|
|
74
|
+
Never for: Displaying the numeric value, which belongs in the value label. And never leave the bar with no name at all: a progressbar announced without one is announced as nothing
|
|
75
|
+
|
|
76
|
+
### showLabel — `boolean` (default `true`)
|
|
77
|
+
|
|
78
|
+
Use when: The label is visible. When false, the label is visually hidden but remains accessible to screen readers
|
|
79
|
+
|
|
80
|
+
### showValueLabel — `boolean` (default `true`)
|
|
81
|
+
|
|
82
|
+
Use when: The numeric progress value is visible alongside the bar
|
|
83
|
+
|
|
84
|
+
### description — `string`
|
|
85
|
+
|
|
86
|
+
Use when: Freeform context below the bar, such as a step count, status message, or time remaining
|
|
87
|
+
|
|
88
|
+
### motion — `fill`
|
|
89
|
+
|
|
90
|
+
- `fill` — The bar fills from empty to its value once, on arrival, over motion.duration.dramatic — an account set-up three steps in, shown in a pane
|
|
91
|
+
|
|
92
|
+
Use when: The bar moves once, on arrival — in an IllustrationCard when the pane has landed, otherwise when it is well into view. For a bar shown as a picture of progress. At rest, and for a reader who asked for less movement, it is simply at its value, and its value is what is read out throughout
|
|
93
|
+
Never for: A bar reporting real, changing progress — an upload, a form being filled. That bar moves because the task does; filling it on arrival as well would show progress that did not happen
|
|
94
|
+
|
|
95
|
+
Also accepts everything from `HTMLAttributes<HTMLDivElement>`.
|
|
96
|
+
|
|
97
|
+
## Accessibility
|
|
98
|
+
|
|
99
|
+
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
100
|
+
|
|
101
|
+
- Announced as: `progressbar`
|
|
102
|
+
- accessible name from label
|
|
103
|
+
- aria-valuenow reflects the current value held inside the range, so the reading and the width can never disagree. A bar drawn full while announcing 140 is two answers to one question, and the one the reader trusts is whichever they happen to be using
|
|
104
|
+
- aria-valuemin is set to 0. A progress bar starts at nothing by definition — a range beginning anywhere else makes the percentage a screen reader computes disagree with the one drawn, and neither is labelled as the odd one out
|
|
105
|
+
- aria-valuemax reflects max, so the fraction announced is the fraction drawn. Left at the default of 100 while max is anything else, every reading is wrong by the ratio between them
|
|
106
|
+
|
|
107
|
+
## Rules
|
|
108
|
+
|
|
109
|
+
- **On a phone a section's actions stack and each fills the width, including when there is only one** — On a phone a page's actions stack, and each one fills the width. Not most of it, and not the width its label happens to need — the whole column.
|
|
110
|
+
|
|
111
|
+
Two side by side is what this replaces. On the narrowest screen each gets half a column minus the gap, which is rarely enough for a real label: the words wrap inside the pills, the two buttons come out different heights, and the pair reads as a broken row rather than as a choice. Stacked, each has the whole width and neither has to shorten its words to fit.
|
|
112
|
+
|
|
113
|
+
A single action fills too, and that is the part worth saying, because it is the one that looks unnecessary. A lone button has the room to sit at its natural width and still should not: a full-width control is the phone's convention for the thing the screen is asking you to do, and a pill hugging its label reads as one option among others that are not there. It also makes the target predictable — the whole width, wherever the thumb lands — which a centred pill does not.
|
|
114
|
+
|
|
115
|
+
Filling is the row's job rather than the button's. A button has no width of its own and is not given one; the row it sits in becomes a column and stretches its children, so nothing about the control changes and the same button is full width here and its own size on a desktop.
|
|
116
|
+
|
|
117
|
+
This is the phone's breakpoint, size.breakpoint.md, and not the wider one that decides whether a heading is centred. Those are different questions and they break at different widths: a heading stops being centred when the measure is the screen, while a button stops being full width much sooner than that — stretched across a tablet it is a long way from its own label, and a label centred in a metre of pill is harder to hit than one in a pill the size of the words.
|
|
118
|
+
|
|
119
|
+
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
120
|
+
Guidance only — cannot be checked automatically.
|
|
121
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
122
|
+
Guidance only — cannot be checked automatically.
|
|
123
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
124
|
+
|
|
125
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
126
|
+
|
|
127
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
128
|
+
Guidance only — cannot be checked automatically.
|
|
129
|
+
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
130
|
+
|
|
131
|
+
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
132
|
+
|
|
133
|
+
color.bg.strong is not a section ground. It is the inverted fill for an action that has to outrank what surrounds it, and the components that paint it — Button and ButtonIcon in their inverse form — already set both halves in one rule, which is the pattern a hand-painted section has to copy.
|
|
134
|
+
Guidance only — cannot be checked automatically.
|
|
135
|
+
- **Every gap inside a section names the relationship it expresses, and the same relationship keeps its measure when it turns on its side** — A section's spacing is named by the relationship it expresses, not chosen by size. Every gap in a section has a role token, and reaching for a step off the generic scale because it happens to be the right number is how two sections written by two people stop lining up: the numbers agree today and drift the first time one of them is tuned.
|
|
136
|
+
|
|
137
|
+
The heading group is three steps, not one gap. An eyebrow sits nearer its title than the title sits to its description, and the actions sit further from the description than either — space.heading.eyebrow-title, space.heading.title-description, space.heading.description-actions, in that order. A single `gap` on the group cannot say this; it sets all three the same and the block reads as evenly spaced lines rather than as a mark, a name and a paragraph. The eyebrow has to identify itself for this to work, because a group that opens with a title must not give its description the eyebrow's tighter step.
|
|
138
|
+
|
|
139
|
+
The step between a title and its description follows the size of the title, which is why there are two of it. What a reader sees is not the gap but the gap plus the leading above it, and leading scales with the type: under a display title the leading is most of the space, under a card's title it is half as deep. One value for both makes a card look loose at the size that made a section look right. So space.heading.title-description is the display step and space.heading.title-description-compact is the step at a card's size, and the choice is made by how big the title is rather than by what kind of block it sits in.
|
|
140
|
+
|
|
141
|
+
Every one of those steps is smaller than the gap below the group, and that ordering is what holds the group together as one thing. space.heading.content is the step between a heading group and the content it introduces, and it is the widest measure inside a section: the one gap the eye reads as a change of subject rather than as a continuation.
|
|
142
|
+
|
|
143
|
+
That step is the same whether the content is under the heading or beside it. A split is the same relationship turned on its side — a heading group and the content it introduces — so the space between the two halves is space.heading.content, not a gutter. When the split collapses to one column on a phone the gap becomes vertical again, which is where it started, and nothing has to change for that to be right.
|
|
144
|
+
|
|
145
|
+
space.grid.gutter is between two things of the same kind. Two cards in a row are the same kind; the two halves of a split are not, which is why the gutter is the wrong measure there even when the number would have looked acceptable. The gutter runs on both axes, so a grid reads as an even field rather than as rows with a seam down them.
|
|
146
|
+
|
|
147
|
+
space.inset.card is the card's, not the page's. A row of cards padded differently is a row of different cards, and the fill is the only edge they have. A page composing a row does not get to choose it.
|
|
148
|
+
|
|
149
|
+
Column count is not a breakpoint decision. A row holds as many columns as fit before a column would be narrower than size.grid.column-min, and drops one when they would not. Written as a fixed count that collapses at a breakpoint, a four-up row keeps four columns at every width above the phone and sets its copy two or three words to a line through the whole of the tablet range — and on a narrow desktop, which no breakpoint sits on at all. The threshold is a property of the row rather than of a card: a card fills whatever cell it is given.
|
|
150
|
+
|
|
151
|
+
What this does not cover is the space above and below a section, which is space.section.default and space.section.compact, and the page's own side margin, which is space.inset.page. Those are the section's outside; everything here is its inside.
|
|
152
|
+
Guidance only — cannot be checked automatically.
|
|
153
|
+
- **A section's title is centred over stacked content, starts beside content in columns, and starts on a phone** — Two arrangements, and the title's alignment is decided by which one it is introducing rather than chosen per section.
|
|
154
|
+
|
|
155
|
+
Content stacked under the title — a row of cards, an accordion, a set of steps — takes a centred title. The heading group and the block below it share one axis, so a centred title is symmetric with the thing it names, and the eye drops from the middle of the words to the middle of the set. A title starting at the left over a centred or full-width block reads as belonging to the first column rather than to all of them.
|
|
156
|
+
|
|
157
|
+
Content beside the title — a split, a picture in the other half, anything laid out in columns — takes a title that starts where its content starts. The two share a left edge, and that edge is what says they are one thing read across rather than two stacked. Centring the title there breaks the only alignment the reader has to hold the halves together, and it drifts further from its content the wider the page gets.
|
|
158
|
+
|
|
159
|
+
The heading group is what carries this, not the heading alone. An eyebrow, a title and a description are read as one block and align together; aligning the title without them leaves a centred heading over start-aligned copy, which reads as a mistake rather than as a choice.
|
|
160
|
+
|
|
161
|
+
Centred means all of it, not just the words. A badge, a row of actions, a picture — these are flex children, and a flex child is placed by align-items rather than by text-align, so a block that only sets the text leaves everything that is not text at the start. A hero is the case that shows it: its title and copy centred while its badge and its buttons did not.
|
|
162
|
+
|
|
163
|
+
A capped block centres itself as well as its words. A heading group takes size.heading-group.max, and a cap that is not centred leaves the measure at the start of the column with the words centred inside it — composed, and a long way left of the middle it appears to be in.
|
|
164
|
+
|
|
165
|
+
Both arrangements go to the start on a phone. A centred block reverts below the breakpoint, and the reason is the measure: on a phone the measure is the screen, so a centred title wraps to three or four ragged lines and the eye loses the left edge it was tracking — the same symmetry that reads as composure on a desktop is what makes it hard to scan on a phone. Centring there has to be asked for twice, and a section title is not one of the things that asks: it is centred because there is room for it, and on a phone there is not. Going back to the start means all of it too, and a capped block is the one that hides a leftover: its words go to the start while its measure stays in the middle of the column, which reads as a title still centred over a badge and buttons that are not — the box in the middle and the line inside it at the edge.
|
|
166
|
+
|
|
167
|
+
A hero is a section like any other: its badge, title, copy and actions are one stacked block, so it is centred on a desktop and starts on a phone with everything else.
|
|
168
|
+
|
|
169
|
+
What this is not about is a page whose body is a form or a document. A title over a sign-up form or a guide is not introducing a set of content — it is the first line of the thing itself, and it keeps the alignment the body has, which for running text is the start. The distinction is whether the block below is content the title names or content the title is part of.
|
|
170
|
+
Guidance only — cannot be checked automatically.
|
|
171
|
+
- **Anything a pointer has to hit is at least 24px in both directions** — A control sized by its contents is as big as its contents, and a glyph is chosen for how it reads rather than for how easily it is hit. An icon-only button with no padding is a 16px target — smaller than the pad of a finger, and smaller than the tremor of a hand using a mouse.
|
|
172
|
+
|
|
173
|
+
WCAG 2.2 asks for 24 by 24 CSS pixels at AA. The exceptions are narrower than they look: inline targets inside a sentence are exempt, and so is a small target with 24px of clear space around it — but a clear button sits against the field it empties, and a field is itself a target, so the spacing exemption does not apply to the case that keeps arising.
|
|
174
|
+
|
|
175
|
+
The target and the mark are separate decisions, and conflating them is what produces both faults. Growing the glyph to 24px makes it shout; leaving the button at 16px makes it hard to hit. So the glyph keeps the size that reads correctly beside its text, and the box around it declares a minimum of its own — which is what size.target.min is for.
|
|
176
|
+
|
|
177
|
+
Declared rather than emergent. Padding plus contents does clear 24px in several components today, and it is the weaker statement: it is a size nobody wrote down, so it moves when the type scale or the glyph does, and nothing says it was meant to be a target at all.
|
|
178
|
+
Guidance only — cannot be checked automatically.
|
|
179
|
+
- **A component is written along the reading axis, not along the page's left and right** — Every measure, inset and placement in this package names an axis rather than a side: inline-size and block-size, padding-inline and padding-block, inset-inline-start and inset-block-end, margin-inline: auto, text-align: start. Written that way a component follows whichever direction the page is read in, and a band whose claim ranges to the leading edge with its subject on the trailing one is the same composition in Arabic as in English, mirrored, with nothing restated. Written as left and right it is the same pixels in both, which is a layout nobody designed for the second language.
|
|
180
|
+
|
|
181
|
+
The enum values follow the same rule and for the same reason. A prop that names where a picture sits takes start and end, never left and right — FeatureSplit, FeatureBullets and FeatureScroll all declare mediaPosition that way, and the flex directions they generate flip on their own because row already means the reading order. A value called left would have to be re-read as right by every author working in a mirrored page, which is a translation this system should be doing rather than asking for.
|
|
182
|
+
|
|
183
|
+
The guidance a contract carries is part of the component, so it follows too. Describing a claim as ranging left is describing one of the two languages, and it was written that way here for a while: three of the opening bands said so in their own intent. A reader in a mirrored page meets that sentence and has to decide whether the component is wrong or the sentence is, and neither answer is one documentation should force.
|
|
184
|
+
|
|
185
|
+
Two things genuinely have no logical form and are not covered by this. A CSS gradient takes a physical direction — there is no to inline-end — so a pattern that must mirror has to be stated twice under a direction query, and one that is periodic and centred, like PageHeader's rule grid, does not need to. A glyph that points the way onward is the other: an arrow is a picture of a direction, and mirroring it belongs to the icon set rather than to the component holding it.
|
|
186
|
+
Guidance only — cannot be checked automatically.
|
|
187
|
+
|
|
188
|
+
## Anti-examples
|
|
189
|
+
|
|
190
|
+
❌ ProgressBar for: The work has no measurable end — connecting, waiting on a system that reports nothing
|
|
191
|
+
A share of a task requires knowing the size of the task. Given none, this bar can only draw a number somebody invented, and an invented percentage is worse than an honest animation; a Spinner says something is happening without claiming how much is left. This package has no indeterminate bar
|
|
192
|
+
→ use `Spinner` instead.
|
|
193
|
+
|
|
194
|
+
❌ ProgressBar for: The task finishes as fast as a reader can notice
|
|
195
|
+
Nothing in the system, deliberately. A bar that appears and completes in the same moment is a flash the reader cannot read and did not need — it reports on work that was over before the report arrived, and the page is better with nothing there at all
|
|
196
|
+
→ nothing in this system does this. Not a gap waiting to be filled — the case belongs outside it.
|
|
197
|
+
|
|
198
|
+
## Example
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
import { ProgressBar } from '@deriv-com/dds-marketing'
|
|
202
|
+
|
|
203
|
+
<ProgressBar label="Uploading files" value={70} description="3 of 10 files uploaded" />
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## In use
|
|
207
|
+
|
|
208
|
+
### Named, and named by its surroundings
|
|
209
|
+
|
|
210
|
+
A bar carries its own label when nothing else names it. Inside a flow that is already titled it carries none, renders no label row, and is named with aria-labelledby instead.
|
|
211
|
+
|
|
212
|
+
```tsx
|
|
213
|
+
import { ProgressBar } from '@deriv-com/dds-marketing'
|
|
214
|
+
|
|
215
|
+
// Its own label, beside the percentage
|
|
216
|
+
<ProgressBar label="Uploading files" value={40} />
|
|
217
|
+
|
|
218
|
+
// Named by the heading above it, so no label row
|
|
219
|
+
<ProgressBar value={60} showValueLabel={false} />
|
|
220
|
+
|
|
221
|
+
// Label announced but not shown
|
|
222
|
+
<ProgressBar label="Verifying documents" value={25} showLabel={false} />
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### How far along
|
|
226
|
+
|
|
227
|
+
The value is what the bar is for. Nothing given means nothing started, which is a real state rather than a missing one.
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
import { ProgressBar } from '@deriv-com/dds-marketing'
|
|
231
|
+
|
|
232
|
+
// Not started
|
|
233
|
+
<ProgressBar label="Uploading files" />
|
|
234
|
+
|
|
235
|
+
// Part way
|
|
236
|
+
<ProgressBar label="Uploading files" value={45} />
|
|
237
|
+
|
|
238
|
+
// Complete
|
|
239
|
+
<ProgressBar label="Uploading files" value={100} />
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Context below the bar
|
|
243
|
+
|
|
244
|
+
A description says what a percentage cannot — which file, which step, how long left. Freeform, and absent when there is nothing worth adding.
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
import { ProgressBar } from '@deriv-com/dds-marketing'
|
|
248
|
+
|
|
249
|
+
// A step count the number alone does not give
|
|
250
|
+
<ProgressBar label="Uploading files" value={30} description="3 of 10 files uploaded" />
|
|
251
|
+
|
|
252
|
+
// Nothing to add, so no line is reserved for it
|
|
253
|
+
<ProgressBar label="Uploading files" value={30} />
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### What the colour is saying
|
|
257
|
+
|
|
258
|
+
The colour is the meaning. Neutral for progress that is merely progressing, accent where the page is drawing attention to it, and the other four where the bar has something to report about the work.
|
|
259
|
+
|
|
260
|
+
```tsx
|
|
261
|
+
import { ProgressBar } from '@deriv-com/dds-marketing'
|
|
262
|
+
|
|
263
|
+
// Default — neutral, and says nothing but that it is moving
|
|
264
|
+
<ProgressBar label="Completing your profile" value={62} variant="default" />
|
|
265
|
+
|
|
266
|
+
// Accent — the same progress, given prominence
|
|
267
|
+
<ProgressBar label="Uploading files" value={62} variant="accent" />
|
|
268
|
+
|
|
269
|
+
// Success — it finished, and that is worth showing
|
|
270
|
+
<ProgressBar label="Verification" value={100} variant="success" />
|
|
271
|
+
|
|
272
|
+
// Warning — approaching a limit
|
|
273
|
+
<ProgressBar label="Storage used" value={88} variant="warning" />
|
|
274
|
+
|
|
275
|
+
// Error — the process hit a problem
|
|
276
|
+
<ProgressBar label="Uploading files" value={41} variant="error" />
|
|
277
|
+
|
|
278
|
+
// Info — a download, a sync, data loading
|
|
279
|
+
<ProgressBar label="Syncing your history" value={35} variant="info" />
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Sizes
|
|
283
|
+
|
|
284
|
+
Two, and the difference is vertical space. Dense goes inline or into a list row; the default stands on its own in a form or a dialog.
|
|
285
|
+
|
|
286
|
+
```tsx
|
|
287
|
+
import { ProgressBar } from '@deriv-com/dds-marketing'
|
|
288
|
+
|
|
289
|
+
// Dense — inline, or a row in a list
|
|
290
|
+
<ProgressBar label="Storage used" value={62} size="sm" />
|
|
291
|
+
|
|
292
|
+
// Default — standing on its own
|
|
293
|
+
<ProgressBar label="Storage used" value={62} size="md" />
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Filling once on arrival
|
|
297
|
+
|
|
298
|
+
The bar fills from empty to its value once, as a picture of progress.
|
|
299
|
+
|
|
300
|
+
```tsx
|
|
301
|
+
import { ProgressBar } from '@deriv-com/dds-marketing'
|
|
302
|
+
|
|
303
|
+
// motion="fill"
|
|
304
|
+
<ProgressBar label="Account set-up" value={75} motion="fill" />
|
|
305
|
+
```
|
|
@@ -118,6 +118,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
118
118
|
Guidance only — cannot be checked automatically.
|
|
119
119
|
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
120
120
|
Guidance only — cannot be checked automatically.
|
|
121
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
122
|
+
|
|
123
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
124
|
+
|
|
125
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
126
|
+
Guidance only — cannot be checked automatically.
|
|
121
127
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
122
128
|
|
|
123
129
|
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
@@ -122,6 +122,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
122
122
|
Guidance only — cannot be checked automatically.
|
|
123
123
|
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
124
124
|
Guidance only — cannot be checked automatically.
|
|
125
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
126
|
+
|
|
127
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
128
|
+
|
|
129
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
130
|
+
Guidance only — cannot be checked automatically.
|
|
125
131
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
126
132
|
|
|
127
133
|
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
package/.llm/components/row.md
CHANGED
|
@@ -134,6 +134,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
134
134
|
Guidance only — cannot be checked automatically.
|
|
135
135
|
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
136
136
|
Guidance only — cannot be checked automatically.
|
|
137
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
138
|
+
|
|
139
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
140
|
+
|
|
141
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
142
|
+
Guidance only — cannot be checked automatically.
|
|
137
143
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
138
144
|
|
|
139
145
|
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
@@ -18,28 +18,29 @@ The reference design's DayNightTransition, made generic: nothing in it is about
|
|
|
18
18
|
|
|
19
19
|
## Do not use
|
|
20
20
|
|
|
21
|
+
- The two scenes are one claim with one word changed — "Trade all day", "Trade all night" → `SceneScrollWord`
|
|
21
22
|
- There is one photograph, not two states of something → `ImageBanner`
|
|
22
23
|
- Three or more things to show, each with a picture → `FeatureScroll`
|
|
23
24
|
- The page's opening band, with an action to take → `LandingHero`
|
|
24
25
|
- One statement on its own, revealed as the reader scrolls → `TextScroll`
|
|
25
26
|
- Words a reader must not miss — a price, a disclaimer, a legal line. Each scene's words are on screen for only part of the pass
|
|
26
27
|
- Two of these on one page, or one beside another pinned section. Each holds the screen for a screen and a half of scrolling, and two make the page feel stuck
|
|
27
|
-
- Photographs with words in them. The words are the headings and the lines, where a screen reader and a translation reach them; a photograph saying them is
|
|
28
|
-
-
|
|
28
|
+
- Photographs with words in them. The words are the headings and the lines, where a screen reader and a translation reach them; a photograph saying them is cropped to fill and has the scene's words set over it
|
|
29
|
+
- Words over a busy stretch of photograph. White words lay a shade under themselves, but near-black words sit straight on the photograph, so a light photograph has to leave them a calm stretch to sit on, and the scene's ink has to name which
|
|
29
30
|
|
|
30
31
|
## Anatomy
|
|
31
32
|
|
|
32
33
|
SceneScroll renders 9 elements. A token binding names the part it applies to.
|
|
33
34
|
|
|
34
|
-
- `root` — `<section>`, class `dds-scenescroll`. The section, a region named by the first scene's title. Where the scroll drives the change-over it is the track: two and a half screens tall, and the view timeline the dissolve runs down. Elsewhere it is as tall as the two scenes it holds. It paints color.bg.brand-strong under the photographs and sets color.fg.on-brand-strong, white in both modes,
|
|
35
|
+
- `root` — `<section>`, class `dds-scenescroll`. The section, a region named by the first scene's title. Where the scroll drives the change-over it is the track: two and a half screens tall, and the view timeline the dissolve runs down. Elsewhere it is as tall as the two scenes it holds. It paints color.bg.brand-strong under the photographs, which shows only before they load, and sets color.fg.on-brand-strong, white in both modes, as the ink a scene takes unless it names another. It clips with `overflow: clip` if it ever clips, never `hidden`, which would make it a scroll container and freeze the timeline and the pin.
|
|
35
36
|
- `stage` — `<div>`, class `dds-scenescroll__stage`. What the reader sees. Where the scroll drives the change-over it is a screen tall and pinned to the top of the window for the length of the track, with both scenes stacked in its one cell. Elsewhere it is a column of the two scenes, one after the other with nothing between them.
|
|
36
|
-
- `scene` — `<div>`, class `dds-scenescroll__scene`. One scene, drawn twice — `data-scene` says which. A screen tall, the photograph behind and the words over it, inset by the section's air and the page's gutter. Isolated, so the second scene's photograph covers the first scene's words as well as its photograph as it dissolves in.
|
|
37
|
-
- `media` — `<div>`, class `dds-scenescroll__media`. The scene's photograph, filling the scene edge to edge and square-cornered,
|
|
37
|
+
- `scene` — `<div>`, class `dds-scenescroll__scene`. One scene, drawn twice — `data-scene` says which. A screen tall, the photograph behind and the words over it, inset by the section's air and the page's gutter. Isolated, so the second scene's photograph covers the first scene's words as well as its photograph as it dissolves in. Its ink is the one the scene names — color.fg.on-media-light, near-black in both modes, over a light photograph; color.fg.on-brand-strong, white, over a dark one.
|
|
38
|
+
- `media` — `<div>`, class `dds-scenescroll__media`. The scene's photograph, filling the scene edge to edge and square-cornered, anchored at its foot and, from 62rem, at the far side from the words, so a crop takes from the words' side and the subject keeps its own. The second scene's photograph dissolves in over the first's.
|
|
38
39
|
- `image` — `<img>`, class `dds-scenescroll__image`. The photograph, drawn from the scene's `image` and cropped to fill the scene. Its `alt` is the scene's own: empty for a photograph that is decoration, which most are here.
|
|
39
|
-
- `content` — `<div>`, class `dds-scenescroll__content`. The scene's words — its title and the line under it — over the photograph, held to the heading group's measure. At the top of the stage and at the
|
|
40
|
+
- `content` — `<div>`, class `dds-scenescroll__content`. The scene's words — its title and the line under it — over the photograph, held to the heading group's measure. At the start on every screen, held to the heading group's measure — and from 62rem to half the stage, whichever is narrower — and to the page's content column, so the far side of the photograph is left to its subject. Under white ink it lays a shade of color.bg.overlay under itself, full strength to its own edge and eased out past it — from 62rem a band down its half, fading across three times space.section.default toward the subject; below 62rem down from the top of the stage and out space.section.default under the words — so it fades with the words through the change-over. It sits at the top of the stage below 62rem, under the room a navigation bar takes, and centred down the stage from 62rem — the reference design's arrangement, at its 992px. Where the scroll drives the change-over the first scene's words fade out and then the second scene's fade in, in the same place; both are in the DOM and read in order the whole time, and neither is ever hidden from assistive technology.
|
|
40
41
|
- `title` — `<h2>`, class `dds-scenescroll__title`. The scene's title. The first scene's is at `headingLevel` and names the section; the second's is one level under it. Both drawn at the size `headingLevel` names, font.h2 or font.h1.
|
|
41
42
|
- `description` — `<p>`, class `dds-scenescroll__description`. The line under a scene's title, at the large body step and the description measure. Drawn only for a scene that has one.
|
|
42
|
-
- `
|
|
43
|
+
- `action` — `<div>`, class `dds-scenescroll__action`. The section's one thing to do, right under the words. While the scenes change over, both scenes' words share one area of the stage, as tall as the taller of them, and the action is the row under it — under the text on every screen, and still while the text changes. At the start with the words on every screen: at the top of the stage below 62rem, centred down it with them from 62rem. In the plain fallback, where the scenes stack, it follows the second. Rendered only when `action` is set.
|
|
43
44
|
|
|
44
45
|
Apply these classes from the generated `sceneScrollParts` constant rather than writing the strings by hand.
|
|
45
46
|
|
|
@@ -60,19 +61,19 @@ Never for: Making a mid-page section look like a hero. h1 is the page's heading,
|
|
|
60
61
|
|
|
61
62
|
### first — `data` `SceneScrollScene` **Required.**
|
|
62
63
|
|
|
63
|
-
Use when: Always. The scene the section opens on: a title in a few words, a line under it where the title needs one, and the photograph filling the band behind them. Its title names the section, so it is the one to write as the section's heading. Give the photograph's width and height; `alt` empty unless it shows something the words do not.
|
|
64
|
+
Use when: Always. The scene the section opens on: a title in a few words, a line under it where the title needs one, and the photograph filling the band behind them. Its title names the section, so it is the one to write as the section's heading. Give its `ink` — `dark` over a light photograph, `light` over a dark one — and the photograph's width and height; `alt` empty unless it shows something the words do not.
|
|
64
65
|
Never for: A scene that says the same as the second with a different picture. The change-over is the argument; two scenes that agree have nothing to change between.
|
|
65
66
|
|
|
66
67
|
### second — `data` `SceneScrollScene` **Required.**
|
|
67
68
|
|
|
68
|
-
Use when: Always. The scene the section changes over to, in the same shape as the first. A title of about the same length as the first, so the words change in place rather than jumping, and a photograph of the same composition where there is one, so the dissolve reads as one place changing rather than a cut.
|
|
69
|
+
Use when: Always. The scene the section changes over to, in the same shape as the first. A title of about the same length as the first, so the words change in place rather than jumping, and a photograph of the same composition where there is one, so the dissolve reads as one place changing rather than a cut. Its `ink` is its own, so a daylight first scene in dark words can change over to a night one in white.
|
|
69
70
|
Never for: A continuation of the first scene's sentence. A reader who arrives by heading, or who scrolls past fast, reads each title on its own.
|
|
70
71
|
|
|
71
|
-
###
|
|
72
|
+
### action — `node`
|
|
72
73
|
|
|
73
|
-
Accepts: Link
|
|
74
|
-
Use when:
|
|
75
|
-
Never for:
|
|
74
|
+
Accepts: Button, Link
|
|
75
|
+
Use when: One thing for the reader to do or a way on — "Trade now", "See trading hours" — under the words. It belongs to the section rather than to either scene, so it holds still through the change-over and never fades while the reader is reaching for it. A primary Button, or a standalone Link at its brand tone: either reads over both photographs, where a Link taking the ink around it would take the band's white over a light photograph.
|
|
76
|
+
Never for: Two actions, or a different one per scene. One thing to do for the section; something to press that changed under the pointer would be the one thing a reader could not rely on.
|
|
76
77
|
|
|
77
78
|
## Accessibility
|
|
78
79
|
|
|
@@ -82,7 +83,7 @@ Guaranteed by the component. Write none of it by hand: the ids these attributes
|
|
|
82
83
|
- `Tab` — Moves past the section. Nothing in it is operable — the scenes are read, not used — so there is nothing here to land on.
|
|
83
84
|
- The section is a region named by the first scene's title, through aria-labelledby, so a reader can jump to it and past it. Named by a heading already on the page rather than a hidden label of its own, so what is announced is what is shown
|
|
84
85
|
- Both scenes' words are in the DOM, in order — the first scene's title and line, then the second's — whatever the scroll has faded. The visual change-over never hides either scene's words from assistive technology, never removes them, and never re-orders them
|
|
85
|
-
- The words over
|
|
86
|
+
- The words over each photograph are drawn in the ink its scene names, near-black over a light photograph and white over a dark one. White words lay a shade of color.bg.overlay under themselves, which holds AA under every word as ImageBanner's cover shade does. Near-black words sit straight on the photograph, and the author answers for their contrast against the part of it they sit on: no check here can see that pair, so the scene's ink is what a reviewer reads
|
|
86
87
|
- Without a scroll timeline, for a reader who asked for less motion, and before any script, nothing is faded and nothing is pinned: the two scenes are drawn one after the other, each with its words at full strength
|
|
87
88
|
- Each photograph's alt is the one its scene was given — empty for a photograph that is decoration
|
|
88
89
|
|
|
@@ -102,6 +103,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
102
103
|
Guidance only — cannot be checked automatically.
|
|
103
104
|
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
104
105
|
Guidance only — cannot be checked automatically.
|
|
106
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
107
|
+
|
|
108
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
109
|
+
|
|
110
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
111
|
+
Guidance only — cannot be checked automatically.
|
|
105
112
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
106
113
|
|
|
107
114
|
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
@@ -163,6 +170,10 @@ Two things genuinely have no logical form and are not covered by this. A CSS gra
|
|
|
163
170
|
|
|
164
171
|
## Anti-examples
|
|
165
172
|
|
|
173
|
+
❌ SceneScroll for: The two scenes are one claim with one word changed — "Trade all day", "Trade all night"
|
|
174
|
+
SceneScrollWord holds the claim still and changes the one word; here each scene's words are whole and give way to each other
|
|
175
|
+
→ use `SceneScrollWord` instead.
|
|
176
|
+
|
|
166
177
|
❌ SceneScroll for: There is one photograph, not two states of something
|
|
167
178
|
One photograph with words over it is a cover banner; a scene that never changes over is a section a screen tall for nothing
|
|
168
179
|
→ use `ImageBanner` instead.
|
|
@@ -172,7 +183,7 @@ Two things genuinely have no logical form and are not covered by this. A CSS gra
|
|
|
172
183
|
→ use `FeatureScroll` instead.
|
|
173
184
|
|
|
174
185
|
❌ SceneScroll for: The page's opening band, with an action to take
|
|
175
|
-
An opening band
|
|
186
|
+
An opening band leads into the rest of the page from its claim; this holds the screen for a screen and a half of scrolling before the page goes on, which an opening band asking for something cannot afford
|
|
176
187
|
→ use `LandingHero` instead.
|
|
177
188
|
|
|
178
189
|
❌ SceneScroll for: One statement on its own, revealed as the reader scrolls
|
|
@@ -182,9 +193,9 @@ Two things genuinely have no logical form and are not covered by this. A CSS gra
|
|
|
182
193
|
## Example
|
|
183
194
|
|
|
184
195
|
```tsx
|
|
185
|
-
import { SceneScroll } from '@deriv-com/dds-marketing'
|
|
196
|
+
import { SceneScroll, Button } from '@deriv-com/dds-marketing'
|
|
186
197
|
|
|
187
|
-
<SceneScroll first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-
|
|
198
|
+
<SceneScroll first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-banner-art.svg","alt":"","width":1200,"height":300},"ink":"dark"}} second={{"title":"And the same desk, at the close","description":"Every trade of the day in one view, with nothing left to reconcile.","image":{"src":"/sample-stop-blue.svg","alt":"","width":800,"height":600},"ink":"light"}} action={<Button href="/signup">Trade now</Button>} />
|
|
188
199
|
```
|
|
189
200
|
|
|
190
201
|
## In use
|
|
@@ -197,10 +208,10 @@ h2 under the page's own heading, or h1 when the section opens a campaign page. T
|
|
|
197
208
|
import { SceneScroll } from '@deriv-com/dds-marketing'
|
|
198
209
|
|
|
199
210
|
// h2 — a section of the page, the default
|
|
200
|
-
<SceneScroll first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-
|
|
211
|
+
<SceneScroll first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-banner-art.svg","alt":"","width":1200,"height":300},"ink":"dark"}} second={{"title":"And the same desk, at the close","description":"Every trade of the day in one view, with nothing left to reconcile.","image":{"src":"/sample-stop-blue.svg","alt":"","width":800,"height":600},"ink":"light"}} />
|
|
201
212
|
|
|
202
213
|
// h1 — the opening band of a campaign page
|
|
203
|
-
<SceneScroll headingLevel="h1" first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-
|
|
214
|
+
<SceneScroll headingLevel="h1" first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-banner-art.svg","alt":"","width":1200,"height":300},"ink":"dark"}} second={{"title":"And the same desk, at the close","description":"Every trade of the day in one view, with nothing left to reconcile.","image":{"src":"/sample-stop-blue.svg","alt":"","width":800,"height":600},"ink":"light"}} />
|
|
204
215
|
```
|
|
205
216
|
|
|
206
217
|
### Two states of one thing
|
|
@@ -211,16 +222,19 @@ Day and night is one pair among many. Photographs of the same composition make t
|
|
|
211
222
|
import { SceneScroll } from '@deriv-com/dds-marketing'
|
|
212
223
|
|
|
213
224
|
// Markets that never close
|
|
214
|
-
<SceneScroll first={{"title":"Markets that never close","description":"Trade forex, stocks and commodities from the first bell to the last.","image":{"src":"/sample-
|
|
225
|
+
<SceneScroll first={{"title":"Markets that never close","description":"Trade forex, stocks and commodities from the first bell to the last.","image":{"src":"/sample-banner-art.svg","alt":"","width":1200,"height":300},"ink":"dark"}} second={{"title":"And trade on through the night","description":"Derived indices run every hour of every day, weekends included.","image":{"src":"/sample-stop-blue.svg","alt":"","width":800,"height":600},"ink":"light"}} />
|
|
215
226
|
```
|
|
216
227
|
|
|
217
|
-
### With
|
|
228
|
+
### With something to do
|
|
218
229
|
|
|
219
|
-
|
|
230
|
+
One action for the section, under the words: a primary Button, or a Link at its brand tone. It belongs to neither scene, so it holds still while the words change over it.
|
|
220
231
|
|
|
221
232
|
```tsx
|
|
222
|
-
import { Link, SceneScroll } from '@deriv-com/dds-marketing'
|
|
233
|
+
import { Button, Link, SceneScroll } from '@deriv-com/dds-marketing'
|
|
234
|
+
|
|
235
|
+
// A button under the words
|
|
236
|
+
<SceneScroll first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-banner-art.svg","alt":"","width":1200,"height":300},"ink":"dark"}} second={{"title":"And the same desk, at the close","description":"Every trade of the day in one view, with nothing left to reconcile.","image":{"src":"/sample-stop-blue.svg","alt":"","width":800,"height":600},"ink":"light"}} action={<Button href="/signup">Trade now</Button>} />
|
|
223
237
|
|
|
224
238
|
// A link under the words
|
|
225
|
-
<SceneScroll first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-
|
|
239
|
+
<SceneScroll first={{"title":"Your trading desk, at the open","description":"Charts, prices and positions in one place, ready when the market is.","image":{"src":"/sample-banner-art.svg","alt":"","width":1200,"height":300},"ink":"dark"}} second={{"title":"And the same desk, at the close","description":"Every trade of the day in one view, with nothing left to reconcile.","image":{"src":"/sample-stop-blue.svg","alt":"","width":800,"height":600},"ink":"light"}} action={<Link href="/hours">See trading hours</Link>} />
|
|
226
240
|
```
|