Ui Package
🛠️ Component Overview
Welcome to the Component Overview page! Here, you'll find detailed descriptions of the various UI components available in this package. These components are designed to enhance your application's user interface by providing consistent and reusable building blocks.
Available Components
This package includes five main types of components:
- Placeholders: For displaying loading states or empty content.
- Navigation: To assist with user navigation within the application.
- Loading States: To indicate ongoing processes.
- Error States: To handle and display error messages.
- Aggregate Displays: For showing summarized data.
Placeholder Components
CardHorizontalPlaceholder
The
component renders a skeleton card, which serves as a visual placeholder while content is loading. It does not accept any properties.<CardHorizontalPlaceholder />
CardViewPlaceholder
The
component is built using the <CardViewPlaceholder />
to create a grid view layout. It accepts a <CardHorizontalPlaceholder />
property to determine how many placeholders to display.count
It has the following properties:
Name | Type | Description |
---|---|---|
count | number | Number of CardHorizontalPlaceholder will be displayed |
col | number | Number of column in the grid layout |
DetailsPlaceholder
Using the
from Flowbite-Svelte, the <TextPlaceholder />
creates a vertical list view placeholder. It also accepts a count property.<DetailsPlaceholder />
It has the following properties:
Name | Type | Description |
---|---|---|
count | number | Number of TextPlaceholder will be displayed |
ListViewPlaceholder
The
component uses skeleton shapes to represent a vertical list. It accepts a count property similar to the other placeholders.<ListViewPlaceholder />
It has the following properties:
Name | Type | Description |
---|---|---|
count | number | Number of items will be displayed on the table |
GeneralListViewPlaceholder
Combining both the
and <ListViewPlaceholder />
, the <CardViewPlaceholder />
provides a flexible list view component. It accepts a viewType property along with count.<GeneralListViewPlaceholder />
It has the following properties:
Name | Type | Description |
---|---|---|
count | number | Number of CardHorizontalPlaceholder will be displayed |
viewType | number | 0 is a CardViewPlaceholder components, 1 is a ListViewPlaceholder components |
Navigation Components
BackArrow
The
component facilitates navigation by allowing users to return to the previous page in their browsing history. You can also specify a custom route for redirection.<BackArrow />
It has the following properties:
Name | Type | Description |
---|---|---|
backUrl | string | void function | This is the url/function that your back button will redirect the user to, if nothing is passed it will use the history api. |
buttonBackgroundColor | string | Number of column in the grid layout |
iconSize | string | Size of the icon in the button, default is 2rem |
Loading Components
PageLoader
The
component is used to indicate that a page is currently loading. It can be customized with a title, description, and slots.<PageLoader />
It has the following properties:
Name | Type | Description |
---|---|---|
title | string | This is the title text the PageLoader component will display. |
description | string | This is the description text the PageLoader component will display. |
spinner | slot | This is a slot that will replace the spinner component area. |
information | slot | This is a slot that will replace the title and the description area. |
Loading
This may take a few seconds, please don't close this page.
Lazy
Error Component
PageNotFoundCard
The
component displays an error message, typically a 404 error. It can be customized to show different types of errors.<PageNotFoundCard />
It has the following properties:
Name | Type | Description |
---|---|---|
displaySvg | boolean | This is responsible to display or not the svg image. |
svgImage | string | This is the svg image url that will be placed in a image tag. |
iconClass | string | This variable controls the classes of the default icon/svgImage. |
buttonClass | string | This variable controls the classes of the action button. |
imageClass | string | This variable controls the classes of the svgImage. |
errorCodeClass | string | This variable controls the classes of the h1 element that displays the error code. |
headerClass | string | This variable controls the classes of the h2 element that displays the header text. |
paragraphClass | string | This variable controls the classes of the paragraph element that displays the extra information text. |
errorCode | string | This is the error code that gets displayed in the screen, default is 404 . |
headerText | string | This is the header text, i.e. the name of the type of error, that gets displayed in the screen, default is Page Not Found . |
paragraphText | string | This is the description of the error that gets displayed in the screen, default is The page you are looking for doesnt exist . |
buttonText | string | This is the title of the action button, default is Back to homepage . |
href | string | This is the link the user gets redirected to when the action button is clicked, default is / . |
Aggregate Component
AggregateStub
The
component presents an aggregate value alongside an icon. It can also function as a button and accepts properties for the label and metric.<AggregateStub />
It has the following properties:
Name | Type | Description |
---|---|---|
bgColor | string | This is responsible to change the background color of the component, it is bg-white by default. |
textColor | string | This is responsible to change the icon color of the component, it is text-black by default. |
metric | string | This is responsible to display the aggregate metric value on the component, it is undefined by default. |
label | string | This is responsible to display the label/description of the metric on the component, it is undefined by default. |
href | string | This is responsible to make the component into a button and redirect the user to the href, it is null by default. |
iconType | string | This is responsible to display the type of FontAwesome icon on the component, i.e. fas, far, fal, fad, fat, it is empty string by default. |
iconName | string | This is responsible to display the name of FontAwesome icon on the component, i.e. cube, lock, user, etc..., it is empty string by default. |
iconSize | string | This is responsible to display the size of FontAwesome icon on the component, i.e. xs, sm, md, lg, xl, 2x ..., it is 2x by default. |
20
Number of downloads