WFP logoDesign System
Hidden

UI-Kit Component Alternatives

A list of alternative components to the ones provided by the UI-Kit

ReadMore

The Collapsible component provides the same show/hide functionality as a dedicated ReadMore component. It allows content to be toggled based on user interaction, which is the core behavior needed for read-more patterns.

A well designed toolkit reduces repetitive work and keeps teams aligned on patterns. It helps designers and engineers speak the same language, makes handoff smoother, and keeps visual decisions consistent across screens. New contributors can move faster because they start from battle-tested building blocks instead of rebuilding common UI from scratch. Over time, this creates momentum, improves delivery speed, and lowers the cost of maintaining and evolving the product.

This pattern can be implemented by chunking text based on character or word count, and conditionally rendering the "Read more" button based on content length. This approach achieves a similar user experience without needing a dedicated ReadMore component.

Search

Search functionality is a perfect example of <InputGroup> usage, combining input fields with icons, buttons, and other addons.

K

InputGroup is highly flexible and supports various configurations. Explore additional examples in the detailed documentation.

User

The User component is essentially a combination of an avatar and text content. <Item> provides a structured way to display an image alongside content, making it an ideal fit for user profiles.

LS
Luke Skywalker

A legendary Jedi Master

LO
Leia Organa
  • Princess of Alderaan
  • Rebel Alliance Leader
  • General of the Resistance
  • Senator of the Galactic Empire

For more details, check the documentation for each component:

NumberInput

Numeric inputs can be implemented in multiple ways. The first example demonstrates a basic number input, while the second implements manual increment/decrement controls. Both approaches are valid and can be chosen based on your application's specific requirements.

For additional features like validation, error handling, or custom styling, integrate the input with the <Field/> component to create a more robust and user-friendly number input experience.

Enter the quantity you wish to order (1-10)

Enter the price per unit in dollars


Hero

A hero section is often unique to each application, so there isn't a one-size-fits-all component for it. However, you can easily create hero sections using a combination of layout components, typography, and media elements.

Here are a few variations that can be built using these UI-Kit components:

WFP humanitarian response operations
Emergency Food Assistance in Crisis Areas

Supporting families with food, nutrition, and resilience programs where needs are highest.


WFP humanitarian response operations
Building Resilience Through Food Security

We empower communities to overcome food insecurity by providing emergency assistance during crises and building long-term resilience programs.Our approach combines immediate relief with sustainable solutions, helping people recover and thrive.


Making a Difference Together

Join us in our mission to eliminate hunger and deliver hope to communities facing food insecurity worldwide.Every contribution, big or small, helps us reach families in their darkest moments and build a more resilient future.


Unit

For numeric display formatting, use the browsers Intl API.

All examples in this section are based on Intl formatting primitives. See the MDN overview for Intl.NumberFormat.

This approach keeps formatting logic explicit, locale-aware, and easy to test.

Currency

Use style: "currency" with the target currency code. To check available ISO currency codes, see MDN: Intl.supportedValuesOf("currency").

Currency formatting with Intl

USD: $1,234.56

EUR: 1.234,56 €

Numbers

Use plain decimal formatting for grouped thousands and controlled precision. For grouping, notation, and precision options, see MDN: digit and notation options.

Number formatting with Intl

Grouped: 1,234,567.89

Compact: 1.2M

Metric systems

Use style: "unit" with the metric unit you need.

Metric units with Intl

Length: 42 km

Mass: 12.5 kg

Temperature: 24°C

Volume: 3 L

Percentages

Use style: "percent" and pass decimal input values (for example 0.42 -> 42%).

Percentages with Intl

Completion: 42.7%

Progress: 85%

For form-related use cases, keep the raw numeric value in state and apply Intl formatting only when rendering labels, summaries, or read-only values.