@deriv-com/dds-marketing 1.0.2 → 1.1.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/.llm/components/awards.md +209 -0
- package/.llm/components/background.md +89 -40
- package/.llm/components/bottomsheet.md +5 -0
- package/.llm/components/comparisoncards.md +257 -0
- package/.llm/components/comparisontable.md +231 -0
- package/.llm/components/ctabanner.md +9 -12
- package/.llm/components/ctabannerslider.md +15 -2
- package/.llm/components/datatable.md +273 -0
- package/.llm/components/downloadbanner.md +283 -0
- package/.llm/components/featurecards.md +41 -3
- package/.llm/components/featurecardscarousel.md +311 -0
- package/.llm/components/featuresplit.md +5 -0
- package/.llm/components/featurestack.md +227 -0
- package/.llm/components/illustrationcard.md +2 -2
- package/.llm/components/illustrationscene.md +6 -10
- package/.llm/components/imagebanner.md +278 -0
- package/.llm/components/navbar.md +1 -1
- package/.llm/components/navbaritem.md +4 -0
- package/.llm/components/pageheader.md +4 -3
- package/.llm/components/paginationdots.md +6 -1
- package/.llm/components/producthero.md +35 -11
- package/.llm/components/resourcebanner.md +247 -0
- package/.llm/components/scenescroll.md +222 -0
- package/.llm/components/select.md +17 -0
- package/.llm/components/stats.md +219 -0
- package/.llm/components/steps.md +286 -0
- package/.llm/components/stickycards.md +251 -0
- package/.llm/components/tableheadercell.md +19 -0
- package/.llm/components/teamgrid.md +243 -0
- package/.llm/components/testimonialrow.md +5 -0
- package/.llm/components/testimonialslider.md +14 -1
- package/.llm/components/textarea.md +13 -0
- package/.llm/components/textinput.md +13 -0
- package/.llm/components/textscroll.md +187 -0
- package/.llm/components/tiers.md +227 -0
- package/.llm/digest/awards.md +45 -0
- package/.llm/digest/background.md +11 -10
- package/.llm/digest/bottomsheet.md +2 -0
- package/.llm/digest/comparisoncards.md +51 -0
- package/.llm/digest/comparisontable.md +53 -0
- package/.llm/digest/ctabanner.md +4 -4
- package/.llm/digest/ctabannerslider.md +4 -0
- package/.llm/digest/datatable.md +65 -0
- package/.llm/digest/downloadbanner.md +65 -0
- package/.llm/digest/featurecards.md +1 -1
- package/.llm/digest/featurecardscarousel.md +54 -0
- package/.llm/digest/featuresplit.md +1 -0
- package/.llm/digest/featurestack.md +48 -0
- package/.llm/digest/illustrationscene.md +2 -3
- package/.llm/digest/imagebanner.md +64 -0
- package/.llm/digest/navbaritem.md +1 -0
- package/.llm/digest/pageheader.md +2 -1
- package/.llm/digest/paginationdots.md +3 -1
- package/.llm/digest/producthero.md +4 -2
- package/.llm/digest/resourcebanner.md +53 -0
- package/.llm/digest/scenescroll.md +49 -0
- package/.llm/digest/select.md +5 -0
- package/.llm/digest/stats.md +46 -0
- package/.llm/digest/steps.md +55 -0
- package/.llm/digest/stickycards.md +52 -0
- package/.llm/digest/tableheadercell.md +4 -0
- package/.llm/digest/teamgrid.md +53 -0
- package/.llm/digest/testimonialrow.md +2 -0
- package/.llm/digest/testimonialslider.md +4 -0
- package/.llm/digest/textarea.md +4 -0
- package/.llm/digest/textinput.md +4 -0
- package/.llm/digest/textscroll.md +43 -0
- package/.llm/digest/tiers.md +50 -0
- package/.llm/index.md +19 -3
- package/.llm/tokens.md +26 -1
- package/AGENTS.md +17 -1
- package/dist/components/awards-data.d.ts +24 -0
- package/dist/components/awards-data.js +11 -0
- package/dist/components/block-image-data.d.ts +24 -0
- package/dist/components/block-image-data.js +9 -0
- package/dist/components/blocks/awards/Awards.css +134 -0
- package/dist/components/blocks/awards/Awards.d.ts +24 -0
- package/dist/components/blocks/awards/Awards.js +114 -0
- package/dist/components/blocks/awards/Awards.types.d.ts +31 -0
- package/dist/components/blocks/awards/Awards.types.js +16 -0
- package/dist/components/blocks/awards/awards-impl.css +222 -0
- package/dist/components/blocks/cards-of.d.ts +16 -0
- package/dist/components/blocks/cards-of.js +23 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.css +195 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.d.ts +24 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.js +75 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.types.d.ts +49 -0
- package/dist/components/blocks/comparison-cards/ComparisonCards.types.js +26 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +262 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.css +111 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.d.ts +25 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.js +100 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.types.d.ts +36 -0
- package/dist/components/blocks/comparison-table/ComparisonTable.types.js +15 -0
- package/dist/components/blocks/comparison-table/comparison-table-impl.css +143 -0
- package/dist/components/blocks/cta-banner/CtaBanner.css +1 -0
- package/dist/components/blocks/cta-banner/CtaBanner.js +2 -2
- package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +4 -3
- package/dist/components/blocks/cta-banner/CtaBanner.types.js +1 -1
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.css +1 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +1 -1
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +6 -2
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +8 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +1 -1
- package/dist/components/blocks/data-table/DataTable.css +170 -0
- package/dist/components/blocks/data-table/DataTable.d.ts +29 -0
- package/dist/components/blocks/data-table/DataTable.js +84 -0
- package/dist/components/blocks/data-table/DataTable.types.d.ts +69 -0
- package/dist/components/blocks/data-table/DataTable.types.js +19 -0
- package/dist/components/blocks/data-table/data-table-impl.css +155 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +228 -0
- package/dist/components/blocks/download-banner/DownloadBanner.d.ts +28 -0
- package/dist/components/blocks/download-banner/DownloadBanner.js +75 -0
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +56 -0
- package/dist/components/blocks/download-banner/DownloadBanner.types.js +23 -0
- package/dist/components/blocks/download-banner/download-banner-impl.css +216 -0
- package/dist/components/blocks/faq-accordion/FaqAccordion.css +1 -0
- package/dist/components/blocks/faq-accordion/faq-accordion-impl.css +3 -7
- package/dist/components/blocks/feature-bullets/FeatureBullets.css +1 -0
- package/dist/components/blocks/feature-bullets/feature-bullets-impl.css +14 -1
- package/dist/components/blocks/feature-cards/FeatureCards.css +1 -0
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +4 -21
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +10 -9
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.css +115 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.d.ts +30 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.js +160 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +52 -0
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.js +17 -0
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +207 -0
- package/dist/components/blocks/feature-scroll/FeatureScroll.css +1 -0
- package/dist/components/blocks/feature-split/FeatureSplit.css +1 -0
- package/dist/components/blocks/feature-split/feature-split-impl.css +14 -1
- package/dist/components/blocks/feature-stack/FeatureStack.css +86 -0
- package/dist/components/blocks/feature-stack/FeatureStack.d.ts +19 -0
- package/dist/components/blocks/feature-stack/FeatureStack.js +27 -0
- package/dist/components/blocks/feature-stack/FeatureStack.types.d.ts +34 -0
- package/dist/components/blocks/feature-stack/FeatureStack.types.js +14 -0
- package/dist/components/blocks/feature-stack/feature-stack-impl.css +87 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +133 -0
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +32 -0
- package/dist/components/blocks/image-banner/ImageBanner.js +41 -0
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +54 -0
- package/dist/components/blocks/image-banner/ImageBanner.types.js +14 -0
- package/dist/components/blocks/image-banner/image-banner-impl.css +281 -0
- package/dist/components/blocks/landing-hero/LandingHero.css +1 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -0
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -0
- package/dist/components/blocks/page-header/PageHeader.css +1 -0
- package/dist/components/blocks/page-header/PageHeader.js +2 -2
- package/dist/components/blocks/page-header/PageHeader.types.d.ts +4 -2
- package/dist/components/blocks/page-header/PageHeader.types.js +1 -1
- package/dist/components/blocks/page-header/page-header-impl.css +5 -3
- package/dist/components/blocks/product-hero/ProductHero.css +8 -3
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
- package/dist/components/blocks/product-hero/ProductHero.js +5 -2
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +5 -1
- package/dist/components/blocks/product-hero/ProductHero.types.js +1 -0
- package/dist/components/blocks/product-hero/product-hero-impl.css +43 -12
- package/dist/components/blocks/resource-banner/ResourceBanner.css +106 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.d.ts +32 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.js +51 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.types.d.ts +44 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.types.js +14 -0
- package/dist/components/blocks/resource-banner/resource-banner-impl.css +69 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.css +93 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +36 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.js +54 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +32 -0
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +15 -0
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +275 -0
- package/dist/components/blocks/stats/Stats.css +139 -0
- package/dist/components/blocks/stats/Stats.d.ts +24 -0
- package/dist/components/blocks/stats/Stats.js +120 -0
- package/dist/components/blocks/stats/Stats.types.d.ts +36 -0
- package/dist/components/blocks/stats/Stats.types.js +19 -0
- package/dist/components/blocks/stats/stats-count.d.ts +34 -0
- package/dist/components/blocks/stats/stats-count.js +61 -0
- package/dist/components/blocks/stats/stats-impl.css +284 -0
- package/dist/components/blocks/stats/use-wheel.d.ts +37 -0
- package/dist/components/blocks/stats/use-wheel.js +126 -0
- package/dist/components/blocks/steps/Steps.css +202 -0
- package/dist/components/blocks/steps/Steps.d.ts +32 -0
- package/dist/components/blocks/steps/Steps.js +65 -0
- package/dist/components/blocks/steps/Steps.types.d.ts +48 -0
- package/dist/components/blocks/steps/Steps.types.js +21 -0
- package/dist/components/blocks/steps/steps-impl.css +216 -0
- package/dist/components/blocks/steps/use-turn.d.ts +33 -0
- package/dist/components/blocks/steps/use-turn.js +75 -0
- package/dist/components/blocks/sticky-cards/StickyCards.css +154 -0
- package/dist/components/blocks/sticky-cards/StickyCards.d.ts +35 -0
- package/dist/components/blocks/sticky-cards/StickyCards.js +153 -0
- package/dist/components/blocks/sticky-cards/StickyCards.types.d.ts +43 -0
- package/dist/components/blocks/sticky-cards/StickyCards.types.js +18 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +393 -0
- package/dist/components/blocks/team-grid/TeamGrid.css +159 -0
- package/dist/components/blocks/team-grid/TeamGrid.d.ts +28 -0
- package/dist/components/blocks/team-grid/TeamGrid.js +74 -0
- package/dist/components/blocks/team-grid/TeamGrid.types.d.ts +51 -0
- package/dist/components/blocks/team-grid/TeamGrid.types.js +20 -0
- package/dist/components/blocks/team-grid/team-grid-impl.css +129 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +4 -3
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +3 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.js +1 -1
- package/dist/components/blocks/testimonial-row/testimonial-row-impl.css +8 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.d.ts +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.js +2 -2
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +8 -0
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.js +1 -1
- package/dist/components/blocks/text-scroll/TextScroll.css +53 -0
- package/dist/components/blocks/text-scroll/TextScroll.d.ts +5 -0
- package/dist/components/blocks/text-scroll/TextScroll.js +71 -0
- package/dist/components/blocks/text-scroll/TextScroll.types.d.ts +22 -0
- package/dist/components/blocks/text-scroll/TextScroll.types.js +10 -0
- package/dist/components/blocks/text-scroll/text-scroll-impl.css +115 -0
- package/dist/components/blocks/tiers/Tiers.css +233 -0
- package/dist/components/blocks/tiers/Tiers.d.ts +32 -0
- package/dist/components/blocks/tiers/Tiers.js +68 -0
- package/dist/components/blocks/tiers/Tiers.types.d.ts +45 -0
- package/dist/components/blocks/tiers/Tiers.types.js +25 -0
- package/dist/components/blocks/tiers/tiers-impl.css +185 -0
- package/dist/components/blocks/use-rotation.d.ts +12 -2
- package/dist/components/blocks/use-rotation.js +6 -28
- package/dist/components/comparison-cards-data.d.ts +59 -0
- package/dist/components/comparison-cards-data.js +12 -0
- package/dist/components/comparison-table-data.d.ts +39 -0
- package/dist/components/comparison-table-data.js +11 -0
- package/dist/components/core/accordion-item/AccordionItem.css +1 -5
- package/dist/components/core/background/Background.css +23 -0
- package/dist/components/core/background/Background.d.ts +10 -4
- package/dist/components/core/background/Background.js +16 -7
- package/dist/components/core/background/Background.types.d.ts +11 -8
- package/dist/components/core/background/Background.types.js +3 -1
- package/dist/components/core/background/background-impl.css +334 -1
- package/dist/components/core/background/halftone.d.ts +11 -0
- package/dist/components/core/background/halftone.js +43 -3
- package/dist/components/core/background/patterns.d.ts +66 -0
- package/dist/components/core/background/patterns.js +244 -0
- package/dist/components/core/background/shader.d.ts +44 -0
- package/dist/components/core/background/shader.js +307 -0
- package/dist/components/core/background/use-shader.d.ts +11 -0
- package/dist/components/core/background/use-shader.js +25 -0
- package/dist/components/core/background/use-spotlight.d.ts +2 -1
- package/dist/components/core/background/use-spotlight.js +9 -1
- package/dist/components/core/bottom-sheet/BottomSheet.js +2 -2
- package/dist/components/core/bottom-sheet/BottomSheet.types.d.ts +3 -1
- package/dist/components/core/breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/components/core/breadcrumb/Breadcrumb.js +1 -0
- package/dist/components/core/breadcrumb/breadcrumb-impl.css +11 -0
- package/dist/components/core/button/button-impl.css +14 -1
- package/dist/components/core/illustration-card/IllustrationCard.js +1 -1
- package/dist/components/core/illustration-card/illustration-card-impl.css +20 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +4 -7
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +2 -3
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +7 -1
- package/dist/components/core/link/Link.js +7 -3
- package/dist/components/core/link/link-impl.css +29 -2
- package/dist/components/core/navbar/Navbar.css +2 -2
- package/dist/components/core/navbar/Navbar.types.d.ts +1 -1
- package/dist/components/core/navbar-item/NavbarItem.d.ts +2 -1
- package/dist/components/core/navbar-item/NavbarItem.js +3 -10
- package/dist/components/core/navbar-item/NavbarItem.types.d.ts +4 -1
- package/dist/components/core/navbar-item/NavbarItem.types.js +1 -1
- package/dist/components/core/navbar-item/navbar-item-impl.css +10 -0
- package/dist/components/core/navbar-menu/navbar-menu-impl.css +9 -0
- package/dist/components/core/navbar-switcher/navbar-switcher-impl.css +19 -0
- package/dist/components/core/pagination/Pagination.js +1 -1
- package/dist/components/core/pagination/pagination-impl.css +9 -0
- package/dist/components/core/pagination-dots/PaginationDots.d.ts +1 -1
- package/dist/components/core/pagination-dots/PaginationDots.js +3 -3
- package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +3 -1
- package/dist/components/core/segmented-control/SegmentedControl.css +4 -3
- package/dist/components/core/segmented-control/SegmentedControl.js +17 -3
- package/dist/components/core/segmented-control-item/SegmentedControlItem.css +2 -1
- package/dist/components/core/select/Select.js +3 -3
- package/dist/components/core/select/Select.types.d.ts +11 -1
- package/dist/components/core/select/Select.types.js +1 -1
- package/dist/components/core/tab-list/TabList.js +9 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.d.ts +1 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.js +5 -2
- package/dist/components/core/table-header-cell/TableHeaderCell.types.d.ts +7 -1
- package/dist/components/core/table-header-cell/TableHeaderCell.types.js +1 -1
- package/dist/components/core/text-area/TextArea.d.ts +1 -1
- package/dist/components/core/text-area/TextArea.js +2 -2
- package/dist/components/core/text-area/TextArea.types.d.ts +9 -1
- package/dist/components/core/text-area/TextArea.types.js +1 -1
- package/dist/components/core/text-input/TextInput.d.ts +1 -1
- package/dist/components/core/text-input/TextInput.js +2 -2
- package/dist/components/core/text-input/TextInput.types.d.ts +9 -1
- package/dist/components/core/text-input/TextInput.types.js +1 -1
- package/dist/components/data-table-data.d.ts +33 -0
- package/dist/components/data-table-data.js +12 -0
- package/dist/components/download-banner-data.d.ts +52 -0
- package/dist/components/download-banner-data.js +11 -0
- package/dist/components/index.d.ts +45 -0
- package/dist/components/index.js +32 -0
- package/dist/components/resource-banner-data.d.ts +34 -0
- package/dist/components/resource-banner-data.js +13 -0
- package/dist/components/scene-scroll-data.d.ts +24 -0
- package/dist/components/scene-scroll-data.js +9 -0
- package/dist/components/stats-data.d.ts +28 -0
- package/dist/components/stats-data.js +11 -0
- package/dist/components/steps-data.d.ts +38 -0
- package/dist/components/steps-data.js +13 -0
- package/dist/components/sticky-cards-data.d.ts +43 -0
- package/dist/components/sticky-cards-data.js +12 -0
- package/dist/components/team-grid-data.d.ts +38 -0
- package/dist/components/team-grid-data.js +11 -0
- package/dist/components/tiers-data.d.ts +47 -0
- package/dist/components/tiers-data.js +13 -0
- package/dist/marketing.css +77 -28
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
A pane of glass holding a piece of product information — a market's price, a balance, a status — in one of three shapes, used as a picture: laid over a photograph or a piece of art, or standing on its own as the image a section shows beside its words. It is never the section's content. What a section says is set in the section's own blocks and type; this is an illustration of the product, the way a screenshot would be one, only drawn from the system's own parts.
|
|
6
6
|
|
|
7
|
-
It owns the two things every such picture has to get right and nobody gets right twice: its shape and its surface. The shape is one of three — four by three, square, three by four — so pictures on one page and across a site agree, and none is a one-off. The surface is always glass over a blur of whatever is behind it
|
|
7
|
+
It owns the two things every such picture has to get right and nobody gets right twice: its shape and its surface. The shape is one of three — four by three, square, three by four — so pictures on one page and across a site agree, and none is a one-off. The surface is always dark glass over a blur of whatever is behind it, in light mode and dark alike — the product as it looks in its dark theme, which a picture of it should not change with the page — so the pane reads as part of the image it sits on rather than a box pasted onto it.
|
|
8
8
|
|
|
9
9
|
Everything inside is illustrative: built from the system's real components so it looks exactly like the product, and made inert, so nothing in it can be focused, pressed or typed into, and a screen reader hears one image described by `label`. The product information inside is the page's. A photograph or a person it sits on, or beside, is the page's or a block's to place; this is the pane alone.
|
|
10
10
|
|
|
@@ -29,7 +29,7 @@ Everything inside is illustrative: built from the system's real components so it
|
|
|
29
29
|
|
|
30
30
|
IllustrationCard renders 2 elements. A token binding names the part it applies to.
|
|
31
31
|
|
|
32
|
-
- `root` — `<div>`, class `dds-illustrationcard`. The pane: one of three proportions whatever is put in it — the aspect tokens — and the glass. Its fill is color.bg.surface-glass — white
|
|
32
|
+
- `root` — `<div>`, class `dds-illustrationcard`. The pane: one of three proportions whatever is put in it — the aspect tokens — and the glass. It is drawn in the dark theme whatever the page's, so the product it shows looks the same on every page. Its fill is color.bg.surface-glass — a faint frosted white — laid over the dark page's ground when it stands alone and over the photograph in a scene, over a blur of size.backdrop-blur in illustration-card-impl.css, because a blur is a function no binding can name. It holds radius.surface and space.inset.card like a Card, a hairline edge so its outline survives on a light page, and the default ink, color.fg.default — light on the frosted pane. It is one image to assistive technology — `role="img"`, named by `label` — so a screen reader hears what the picture shows in a sentence rather than a list of controls that are not there.
|
|
33
33
|
- `content` — `<div>`, class `dds-illustrationcard__content`. What the pane holds, made a picture. It is `inert`: whatever components draw it — a Button, a SegmentedControl, a TextInput — look exactly as they do anywhere, and none of them can be focused, tabbed to, pressed or typed into, so a reader never meets a control that does nothing. Laid out down the pane from the start edge at its own size, and scaled down as a whole where the pane is too small to hold it — the way a picture shrinks — so a pane on a phone shows the same UI smaller rather than overlapped or cut off. The shape is fixed: the UI never stretches the pane.
|
|
34
34
|
|
|
35
35
|
Apply these classes from the generated `illustrationCardParts` constant rather than writing the strings by hand.
|
|
@@ -17,7 +17,7 @@ The photograph is the scene and the card is what it says. The card's `label` des
|
|
|
17
17
|
- There is only a photograph → `AspectRatio`
|
|
18
18
|
- A section's content. Like the card it holds, the scene is a picture of the product, and what a section says belongs in its own blocks
|
|
19
19
|
- More than one card over one photograph. A second card is a second picture competing for the same eye; two scenes side by side say two things clearly
|
|
20
|
-
- A photograph whose subject sits where the card goes. The card covers the middle of the frame, or
|
|
20
|
+
- A photograph whose subject sits where the card goes. The card covers the middle of the frame, or its foot with `placement`; choose or crop the photograph so the person or the object stays clear of it
|
|
21
21
|
|
|
22
22
|
## Anatomy
|
|
23
23
|
|
|
@@ -45,11 +45,10 @@ Apply these classes from the generated `illustrationSceneParts` constant rather
|
|
|
45
45
|
Use when: The scene's shape. One of three, the same three IllustrationCard takes, so scenes and cards across a site agree
|
|
46
46
|
Never for: Fitting a particular photograph. The shape is a decision about the layout; the photograph is chosen or cropped for it
|
|
47
47
|
|
|
48
|
-
### placement — `center` | `
|
|
48
|
+
### placement — `center` | `bottom` (default `center`)
|
|
49
49
|
|
|
50
50
|
- `center` — The default: the card in the middle of the frame. For a photograph whose subject frames the middle — a person looking down at what the card shows
|
|
51
|
-
- `
|
|
52
|
-
- `end` — The card towards the end edge, for a photograph whose subject is at the start
|
|
51
|
+
- `bottom` — The card centred along the foot of the frame, held off it by the card's own inset — for a photograph whose subject fills the top: a face, a person reaching up, a skyline
|
|
53
52
|
|
|
54
53
|
Use when: Where the card sits over the photograph, so the subject of the photograph stays clear of it
|
|
55
54
|
Never for: Anything but keeping the photograph's subject clear. The card's size is fixed by the shape; placement moves it and nothing else
|
|
@@ -217,7 +216,7 @@ import { IllustrationScene } from '@deriv-com/dds-marketing'
|
|
|
217
216
|
|
|
218
217
|
### Where the card sits
|
|
219
218
|
|
|
220
|
-
Centred, or
|
|
219
|
+
Centred, or along the foot of the frame, so the photograph's subject stays clear of the card.
|
|
221
220
|
|
|
222
221
|
```tsx
|
|
223
222
|
import { IllustrationScene } from '@deriv-com/dds-marketing'
|
|
@@ -225,9 +224,6 @@ import { IllustrationScene } from '@deriv-com/dds-marketing'
|
|
|
225
224
|
// center — the default
|
|
226
225
|
<IllustrationScene ratio="square" src="/sample-card-image.svg">{illustrationcards}</IllustrationScene>
|
|
227
226
|
|
|
228
|
-
//
|
|
229
|
-
<IllustrationScene ratio="square" src="/sample-card-image.svg" placement="
|
|
230
|
-
|
|
231
|
-
// end
|
|
232
|
-
<IllustrationScene ratio="square" src="/sample-card-image.svg" placement="end">{illustrationcards}</IllustrationScene>
|
|
227
|
+
// bottom
|
|
228
|
+
<IllustrationScene ratio="square" src="/sample-card-image.svg" placement="bottom">{illustrationcards}</IllustrationScene>
|
|
233
229
|
```
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
<!-- GENERATED from image-banner.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# ImageBanner
|
|
4
|
+
|
|
5
|
+
A dark card in the middle of a page, pairing a headline and a line under it with a photograph — beside it or behind it, with one action.
|
|
6
|
+
|
|
7
|
+
The reference site's ImageBanner, and a break rather than an opening: a dark, editorial moment between lighter sections that asks for one thing. The card is dark on every ground; `ground` paints the band it sits in, the way it does for every block.
|
|
8
|
+
|
|
9
|
+
## Use when
|
|
10
|
+
|
|
11
|
+
- Driving a single mid-page or end-of-page action with a photograph to carry it — a community, a hub, a platform
|
|
12
|
+
- A dark, editorial break between lighter sections
|
|
13
|
+
|
|
14
|
+
## Do not use
|
|
15
|
+
|
|
16
|
+
- The section opens the page → `ProductHero`
|
|
17
|
+
- The point wants the page's own light ground rather than a dark card → `FeatureSplit`
|
|
18
|
+
- There is no photograph, only a headline and an action → `CtaBanner`
|
|
19
|
+
- The section says what a programme or a product comes with, as a list of features → `FeatureBullets`
|
|
20
|
+
- The page's opening band. A dark card at the top of a page competes with the navigation above it and the hero it should be
|
|
21
|
+
- More than one action. The card asks for one thing, and a second button beside it is a second demand on a card already set apart from the page
|
|
22
|
+
- A picture carrying words a reader needs. The cover photograph sits under a scrim and the text, and the split's is cropped to fill its half
|
|
23
|
+
|
|
24
|
+
## Anatomy
|
|
25
|
+
|
|
26
|
+
ImageBanner renders 8 elements. A token binding names the part it applies to.
|
|
27
|
+
|
|
28
|
+
- `root` — `<section>`, class `dds-imagebanner`. The section. It paints one of the page's three grounds and the ink that goes with it — see `ground` — and asks its own width, so the card folds on the section's measure rather than the window's. A region named by its headline.
|
|
29
|
+
- `inner` — `<div>`, class `dds-imagebanner__inner`. The measure and the gutter, the same column every band holds its content in. On a phone the card gives up the gutter and runs the width of the screen, as the reference design's does.
|
|
30
|
+
- `card` — `<div>`, class `dds-imagebanner__card`. The dark card holding everything: color.bg.brand-strong, or color.bg.surface-card-strong on the dark band so it is still a card there, with white ink on both. It clips the photograph to its rounded corners. From 48rem the words and the photograph sit side by side, in the order `mediaPosition` names; below it they stack.
|
|
31
|
+
- `content` — `<div>`, class `dds-imagebanner__content`. The headline, the line under it and the action, inset from the card's edge. It sets no gap of its own: the step from a title to its description and the step from a description to what follows are two roles, carried by each part's own margin.
|
|
32
|
+
- `title` — `<h2>`, class `dds-imagebanner__title`. The headline. `h2` by default because the card sits under the page's own heading; `headingLevel` moves the level and never the size. Drawn at font.h2.
|
|
33
|
+
- `description` — `<p>`, class `dds-imagebanner__description`. The line under the headline, at the body step and the description measure. Rendered only when `description` is set.
|
|
34
|
+
- `action` — `<div>`, class `dds-imagebanner__action`. The one action, under the line. On a phone it fills the width of the card; from 48rem it is its own size. Rendered only when `action` is set.
|
|
35
|
+
- `media` — `<div>`, class `dds-imagebanner__media`. The photograph. Split: one half of the card, edge to edge and cropped to fill it — landscape on a phone, the card's full height from 48rem. Cover: the whole card behind the words, under a scrim of color.bg.overlay fading through color.bg.overlay-subtle to clear, toward the side `mediaPosition` names.
|
|
36
|
+
|
|
37
|
+
Apply these classes from the generated `imageBannerParts` constant rather than writing the strings by hand.
|
|
38
|
+
|
|
39
|
+
## Composition
|
|
40
|
+
|
|
41
|
+
- Takes no children. Everything it renders comes from props
|
|
42
|
+
- Never contains: `ImageBanner`, `CtaBanner`, `CtaBannerSlider`, `FeatureSplit`, `FeatureBullets`, `LandingHero`, `ProductHero`, `PageHeader`, `Footer`, `Navbar` — in children or in any prop that takes a node
|
|
43
|
+
|
|
44
|
+
## Props
|
|
45
|
+
|
|
46
|
+
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
47
|
+
|
|
48
|
+
- `page` — The default, and the page's own white, with the dark card set into it. Most of the time: the card is already the break
|
|
49
|
+
- `subtle` — The grey band, for a card that follows a white section the page wants told apart from this one. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section
|
|
50
|
+
- `strong` — `color.bg.brand-strong`, the dark band, with the card a step lighter at color.bg.surface-card-strong so it still reads as a card. For a page whose dark band is already here and wants the card inside it
|
|
51
|
+
|
|
52
|
+
Use when: Which of the page's three grounds the band around the card paints. The card is dark whatever this says — that is what the block is — so this is about the rhythm of the page, white, grey or dark, and never about the card. The ink follows the ground and is not a second decision.
|
|
53
|
+
Never for: Making the card darker. The card is dark on every ground; painting the band dark too spends the page's one dark band on a section that was already one.
|
|
54
|
+
|
|
55
|
+
### variant — `split` | `cover` (default `split`)
|
|
56
|
+
|
|
57
|
+
- `split` — The default. The words in one half and the photograph filling the other, edge to edge, with one action under the words. On a phone the card runs the width of the screen and the photograph stacks with the words
|
|
58
|
+
- `cover` — The photograph fills the whole card, with the words over it behind a scrim that darkens the side they are on and leaves the photograph clear on the other. For a photograph wide enough to be the band rather than half of it
|
|
59
|
+
|
|
60
|
+
Use when: What the photograph does: beside the words, or behind them. Both carry one action — two of the reference design's layouts.
|
|
61
|
+
Never for: Choosing by how busy the page looks. Cover hides part of the photograph under the scrim; it is a decision about the photograph, not decoration.
|
|
62
|
+
|
|
63
|
+
### mediaPosition — `end` | `start` (default `end`)
|
|
64
|
+
|
|
65
|
+
- `end` — The default. The words lead and the photograph follows, which is the order the card argues in
|
|
66
|
+
- `start` — The photograph leads — the second of two cards on a page, or a photograph whose subject faces the words. A split card puts it above the words on a phone as well, as the reference design does
|
|
67
|
+
|
|
68
|
+
Use when: Which side the photograph takes, and in cover, which side it shows clear on with the words on the other. Alternating it with the section above is the page's decision, not this one's.
|
|
69
|
+
Never for: Aligning the words to the far edge. They start where their column starts on either side, because a heading beside content starts with it.
|
|
70
|
+
|
|
71
|
+
### title — `string` **Required.**
|
|
72
|
+
|
|
73
|
+
Use when: Always. The one thing the card says, in under eight words — "Join our global community".
|
|
74
|
+
Never for: A sentence. The description under it carries the argument
|
|
75
|
+
|
|
76
|
+
### headingLevel — `h2` | `h3` (default `h2`)
|
|
77
|
+
|
|
78
|
+
- `h2` — The default: the card is a section of the page, under the page's own h1
|
|
79
|
+
- `h3` — The card sits inside a section that already carries the h2 it belongs to
|
|
80
|
+
|
|
81
|
+
Use when: Matching the outline of the page around the card, so the headline keeps its place in the hierarchy rather than skipping a level — CtaBanner's and ResourceBanner's prop. The level only: the size stays font.h2.
|
|
82
|
+
Never for: Making the headline bigger or smaller. The card decides the size; this decides only where the headline sits in the page's outline.
|
|
83
|
+
|
|
84
|
+
### description — `string`
|
|
85
|
+
|
|
86
|
+
Use when: The line under the headline saying what it means for the reader, in one or two sentences.
|
|
87
|
+
Never for: A paragraph. Past about two hundred characters the words run longer than the photograph beside them, which is the reference design's limit as well
|
|
88
|
+
|
|
89
|
+
### action — `node`
|
|
90
|
+
|
|
91
|
+
Accepts: Button, Link
|
|
92
|
+
Use when: The one thing the card asks for. The card is dark in both themes, so a Button here takes tone="inverse": the primary is the coral fill and it is the card's one primary. On a phone it fills the width of the card.
|
|
93
|
+
Never for: A second action. The card asks for one thing.
|
|
94
|
+
|
|
95
|
+
### media — `node` **Required.**
|
|
96
|
+
|
|
97
|
+
Accepts: *
|
|
98
|
+
Use when: Always. The page's photograph, through AspectRatio or as an image — people or product. Split and cover crop it to fill the space they give it. Alt text is the page's to give, empty where the photograph is decoration.
|
|
99
|
+
Never for: Artwork with words in it. The cover photograph sits under a scrim and the text, and the split crops to fill
|
|
100
|
+
|
|
101
|
+
### parallax — `boolean` (default `false`)
|
|
102
|
+
|
|
103
|
+
Use when: The photograph drifts against the scroll as the card passes through the view, by motion.distance.drift over the whole pass, so it reads as further away than the card — the reference design's ParallaxBanner, which this replaces. For a careers or about page, where the photograph of the people is the point. Off by default: a card selling one action does not need its picture moving under the button.
|
|
104
|
+
Never for: Holding still for a reader who asked for less motion — it already holds still for them, and in a browser that cannot drive it from the scroll.
|
|
105
|
+
|
|
106
|
+
## Accessibility
|
|
107
|
+
|
|
108
|
+
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.
|
|
109
|
+
|
|
110
|
+
- Announced as: `region`
|
|
111
|
+
- `Tab` — Moves to the action, where there is one, and past the section otherwise.
|
|
112
|
+
- accessible name from title, so the card is a named region a screen reader can jump to and skip
|
|
113
|
+
- The words over a cover photograph keep AA contrast against the scrim, which is why the scrim darkens the side the words are on rather than the whole photograph evenly. A photograph too light for that is a split card
|
|
114
|
+
|
|
115
|
+
## Rules
|
|
116
|
+
|
|
117
|
+
- **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.
|
|
118
|
+
|
|
119
|
+
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.
|
|
120
|
+
|
|
121
|
+
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.
|
|
122
|
+
|
|
123
|
+
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.
|
|
124
|
+
|
|
125
|
+
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.
|
|
126
|
+
|
|
127
|
+
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.
|
|
128
|
+
Guidance only — cannot be checked automatically.
|
|
129
|
+
- **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.
|
|
130
|
+
Guidance only — cannot be checked automatically.
|
|
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.
|
|
132
|
+
|
|
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.
|
|
134
|
+
|
|
135
|
+
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.
|
|
136
|
+
Guidance only — cannot be checked automatically.
|
|
137
|
+
- **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.
|
|
138
|
+
|
|
139
|
+
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.
|
|
140
|
+
|
|
141
|
+
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.
|
|
142
|
+
|
|
143
|
+
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.
|
|
144
|
+
|
|
145
|
+
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.
|
|
146
|
+
|
|
147
|
+
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.
|
|
148
|
+
|
|
149
|
+
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.
|
|
150
|
+
|
|
151
|
+
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.
|
|
152
|
+
|
|
153
|
+
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.
|
|
154
|
+
Guidance only — cannot be checked automatically.
|
|
155
|
+
- **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.
|
|
156
|
+
|
|
157
|
+
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.
|
|
158
|
+
|
|
159
|
+
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.
|
|
160
|
+
|
|
161
|
+
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.
|
|
162
|
+
|
|
163
|
+
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.
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
|
|
167
|
+
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.
|
|
168
|
+
|
|
169
|
+
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.
|
|
170
|
+
|
|
171
|
+
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.
|
|
172
|
+
Guidance only — cannot be checked automatically.
|
|
173
|
+
- **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.
|
|
174
|
+
|
|
175
|
+
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.
|
|
176
|
+
|
|
177
|
+
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.
|
|
178
|
+
|
|
179
|
+
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.
|
|
180
|
+
Guidance only — cannot be checked automatically.
|
|
181
|
+
- **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.
|
|
182
|
+
|
|
183
|
+
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.
|
|
184
|
+
|
|
185
|
+
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.
|
|
186
|
+
|
|
187
|
+
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.
|
|
188
|
+
Guidance only — cannot be checked automatically.
|
|
189
|
+
|
|
190
|
+
## Anti-examples
|
|
191
|
+
|
|
192
|
+
❌ ImageBanner for: The section opens the page
|
|
193
|
+
An opening band is a claim sized to be the first thing read; this is a card set into the page below it
|
|
194
|
+
→ use `ProductHero` instead.
|
|
195
|
+
|
|
196
|
+
❌ ImageBanner for: The point wants the page's own light ground rather than a dark card
|
|
197
|
+
The same claim beside a picture, without the card around it
|
|
198
|
+
→ use `FeatureSplit` instead.
|
|
199
|
+
|
|
200
|
+
❌ ImageBanner for: There is no photograph, only a headline and an action
|
|
201
|
+
A banner of words and a button is the coral band; this one is half picture and has nothing to show without one
|
|
202
|
+
→ use `CtaBanner` instead.
|
|
203
|
+
|
|
204
|
+
❌ ImageBanner for: The section says what a programme or a product comes with, as a list of features
|
|
205
|
+
A list of features is the content there, ruled lines a reader goes down; this card is a photograph and one action
|
|
206
|
+
→ use `FeatureBullets` instead.
|
|
207
|
+
|
|
208
|
+
## Example
|
|
209
|
+
|
|
210
|
+
```tsx
|
|
211
|
+
import { ImageBanner, Button, AspectRatio } from '@deriv-com/dds-marketing'
|
|
212
|
+
|
|
213
|
+
<ImageBanner title="Join our global community" description="Connect with traders around the world to exchange insights, explore portfolios and learn from people who trade the same markets you do." action={<Button variant="primary" tone="inverse" href="/community">Join the community</Button>} media={<AspectRatio ratio="landscape" />} />
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## In use
|
|
217
|
+
|
|
218
|
+
### Two layouts
|
|
219
|
+
|
|
220
|
+
The photograph beside the words, or behind them under a scrim. Each carries one action.
|
|
221
|
+
|
|
222
|
+
```tsx
|
|
223
|
+
import { AspectRatio, Button, ImageBanner } from '@deriv-com/dds-marketing'
|
|
224
|
+
|
|
225
|
+
// Split — photograph beside, one action
|
|
226
|
+
<ImageBanner title="Join our global community" description="Connect with traders around the world to exchange insights, explore portfolios and learn from people who trade the same markets you do." action={<Button variant="primary" tone="inverse" href="/community">Join the community</Button>} media={<AspectRatio ratio="landscape" />} />
|
|
227
|
+
|
|
228
|
+
// Cover — photograph behind, under a scrim
|
|
229
|
+
<ImageBanner variant="cover" title="Trade on Deriv MT5" description="Forex, stocks, commodities and derived indices on the platform professionals use, with charting and order types built in." action={<Button variant="primary" tone="inverse" href="/platforms/deriv-mt5">Open a Deriv MT5 account</Button>} media={<AspectRatio ratio="landscape" />} />
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Which side the photograph takes
|
|
233
|
+
|
|
234
|
+
Start puts the photograph first. On a phone a split card puts it above the words too; a cover card shows it clear on that side.
|
|
235
|
+
|
|
236
|
+
```tsx
|
|
237
|
+
import { AspectRatio, Button, ImageBanner } from '@deriv-com/dds-marketing'
|
|
238
|
+
|
|
239
|
+
// Photograph last — the default
|
|
240
|
+
<ImageBanner title="Join our global community" description="Connect with traders around the world to exchange insights, explore portfolios and learn from people who trade the same markets you do." action={<Button variant="primary" tone="inverse" href="/community">Join the community</Button>} media={<AspectRatio ratio="landscape" />} mediaPosition="end" />
|
|
241
|
+
|
|
242
|
+
// Photograph first
|
|
243
|
+
<ImageBanner title="Join our global community" description="Connect with traders around the world to exchange insights, explore portfolios and learn from people who trade the same markets you do." action={<Button variant="primary" tone="inverse" href="/community">Join the community</Button>} media={<AspectRatio ratio="landscape" />} mediaPosition="start" />
|
|
244
|
+
|
|
245
|
+
// Cover, clear at the start
|
|
246
|
+
<ImageBanner variant="cover" title="Trade on Deriv MT5" description="Forex, stocks, commodities and derived indices on the platform professionals use, with charting and order types built in." action={<Button variant="primary" tone="inverse" href="/platforms/deriv-mt5">Open a Deriv MT5 account</Button>} media={<AspectRatio ratio="landscape" />} mediaPosition="start" />
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### The ground around it
|
|
250
|
+
|
|
251
|
+
The card is dark on every ground; ground paints the band it sits in. On the dark band the card steps up to the strong card fill so it still reads as a card.
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
import { AspectRatio, Button, ImageBanner } from '@deriv-com/dds-marketing'
|
|
255
|
+
|
|
256
|
+
// On the page itself
|
|
257
|
+
<ImageBanner title="Join our global community" description="Connect with traders around the world to exchange insights, explore portfolios and learn from people who trade the same markets you do." action={<Button variant="primary" tone="inverse" href="/community">Join the community</Button>} media={<AspectRatio ratio="landscape" />} ground="page" />
|
|
258
|
+
|
|
259
|
+
// On the grey band
|
|
260
|
+
<ImageBanner title="Join our global community" description="Connect with traders around the world to exchange insights, explore portfolios and learn from people who trade the same markets you do." action={<Button variant="primary" tone="inverse" href="/community">Join the community</Button>} media={<AspectRatio ratio="landscape" />} ground="subtle" />
|
|
261
|
+
|
|
262
|
+
// On the dark band
|
|
263
|
+
<ImageBanner title="Join our global community" description="Connect with traders around the world to exchange insights, explore portfolios and learn from people who trade the same markets you do." action={<Button variant="primary" tone="inverse" href="/community">Join the community</Button>} media={<AspectRatio ratio="landscape" />} ground="strong" />
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### A photograph that drifts
|
|
267
|
+
|
|
268
|
+
parallax: the photograph falls behind the card as the page scrolls past — the reference's ParallaxBanner. Split or cover, for a careers or about page.
|
|
269
|
+
|
|
270
|
+
```tsx
|
|
271
|
+
import { AspectRatio, ImageBanner, Link } from '@deriv-com/dds-marketing'
|
|
272
|
+
|
|
273
|
+
// Split, drifting — Life at Deriv
|
|
274
|
+
<ImageBanner variant="split" parallax title="Life at Deriv" description="We combine human values with AI precision. Collaboration, integrity and continuous learning guide every project, in every office and every time zone." action={<Link href="/careers/culture" tone="inherit">Culture at Deriv</Link>} media={<AspectRatio ratio="landscape" />} />
|
|
275
|
+
|
|
276
|
+
// Inside a section that has its h2 — headingLevel h3
|
|
277
|
+
<ImageBanner variant="split" parallax title="Life at Deriv" description="We combine human values with AI precision. Collaboration, integrity and continuous learning guide every project, in every office and every time zone." action={<Link href="/careers/culture" tone="inherit">Culture at Deriv</Link>} media={<AspectRatio ratio="landscape" />} headingLevel="h3" />
|
|
278
|
+
```
|
|
@@ -180,7 +180,7 @@ Apply these classes from the generated `navbarParts` constant rather than writin
|
|
|
180
180
|
### tone — `default` | `inverse` (default `default`)
|
|
181
181
|
|
|
182
182
|
- `default` — The page begins on a light ground, which is most marketing pages. The bar paints in ink and the pill is paper
|
|
183
|
-
- `inverse` — The first section of the page paints its own dark ground and the bar stands on it — a dark hero, a photograph, a brand-coloured takeover. The bar's ink runs light, and the pill and the collapsed bar take
|
|
183
|
+
- `inverse` — The first section of the page paints its own dark ground and the bar stands on it — a dark hero, a photograph, a brand-coloured takeover. The bar's ink runs light, and the pill and the collapsed bar take a frosted white glass — a faint white base, a white tint over it and a blur — so the dark ground or the photograph shows through it, lightened, rather than a black slab standing on it. Choose a photograph dark where the bar sits: the glass lightens what is behind it and does not darken it
|
|
184
184
|
|
|
185
185
|
### label — `string` **Required.**
|
|
186
186
|
|
|
@@ -86,6 +86,10 @@ Never for: Decoration on every item. A glyph beside each of five destinations co
|
|
|
86
86
|
Use when: The destination leaves the site. It draws the mark, opens in a new context, and the implementation extends the accessible name to say so in words — a glyph alone is a warning only sighted readers get
|
|
87
87
|
Never for: A different area of the same site. A subdomain the reader experiences as one place is not a change of context, and marking it as one teaches them to ignore the mark where it matters
|
|
88
88
|
|
|
89
|
+
### externalLabel — `string` (default `(opens in a new tab)`)
|
|
90
|
+
|
|
91
|
+
Use when: What a screen reader hears after an external destination's name, since the arrow that shows it to everyone else is hidden. Translate it with the page.
|
|
92
|
+
|
|
89
93
|
Also accepts everything from `AnchorHTMLAttributes<HTMLAnchorElement>`.
|
|
90
94
|
|
|
91
95
|
## Accessibility
|
|
@@ -78,11 +78,12 @@ Accepts: Button, Link
|
|
|
78
78
|
Use when: The one or two things the page wants a reader to do. Composed by the page rather than described to this component, so a call to action is the same Button here as anywhere else on the site
|
|
79
79
|
Never for: A row of destinations. Three or more controls under a title is a menu, and a reader who has to choose between five things chooses none
|
|
80
80
|
|
|
81
|
-
### background — `halftone`
|
|
81
|
+
### background — `grid` | `halftone` (default `grid`)
|
|
82
82
|
|
|
83
|
-
- `
|
|
83
|
+
- `grid` — The default: the band's rule grid, lit — hairlines a pitch apart rising from a soft bloom at the band's foot, a brighter point where two lines cross and a short dash of light running along every few, brightening around the pointer. Drawn by Background as a layer under the content; before its shader has drawn, and where it cannot, the same rules painted by the stylesheet, so the band is never bare.
|
|
84
|
+
- `halftone` — A halftone drawn behind the band's content: coral dots blending to white at the glow's heart, on the band's own dark ground, following the pointer over the band. Drawn by Background, placed as a layer under the content, so the band's own layout is untouched. It replaces the grid rather than joining it: two patterns on one band are texture fighting texture.
|
|
84
85
|
|
|
85
|
-
Use when: The band is the page's one standout moment and wants more than a flat fill. Leave it out and the band
|
|
86
|
+
Use when: The band is the page's one standout moment and wants more than a flat fill. Leave it out and the band draws the lit grid
|
|
86
87
|
Never for: More than one band on a page. The pattern is what makes a band the one a reader remembers, and two of them make neither
|
|
87
88
|
|
|
88
89
|
## Accessibility
|
|
@@ -65,7 +65,12 @@ Use when: The name the row is announced by, as a group. Name what the positions
|
|
|
65
65
|
|
|
66
66
|
### itemLabel — `string` (default `Slide`)
|
|
67
67
|
|
|
68
|
-
Use when: The word each mark is named by, before its number — 'Slide 2'. Translate it with the page; a language that puts the number first
|
|
68
|
+
Use when: The word each mark is named by, before its number — 'Slide 2'. Translate it with the page; a language that puts the number first, or writes it in its own digits, passes positionLabel instead.
|
|
69
|
+
|
|
70
|
+
### positionLabel — `callback`
|
|
71
|
+
|
|
72
|
+
Use when: Each mark's accessible name as a sentence, given its position counting from one and how many there are — for a language whose order is not the word then the number, or whose digits are not these. Wins over itemLabel where both are given.
|
|
73
|
+
Never for: Visible text. It names the marks to assistive technology and is never drawn.
|
|
69
74
|
|
|
70
75
|
## Accessibility
|
|
71
76
|
|
|
@@ -25,7 +25,7 @@ The claim is centred and the product sits under it rather than beside it, whole
|
|
|
25
25
|
|
|
26
26
|
## Anatomy
|
|
27
27
|
|
|
28
|
-
ProductHero renders
|
|
28
|
+
ProductHero renders 10 elements. A token binding names the part it applies to.
|
|
29
29
|
|
|
30
30
|
- `root` — `<section>`, class `dds-producthero`. The band. It paints the ground, carries the background image where there is one, and clips everything to its own edge so a visual that overruns cannot widen the page. `container-type` is what its own rules ask their width against, so a band placed in a narrow region of a wide page folds on its own measure rather than the window's.
|
|
31
31
|
- `inner` — `<div>`, class `dds-producthero__inner`. The measure, and the gutter. It caps the content at the page's own maximum and holds the page inset, which is what keeps a band's text in the same column as the section under it. Positioned so it sits above the photograph without either of them naming a stacking order.
|
|
@@ -37,11 +37,10 @@ ProductHero renders 9 elements. A token binding names the part it applies to.
|
|
|
37
37
|
- `title` — `<h1>`, class `dds-producthero__title`. The page's leading heading, and the band's accessible name. It renders as `h2` when `headingLevel` says so and is set identically either way. `text-wrap: balance` because a two-line title broken one-word-short reads as a mistake at this size, where at body size nobody would notice.
|
|
38
38
|
- `description` — `<p>`, class `dds-producthero__description`. The sentence under the title. Held to a readable measure rather than the band's — a line of sixteen-pixel text run across twelve hundred pixels is a line a reader loses their place in, and the measure role exists so no page has to guess where to stop it. Rendered only when `description` is set.
|
|
39
39
|
- `actions` — `<div>`, class `dds-producthero__actions`. What a reader can do. It wraps rather than scrolls, because two full-width buttons on a phone are two rows and a row that scrolled sideways would hide the second one. Rendered only when `actions` is set.
|
|
40
|
-
- `media` — `<div>`, class `dds-producthero__media`. The product itself, under the claim
|
|
40
|
+
- `media` — `<div>`, class `dds-producthero__media`. The product itself, under the claim, standing on the band's foot. It takes the picture's own shape: given `image`, the frame wraps the picture at its proportions — as wide as that shape allows up to the column, centred — and the screen decides only how tall it may grow, aspect.portrait of the column on a phone and half the band from the fold. A picture past that is drawn smaller, never cropped. Given `media`, an AspectRatio box, the page has fixed the shape on purpose and the box takes the column's width at it.
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
A square because what goes here is the product itself rather than a scene around it — a shape with no long side does not ask to be composed into, so a screenshot, a device and a person all sit in it the same way, and a page of these bands keeps one silhouette. Square corners because it is not a card: a rounded edge says the picture is an object placed on the band, and this one is meant to read as the thing the page is about, seen inside it. And on the foot because a picture with air under it floats — cropped by the band's own edge it is standing in the band, which is the arrangement LandingHero's subject takes for the same reason. Rendered only when `media` is set.
|
|
42
|
+
Its top corners are rounded at radius.container, as FeatureStack's are, and clip what it holds; its bottom corners stay square, where the picture meets the band's edge. On the foot because a picture with air under it floats — cut by the band's own edge it is standing in the band. Rendered when any of `image`, `media` is set, and not otherwise.
|
|
43
|
+
- `image` — `<img>`, class `dds-producthero__image`. The picture, drawn from `image` at its own proportions, as wide as its shape allows up to the frame and no taller than the screen's limit. Rendered only when `image` is set.
|
|
45
44
|
|
|
46
45
|
Apply these classes from the generated `productHeroParts` constant rather than writing the strings by hand.
|
|
47
46
|
|
|
@@ -83,10 +82,15 @@ Accepts: Button, Link
|
|
|
83
82
|
Use when: The one or two things the page wants a reader to do. Composed by the page rather than described to this component, so a call to action is the same Button here as anywhere else on the site
|
|
84
83
|
Never for: A row of destinations. Three or more controls under a title is a menu, and a reader who has to choose between five things chooses none
|
|
85
84
|
|
|
85
|
+
### image — `data` `BlockImage`
|
|
86
|
+
|
|
87
|
+
Use when: The product itself, under the claim and the actions, drawn at the picture's own proportions — a square screenshot stays square, a tall phone stays tall — and only held to the screen's limit: no taller than aspect.portrait of the column on a phone, no taller than half the band from the fold. Never cropped. Give its width and height so the band reserves its shape before it loads. `alt` empty when the claim already names what it shows.
|
|
88
|
+
Never for: The background — that is `backgroundImage`. And beside `media`: one product, one picture. Given both, `image` is drawn and `media` ignored.
|
|
89
|
+
|
|
86
90
|
### media — `node`
|
|
87
91
|
|
|
88
92
|
Accepts: AspectRatio
|
|
89
|
-
Use when:
|
|
93
|
+
Use when: A product picture in a shape the page fixes on purpose — an AspectRatio box, which keeps its ratio across the column. Prefer `image`, which keeps the picture's own shape and adapts to it.
|
|
90
94
|
Never for: The background. A photograph filling the band is `backgroundImage`; this sits in front of it, in the column, and is never cropped
|
|
91
95
|
|
|
92
96
|
### backgroundImage — `string`
|
|
@@ -195,25 +199,45 @@ Two things genuinely have no logical form and are not covered by this. A CSS gra
|
|
|
195
199
|
## Example
|
|
196
200
|
|
|
197
201
|
```tsx
|
|
198
|
-
import { ProductHero, Button
|
|
202
|
+
import { ProductHero, Button } from '@deriv-com/dds-marketing'
|
|
199
203
|
|
|
200
|
-
<ProductHero backgroundImage="/sample-band-ground.svg" eyebrow="Forex" title="Trade global currencies" description="Speculate on over 50 major, minor and exotic currency pairs, with competitive spreads and 0% commission." actions={<Button variant="primary">Try free demo</Button>}
|
|
204
|
+
<ProductHero backgroundImage="/sample-band-ground.svg" eyebrow="Forex" title="Trade global currencies" description="Speculate on over 50 major, minor and exotic currency pairs, with competitive spreads and 0% commission." actions={<Button variant="primary">Try free demo</Button>} image={{"src":"/sample-card-image.svg","alt":"","width":800,"height":600}} />
|
|
201
205
|
```
|
|
202
206
|
|
|
203
207
|
## In use
|
|
204
208
|
|
|
209
|
+
### The picture keeps its shape
|
|
210
|
+
|
|
211
|
+
`image` shows the picture at its own proportions and only limits its height — portrait of the column on a phone, half the band from the fold.
|
|
212
|
+
|
|
213
|
+
```tsx
|
|
214
|
+
import { AspectRatio, Button, ProductHero } from '@deriv-com/dds-marketing'
|
|
215
|
+
|
|
216
|
+
// A landscape picture
|
|
217
|
+
<ProductHero backgroundImage="/sample-band-ground.svg" eyebrow="Eyebrow" title="The product this page is about" description="The sentence under the title that says what the claim above it means." actions={<Button variant="primary">Primary action</Button>} image={{"src":"/sample-card-image.svg","alt":"","width":800,"height":600}} />
|
|
218
|
+
|
|
219
|
+
// A square picture
|
|
220
|
+
<ProductHero backgroundImage="/sample-band-ground.svg" eyebrow="Eyebrow" title="The product this page is about" description="The sentence under the title that says what the claim above it means." actions={<Button variant="primary">Primary action</Button>} image={{"src":"/sample-aspect-art.svg","alt":"","width":1200,"height":1200}} />
|
|
221
|
+
|
|
222
|
+
// A tall picture, held to the limit
|
|
223
|
+
<ProductHero backgroundImage="/sample-band-ground.svg" eyebrow="Eyebrow" title="The product this page is about" description="The sentence under the title that says what the claim above it means." actions={<Button variant="primary">Primary action</Button>} image={{"src":"/sample-tall-image.svg","alt":"","width":600,"height":900}} />
|
|
224
|
+
|
|
225
|
+
// A shape fixed on purpose — media, AspectRatio
|
|
226
|
+
<ProductHero backgroundImage="/sample-band-ground.svg" eyebrow="Eyebrow" title="The product this page is about" description="The sentence under the title that says what the claim above it means." actions={<Button variant="primary">Primary action</Button>} media={<AspectRatio ratio="square" />} />
|
|
227
|
+
```
|
|
228
|
+
|
|
205
229
|
### The band as a page has it
|
|
206
230
|
|
|
207
231
|
The photograph, the claim centred over it, and the product under the actions — in the column, capped to the measure, and whole.
|
|
208
232
|
|
|
209
233
|
```tsx
|
|
210
|
-
import {
|
|
234
|
+
import { Button, ProductHero } from '@deriv-com/dds-marketing'
|
|
211
235
|
|
|
212
236
|
// The photograph, the claim, and the visual beside it
|
|
213
|
-
<ProductHero backgroundImage="/sample-band-ground.svg" eyebrow="Forex" title="Trade global currencies" description="Speculate on over 50 major, minor and exotic currency pairs, with competitive spreads and 0% commission." actions={<Button variant="primary">Try free demo</Button>}
|
|
237
|
+
<ProductHero backgroundImage="/sample-band-ground.svg" eyebrow="Forex" title="Trade global currencies" description="Speculate on over 50 major, minor and exotic currency pairs, with competitive spreads and 0% commission." actions={<Button variant="primary">Try free demo</Button>} image={{"src":"/sample-card-image.svg","alt":"","width":800,"height":600}} />
|
|
214
238
|
|
|
215
239
|
// The same band with no photograph, on its own ground
|
|
216
|
-
<ProductHero eyebrow="Forex" title="Trade global currencies" description="Speculate on over 50 major, minor and exotic currency pairs, with competitive spreads and 0% commission." actions={<Button variant="primary">Try free demo</Button>}
|
|
240
|
+
<ProductHero eyebrow="Forex" title="Trade global currencies" description="Speculate on over 50 major, minor and exotic currency pairs, with competitive spreads and 0% commission." actions={<Button variant="primary">Try free demo</Button>} image={{"src":"/sample-card-image.svg","alt":"","width":800,"height":600}} />
|
|
217
241
|
```
|
|
218
242
|
|
|
219
243
|
### How much the band carries
|