Common Components
Common components are several components designed to be used throughout your website.
What's Included
< ActiveLink />
The ActiveLink
component is a custom link designed to look like a button. It highlights active links based on the current URL, providing visual feedback to users when they are one a specific page or section.
ActiveLink
Usage
ActiveLink
Props
Name | Type | Description | Default |
---|---|---|---|
children | ReactNode | The content to be displayed inside the button. | undefined |
href | string | The destination URL for the link. If href is not provided, the component renders a standalone button without navigation. | undefined |
active | boolean | Manually sets the link as active. Overrides the automatic active state detection. | false |
ghost | boolean | Controls the button's visual style when inactive. | true |
...props | object | Additional props passed to the component. | {} |
< Box />
The Box
component is a versatile container designed to wrap its children with customizable styling. It serves as a foundational layout component that can be styled and configured using additional classes and props.
Box
Usage
Box
Props
Name | Type | Description | Default |
---|---|---|---|
children | ReactNode | The content to be displayed inside the component. | undefined |
className | string | Additional CSS class names to apply to the component. | undefined |
...props | object | Any other props passed to the component. | {} |
< CallToAction />
The CallToAction
component is a styled button designed to navigate users to a specified path when clicked.
CallToAction
Usage
CallToAction
Props
Name | Type | Description | Default |
---|---|---|---|
text | string | The text displayed inside the button. | undefined |
path | string | The URL path where the user will be redirected upon clicking the component. | undefined |
< Card />
The Card
component is a flexible container designed to wrap and display content in a visually distinct and styled manner. It is ideal for organizing content sections, showcasing information, and enhancing the presentation of grouped elements.
Card
Usage
Card
Props
Name | Type | Description | Default |
---|---|---|---|
children | ReactNode | The content to be displayed inside the component. | undefined |
className | string | Additional CSS class names to apply to the component. | undefined |
...props | object | Any other props passed to the component. These props are spread onto the <figure> element. | {} |
< ColorfulButton />
The ColorfulButton
component is a large, visually engaging button designed to draw attention with its unique styling.
ColorfulButton
Usage
ColorfulButton
Props
Name | Type | Description | Default |
---|---|---|---|
children | ReactNode | The content to be displayed inside the component. | undefined |
className | string | Additional CSS class names to apply to the component. | undefined |
...props | object | Any other props passed to the component. | {} |
< Breadcrumbs />
The Breadcrumbs
component is a navigation aid designed to display the current page's path as clickable breadcrumb links.
Breadcrumbs
Usage
Breadcrumbs
Props
Name | Type | Description | Default |
---|---|---|---|
separator | ReactNode | The separator between each breadcrumb link. | / |
breadcrumbReplace | Array<object> | An array of objects specifying text replacements for specific path segments. See usage for more details on its type. | [] |
< ContentSection />
The ContentSection
component is a flexible layout component designed to display content alongside an image. It allows for easy customization and layout adjustments, including reversing the order of content and image.
ContentSection
Usage
ContentSection
Props
Name | Type | Description | Default |
---|---|---|---|
content | ReactNode | The content to be displayed in the section. | undefined |
image | ReactNode | The image or media to be displayed in the section. Typically an <img> element. | undefined |
reverse | boolean | When set to true , reverses the order of the content and the image, displaying the image first. | false |
className | string | Additional CSS class names to apply to the component. | undefined |
< DropdownLink />
The DropdownLink
component renders a dropdown menu with a list of navigational links. It is designed to display a dropdown of links that are shown when the user hovers over the main link.
DropdownLink
Usage
DropdownLink
Props
Name | Type | Description | Default |
---|---|---|---|
link* | object | An object representing the main link and its associated dropdown items. See usage for detailed type information. | {} |
< EmptyState />
The EmptyState
component provides a visual cue when no data or entries are available in a specific section of the application. It optionally displays a call-to-action button that navigates the user to a relevant page, depending on the permissions granted.
EmptyState
Usage
EmptyState
Props
Name | Type | Description | Default |
---|---|---|---|
title | string | The title used within the call-to-action button text. | undefined |
permission | boolean | A flag that determines whether the call-to-action button should be rendered. | undefined |
link | string | null | The URL path to which the user will be redirected when the action button is clicked. If null , the button is not displayed. | null |
< ImageSlider />
The ImageSlider
component is a responsive image carousel built using the Swiper library. It allows you to display a series of images with pagination controls, making it ideal for showcasing image galleries, product images, or any other visual content that requires smooth sliding functionality.
ImageSlider
Usage
ImageSlider
Props
Name | Type | Description | Default |
---|---|---|---|
images | Array<string> | An array of image URLs to be displayed in the slider. | [] |
title | string | A descriptive title for the slider images, used as the alt attribute for each image. | "" |
< List />
The List
component is a styled list that allows you to render lists or grouped content together. It is meant to be used together with ListItem
.
List
Usage
List
Props
Name | Type | Description | Default |
---|---|---|---|
children | ReactNode | The content to be displayed inside the list. | undefined |
className | string | Additional CSS class names to apply to the component. | undefined |
...props | object | Any other props passed to the component. | {} |
< ListItem />
The ListItem
component is a styled list item that is meant to be used inside a List
component.
ListItem
Usage
ListItem
Props
Name | Type | Description | Default |
---|---|---|---|
label | ReactNode | The label or key of the item, displayed on the left side. | undefined |
value | ReactNode | The value associated with the label, displayed on the right side. | undefined |
className | string | Additional CSS class names to apply to the component. | undefined |
...props | object | Any other props passed to the component. | {} |
< MenuItem />
The MenuItem
component renders a navigable menu item, styled with optional active and featured states.
MenuItem
Usage
MenuItem
Props
Name | Type | Description | Default |
---|---|---|---|
data | object | Contains the data for the menu item. See usage for details on its type. | undefined |
featured | boolean | Flag to apply special styles to highlight the item as featured. | false |
onClick | function | Callback function triggered when the menu item is clicked. | undefined |
className | string | Additional CSS class names to apply to the component. | undefined |
< Section />
The Section
component provides a flexible and styled container for grouping related content within a web page.
Section
Usage
Section
Props
Name | Type | Description | Default |
---|---|---|---|
children | ReactNode | The content to be displayed inside the component. | undefined |
className | string | Additional CSS class names to apply to the component. | undefined |
...props | object | Any other props passed to the component. | {} |
< Widget />
The Widget
component is a versatile container designed for displaying content with a customizable header.
Widget
Usage
Widget
Props
Name | Type | Description | Default |
---|---|---|---|
title | ReactNode | The title displayed in the header of the widget. | undefined |
rightActions | ReactNode | Elements or actions placed on the right side of the header, typically used for buttons, icons, or other interactive controls. | undefined |
children | ReactNode | The content to be displayed inside the component. | undefined |
className | string | Additional CSS class names to apply to the component. | undefined |
titleClassName | string | Additional CSS class names to apply to the title of the component. | undefined |