Skip to content

Proposal to allow multiple links on Call to Action Card #1267

@bgilhome-now

Description

@bgilhome-now

Describe the feature

Currently the Call to Action Card has a property for a single link (url and ctaText), and links the card to it as well as rendering a primary filled button.

There may be a use case for multiple links (no more than say 3) for a card which groups together related calls to action - e.g. links related to a permit application - "Am I eligible?", "Permitted activities", "Apply online".

Motivation

The EPA project is asking for a card with 2-3 related actions like the below:
Screenshot 2024-07-19 at 10 34 24 AM

Structurally and conceptually it's a Call to Action Card, but with multiple links and different visual treatment on the links.

It's possible to achieve this with a data-driven component and some custom code to extract an image & list from the rich text 'Description' field passed from the backend - but gives cause to consider whether this feature might be useful to other projects.

Proposal

To add an extraLinks or secondaryLinks property to the RplCallToActionCard component - an array of objects of type RplLink. Design input would be needed on how to style extra links if set - they could be given less visual weight than what might now be called the 'primary link' passed via url and ctaText (for example, outline buttons, or a inline list of plain links with an arrow or other icon).

Update Tide's 'Call to Action' paragraph type to add a field_extra_links multiple-cardinality Link field, and handle it in ripple-tide-landing-page's component mapping and TideLandingPageCallToAction template.

Benefits

Can be used on 'section landing pages' to direct users to related child pages within a given sub-section, and/or related actions relevant to a given aspect of the site.

Drawbacks

Potential cluttering on the card - needs consideration from content design and visual design perspectives.

Adoption strategy

If implemented via an extra property/field, there should be no breaking changes. Documentation for Ripple & Tide would need to be updated, and a story added to the Ripple storybook.

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be created outside of Ripple-framework as a layer?

Final checks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions