Extensions
Description
Eufemia extensions are reusable parts that do not fit naturally in to a component or element, but rather has the nature of being an extended solution of Eufemia. There are several great reasons behind opting for having extensions separated:
- Modularity and Reusability: Separating extensions promotes a modular design and minimizes code duplication. It enables the creation of subsystems that are tightly integrated with their respective domains, such as a Forms extension that seamlessly connects to its associated data and functionality.
- Decoupled Complexity: Extensions often add specific or advanced functionality that may not be relevant for all use cases. Keeping them separate prevents the core components or elements from becoming overly complex.
- Customizability: Extensions allow for easier customization and flexibility. Developers can pick and choose only the extensions they need, tailoring the solution to their specific requirements.
- Improved Maintainability: Isolating extensions simplifies maintenance and updates. Changes to an extension do not risk introducing bugs in the core components, making the ecosystem more stable.
- Clear Separation of Concerns: By defining extensions as independent solutions, it’s easier to distinguish between core functionality and optional features (handled by extensions).
Import extensions
import { ... } from '@dnb/eufemia/extensions'
Import extensions styles
The styles for extensions are not a part of the default styles, so you have to import them explicitly.
import '@dnb/eufemia/style/themes/theme-ui/extensions'
Available Extensions
Forms for applications
Forms is reusable components for data input, data display and surrounding layout for simplified user interface creation in React, built on top of base Eufemia components.
Payment Card
The Payment Card component is used to display payment card information in a standardized format.