Soundly design system

Storybook

Every reusable Webflow component, one story per component. Each example is a live instance, so edits to the component show up here first.

Primitives

Button

Component: Primitives / Button, on its own .ui-button class, so edits here never touch the live .button styles. Variants set the look; Size, Class and Attributes are documented below. Pages that use Size need Custom Styles - Button; pages that use u- classes need Custom Styles - Utilities.

Outline
Default. Secondary actions on light backgrounds.
Primary
Main call to action. One per view.
White
Primary action on dark or image backgrounds.
Ghost
Secondary action on dark backgrounds.
Text
Low-emphasis inline action.
Soft
White pill for answer choices and low-emphasis options. Light Blue on hover and focus.
Dark
Slate fill, white text. Brand accent on hover.

AARP

One AARP version of every variant. They always use the AARP colors, for every visitor.
AARP Outline
AARP red border, red fill on hover.
AARP Primary
Main AARP call to action.
AARP White
On dark backgrounds, AARP red on hover.
AARP Ghost
AARP red border on dark backgrounds.
AARP Text
AARP red inline action.
AARP Soft
White pill, AARP Light on hover and focus.
AARP Dark
Slate fill, AARP red on hover.

AARP theme: theme-aarp

Any regular variant can switch to AARP colors. theme-aarp sets the Brand variables to their AARP mode: Accent and Accent Hover become the AARP red, Accent Soft becomes #FDEAE8. Outline, Primary, Text and Soft switch fully; White and Ghost switch their hover.
  • Attributes: aarp-add-class="theme-aarp"AARP visitors only (aarp=true cookie). The soundly.com proxy adds the class; everyone else sees the normal button.
  • Class: theme-aarpAARP colors for every visitor, the same as picking an AARP variant.
  • test-aarp-add-class="theme-aarp"Staging only: applied outside production, ignored in production.

Size

Size prop: xs, sm, md (default), lg. Sets data-size on the button; styles live in Custom Styles - Button.

Class prop

Extra classes, space-separated, added next to .ui-button. Use the shared utilities documented below.
u-w-full
Fills its container at every width.
u-nowrap u-wrap-xs
One line, wraps again at 479px and below.
u-w-full-sm text-style-allcaps
Two classes combined. Full width at 767px and below.

Props

  • TextButton label.
  • LinkURL, page, section, email or phone. Supports open in new tab.
  • VariantOutline (default), Dark, Primary, White, Ghost, Text, Soft, and an AARP version of each (always AARP). Any regular variant can switch to AARP for AARP visitors with aarp-add-class="theme-aarp" in Attributes. Use White and Ghost on dark backgrounds, Soft on tinted ones.
  • Sizexs, sm, md or lg. Rendered as data-size. Empty or any other value falls back to md.
  • ClassExtra classes, space-separated. Rendered into the class attribute next to .ui-button. Use the u- utilities below.
  • AttributesAny custom attributes in one prop: id for anchors or tests, aria-label only when the visible text does not describe the action (and include that text), soundly-dialog-show with a dialog id to open it on click, data-ga-event for tracking, or hooks like aarp.
Primitives

Icon Button

Round, icon-only button on its own .ui-icon-button class. Drop an icon into the Icon slot: an Icon component (recolors on hover and with theme-aarp) or any Image (keeps its own colors). Always fill in Label, since there is no visible text.

Plain
Default. Bare icon, Brand accent on hover.
Dark
Slate circle, white icon. Brand accent on hover.
Outline
Slate ring. Fills with the Brand accent on hover.
Primary
Brand accent fill, like Button Primary.
White
On dark backgrounds. Brand accent on hover.
Ghost
Red-orange ring on dark backgrounds, white on hover.
Soft
White circle, Brand accent soft on hover.

AARP

One AARP version of every variant. They always use the AARP colors, for every visitor. For AARP visitors only, use a regular variant with aarp-add-class="theme-aarp" (see the AARP theme note in Button).
AARP Plain
AARP red icon, slate on hover.
AARP Dark
Slate circle, AARP red on hover.
AARP Outline
AARP red ring and icon. Red fill with a white icon on hover.
AARP Primary
AARP red fill.
AARP White
On dark backgrounds, AARP red on hover.
AARP Ghost
AARP red ring on dark backgrounds.
AARP Soft
White circle, AARP Light on hover.

Size

Size prop: none (no padding, the box hugs the icon; first example, Plain), xs (2.4rem), sm (3.2rem), md (4rem, default), lg (4.8rem). The icon scales with it.

Props and slot

  • Icon (slot)Drop in an Icon component (Icon / Arrow Right, Icon / Plus) or any Image. Icon components use currentColor, so they follow hover colors and theme-aarp. Images keep their own colors and are sized to the same box.
  • LabelRequired. Becomes aria-label, the only name screen readers get, e.g. Next, Add to cart, Close.
  • URLPath or full URL, e.g. /shop. Text field instead of a page picker: the button is a custom element so the slot can live inside it.
  • VariantPlain (default), Dark, Outline, Primary, White, Ghost, Soft, and an AARP version of each (always AARP). Plain is the icon version of Button's Text variant. Regular variants use the Brand accent, so theme-aarp in Class or aarp-add-class="theme-aarp" in Attributes turns them AARP.
  • Sizenone, xs, sm, md or lg. none removes the padding and circle, for Plain or AARP Plain. Needs Custom Styles - Button on the page.
  • Class, VisibilitySame as Button: u- utilities or theme-aarp, and show or hide.
New icons: duplicate Icon / Arrow Right, rename it Icon / Name, and paste an SVG that uses stroke or fill="currentColor", width="100%" and aria-hidden="true".
Primitives

Icons

Icon components for the Icon Button slot or anywhere else. They are 1em square, so their size follows the parent's font size. SVG icons use currentColor and take the parent's text color; Icon / Image shows any image asset in the same box and keeps its own colors.

Icon / Arrow Right
SVG, currentColor.
Icon / Plus
SVG, currentColor.
Icon / Image
Props: Image, Alt text. Leave Alt text empty when the icon sits in an Icon Button (the button's Label names it).
Foundations

Utilities

Shared classes for any component's Class prop. Combine them with spaces. They use !important so they win over component and variant styles. Pages that use them need the Custom Styles - Utilities component.

Breakpoint suffixes

  • no suffixEvery width.
  • -md991px and below.
  • -sm767px and below.
  • -xs479px and below.
  • -lg-only, -md-only, -sm-only, -xs-onlyOnly inside one range: 992px and up, 768 to 991px, 480 to 767px, 479px and below. Used for hiding, so any combination of ranges works.
Suffixed classes override the unsuffixed one, and smaller breakpoints override larger ones. Undo a class with its opposite, e.g. u-nowrap u-wrap-xs.

Classes

  • u-nowrap, -md, -sm, -xswhite-space: nowrap. Keeps text on one line.
  • u-wrap, -md, -sm, -xswhite-space: normal. Lets text wrap again.
  • u-w-full, -md, -sm, -xswidth: 100%. Fills the container.
  • u-w-auto, -md, -sm, -xswidth: auto. Back to content width.
  • u-hide-lg-only, -md-only, -sm-only, -xs-onlydisplay: none inside that range only.

Examples

  • u-nowrap u-wrap-xsOne line, wraps on small phones.
  • u-w-full-smFull width on phones, content width above 767px.
  • u-w-full u-w-auto-mdFull width on desktop only.
  • u-hide-lg-only u-hide-md-onlyOnly visible on phones.
  • u-hide-sm-only u-hide-xs-onlyHidden on phones.
These live in an embed, so Webflow's Clean Up Unused Styles cannot delete them. Existing Webflow classes such as text-style-allcaps also work in the Class prop, but Clean Up can remove them if nothing else uses them.