This project provides four React boilerplate versions for starting your React applications with different levels of complexity:
- react_bare: A barebones React setup with no additional components, JS, or CSS. Ideal for starting a project from scratch.
- react_basic: A more feature-rich setup that includes Bootstrap integration, custom CSS, and a Navbar component. Also includes a sample single-page app to get started quickly.
- react_bootstrap: React setup with Bootstrap integration, using Offcanvas Navbar component.
- react_tailwind: React setup with Tailwind CSS integration
react_bare is a minimal setup with the basic React environment. It includes:
- React and ReactDOM installed
- Babel for JSX compilation
- Webpack for module bundling
- No additional components, JS, or CSS files
- SCSS files are provided but mostly empty to allow you to start with a clean slate
This version is suitable for starting with a clean slate, without any pre-configured components or styling.
react_basic is a more advanced setup that includes:
- Integration with Bootstrap for UI components (installed via npm)
- A custom component built with customs classes (see salient folder in utils)
- A sample single-page app (SPA) structure
- This version is ideal if you're looking for a quick start with a responsive layout and a basic page structure that includes common UI elements like a navbar, dropdown, timeline, breadcrumb, button, card, modal, pagination, tab, table, timeline, list and treeview.
See the demo site of Salient Demo App which integrates with react-router-dom.
- Integration with Bootstrap version 5 for UI components (installed via npm)
- Navbar using Bootstrap Offcanvas design
Note
Bootstrap 5 currently has some issues with the latest SASS implementation, webpack has been configured to ignore the @import warnings.
- Integration with Tailwind for styling (installed via npm)
- Ideal for quick iterations, prototypes, or proof of concept (PoC) development.
- Prebuilt with Offcanvas Navbar (side nav) and Standard top navbar
Note
Based on personal experience, it's not advisable to use Tailwind for large-scale project development. While Tailwind provides great flexibility and speed in development, its utility-based approach might become difficult to manage as the project grows larger and more complex.
- Clone the repository or download the
react_basicorreact_bareorreact_bootstraporreact_tailwindfolder. - Navigate to the folder in your terminal:
cd react_bare # or cd react_basic or cd react_bootstrap
- Install dependencies by running:
npm install
- Start the development server:
npm run dev-server
- A browser will automatically open, you can see the Basic React app.
- To run build:
npm run build
Here’s the basic file structure for react_bare versions:
.
├── public
│ ├── images
│ │ └── favicon.png
│ └── index.html
├── src
│ ├── components
│ │ ├── footer.js
│ │ └── header.js
│ ├── styles
│ │ ├── base
│ │ │ ├── _base.scss
│ │ │ └── _settings.scss
│ │ ├── components
│ │ │ ├── _button.scss
│ │ │ └── _card.scss
│ │ ├── layout
│ │ │ ├── _footer.scss
│ │ │ ├── _grid.scss
│ │ │ └── _header.scss
│ │ ├── utilities
│ │ │ ├── _functions.scss
│ │ │ └── _mixins.scss
│ │ └── styles.scss (Combines all SCSS files)
│ └── app.js
├── package.json
├── webpack.config.js
└── .gitignore
Here’s the basic file structure for react_basic versions:
.
├── public
│ ├── assets
│ │ └── timeline_data.json (Dummy data for populating timeline and testing)
│ ├── images
│ │ └── favicon.png
│ └── index.html
├── src
│ ├── components
│ │ ├── Navigation
│ │ │ └── Navbar.js (Layout provided For Demo Purpose Only using Nav component)
│ │ ├── Layout
│ │ │ ├── Footer.js
│ │ │ └── Header.js
│ │ ├── SampleDynamicPaginatedTable.js (Demo usage of Table component & pagination using dynamic data)
│ │ ├── SampleStaticPaginatedTable.js (Demo usage of Table component & pagination using HTML table)
│ │ ├── SampleStaticTable.js (Demo usage of Table component without pagination using HTML table)
│ ├── containers
│ │ ├── demo_data.js (Dummy data For Demo Purpose Only, remove this if actual data is available)
│ │ └── Container.js
│ ├── styles (Note: The styles folder contains recommended styles structure, remove the files it if not necessary for your project)
│ │ ├── base
│ │ │ ├── _base.scss
│ │ │ └── _settings.scss
│ │ ├── components
│ │ │ ├── _button.scss
│ │ │ └── _card.scss
│ │ ├── layout
│ │ │ ├── _footer.scss
│ │ │ ├── _grid.scss
│ │ │ ├── _container.scss
│ │ │ ├── _navbar.scss
│ │ │ └── _header.scss
│ │ ├── utilities
│ │ │ ├── _functions.scss
│ │ │ └── _mixins.scss
│ │ ├── custom-bootstrap.scss (For packing only the necessary css from bootstrap)
│ │ └── styles.scss (Combines all SCSS files)
│ ├── utils
│ │ ├── FontAwesome
│ │ │ └── fontAwesome.js (For Packing all the font awesome library)
│ │ ├── Salient (Salient is a custom CSS and Javascript Library that I've written)
│ │ │ ├── helper
│ │ │ │ ├── Sort.js
│ │ │ ├── styles (Salient styles library)
│ │ │ │ ├── _salient-all.scss (For packing all the salient styles library)
│ │ │ │ ├── _salient-accordian.scss
│ │ │ │ ├── _salient_breadcrumb.scss
│ │ │ │ ├── _salient_button.scss
│ │ │ │ ├── _salient_card.scss
│ │ │ │ ├── _salient-icons.scss
│ │ │ │ ├── _salient-modal.scss
│ │ │ │ ├── _salient-nav.scss
│ │ │ │ ├── _salient-table.scss
│ │ │ │ ├── _salient-tabs.scss
│ │ │ │ ├── _salient-timeline.scss
│ │ │ │ ├── _salient-form.scss
│ │ │ │ ├── _salient-list.scss
│ │ │ │ ├── _salient-treeview.scss
│ │ │ │ ├── _salient-banner.scss
│ │ │ │ └── _salient-sidebar.scss
│ │ │ ├── UI (Salient components library)
│ │ │ │ ├── Accordian
│ │ │ │ │ └── Accordian.js
│ │ │ │ ├── Breadcrumb
│ │ │ │ │ └── Breadcrumb.js
│ │ │ │ ├── Button
│ │ │ │ │ └── Breadcrumb.js
│ │ │ │ ├── Card
│ │ │ │ │ └── Card.js
│ │ │ │ ├── Form
│ │ │ │ │ ├── Dropdown.js
│ │ │ │ │ ├── NumericField.js
│ │ │ │ │ ├── TextField.js
│ │ │ │ │ └── FormAffix.js
│ │ │ │ ├── Modal
│ │ │ │ │ └── Modal.js
│ │ │ │ ├── Navigation
│ │ │ │ │ └── Nav.js
│ │ │ │ ├── Pagination
│ │ │ │ │ └── Pagination.js
│ │ │ │ ├── Tab
│ │ │ │ │ └── Pagination.js
│ │ │ │ ├── Table
│ │ │ │ │ └── Table.js
│ │ │ │ ├── List
│ │ │ │ │ └── List.js
│ │ │ │ ├── Treeview
│ │ │ │ │ └── Treeview.js
│ │ │ │ ├── Banner
│ │ │ │ │ └── Banner.js
│ │ │ │ ├── Sidebar
│ │ │ │ │ └── Sidebar.js
│ │ │ │ └── Timeline
│ │ │ │ └── Timeline.js
│ └── app.js
├── package.json
├── webpack.config.js
└── .gitignore
- src/app.js: The entry point for the React app.
- src/components: Contains reusable components like footer.js and header.js (see features section for more description).
- src/styles: SCSS files and partials for base, components, and layouts.
- webpack.config.js: Configured to handle modern setups, including Dart SASS and muted Bootstrap @import errors.
| Feature | react_bare |
react_basic |
|---|---|---|
| Bootstrap | Not included | Integrated via npm (Note: Bootstrap is not used in any Salient components) |
| Sample SPA Structure | Not included | Provided for quick start |
| Custom SCSS Files | Basic SCSS setup | Includes detailed layout and component styles: - Salient Buttons: salient-button.scss - Salient Card: salient-card.scss - Salient Navbar: salient-nav.scss - Salient Accordian: salient-accordian.scss - Salient Timeline: : salient-timeline.scss - Salient Tabs: : salient-tabs.scss - Salient Table: : salient-table.scss - Salient Breadcrumbs: : salient-breacrumb.scss - Salient Modal: : salient-modal.scss - Salient Treeview: : salient-treeview.scss - Salient Form Dropdown: : salient-form.scss - Salient List: : salient-list.scss - Salient Sidebar: : salient-sidebar.scss - Salient Banner: : salient-banner.scss |
| Font Awesome Support | Not included | Integrated for icons |
| JQuery Support | Not included | Configured with Webpack for global usage |
| Built-in Components | Not included | Custom Components for: - Navbar component ( Nav.js) - Accordian component ( Accordian.js) - Tab component ( Tab.js) - Table component ( Table.js) - Modal component ( Modal.js) - Card component ( Card.js) - Button component ( Button.js) - Breadcrumb component ( Breadcrumb.js) - Treeview component ( Treeview.js) - Timeline component ( Timeline.js) - List component ( List.js) - Form Dropdown component ( Dropdown.js, FormAffix.js, NumericField.js, TextField.js) - Sidebar component ( Sidebar.js) - Banner component ( Banner.js) Custom HOC: - Pagination component ( Pagination.js) - Bootstrap integration |
The Salient library was developed with a core goal: to simplify the development process by eliminating the need to manually define custom states for controlling UI animations, styles, and effects. By leveraging Salient, developers can focus on building robust applications without worrying about intricate UI configurations.
This library offers:
- Predefined animations and styles that integrate seamlessly into React projects.
- An easy-to-use structure for dynamic UI effects without the overhead of managing custom state logic.
- A faster development workflow, reducing boilerplate code while maintaining flexibility for customization.
- Reusable components that are flexible to accept other attributes that are available on common HTML elements.
Note
While controlling animations and effects in React is simple, it often requires managing additional state variables, which can complicate the codebase and lead to unnecessary boilerplate. Salient was created to address this issue by providing a streamlined solution that abstracts these complexities.
The Salient Navbar is a customizable navigation bar that can be easily tailored using simple classes and attributes.
On mobile screen sizes, the navbar automatically transforms into a sidebar with the following settings:
- To enable the sidebar, add the
data-effect="shift"attribute to the<Nav>tag.
The <ul> list within the navbar can display two types of slide animations:
- Use the
sd-slide-downclass for a slide-down effect. - Use the
sd-slide-inclass for a slide-in effect.
If the sd-slide-in class is applied to <ul> without the data-effect="shift" attribute on the <Nav> tag, the sidebar will slide in from the left but will not shift the page content.
The navbar supports the following pre-defined themes. Apply one of these themes to the <Nav> tag to customize the theme:
darkoffwhitegrayscaleblue
Note
If no theme is specified, the navbar will default to the default theme automatically.
-
shift(Optional)- Type:
Boolean(true|false) - Description: Controls the positioning of the hamburger menu and navbar on small screens.
true: Default. Shifts both the hamburger button and the navbar to the right when the menu is open, applying thesd-shift-navbarclass.false: Instead of shifting, the navbar slides downwards when the hamburger button is clicked.
Note: If the
navSlideDownprop is set to true, the shift prop will be ignored.
- Type:
-
navSlideDown(Optional)- Type:
Boolean(true|false) - Description: Determines the direction in which the navbar menu expands on small screens.
true: The navbar slides open downwards, expanding vertically.false: Default. The navbar opens horizontally, sliding from left to right.
- Type:
-
brandLogo(Optional)- Type:
ReactNode - Description: Inserts a brand logo alongside the brand name within the navbar. This allows for the seamless integration of icons or custom images.
- Example:
brandLogo={<FontAwesomeIcon icon="circle-notch" size="2x" className="brand-icon"></FontAwesomeIcon>}>
- Type:
-
theme(Optional)- Type:
String(blue|offwhite|dark|grayscale) - Description: Apply the predefined themes to the navbar
- Type:
-
title(Required)- Type:
String - Description: Define the title of the application in the navbar
- Type:
<Nav title="Salient" theme="offwhite" shift={true} navSlideDown={false} brandLogo={<FontAwesomeIcon icon="circle-notch" size="2x" className="brand-icon"></FontAwesomeIcon>}>
<NavMenu>
<li data-tooltip="Home">
<a href="">
<FontAwesomeIcon className="navlink-icon" icon="home"></FontAwesomeIcon>
<span className="navlink-text">Home</span>
</a>
</li>
<li data-tooltip="Dropdown" data-dropdown>
<a>
<FontAwesomeIcon className="navlink-icon" icon="caret-down"></FontAwesomeIcon>
<span className="navlink-text">Dropdown</span>
</a>
<ul className="dropdown-menu" aria-labelledby="dropdownMenuLink">
<li><a className="dropdown-item" href="#">Action</a></li>
<li><a className="dropdown-item" href="#">Another action</a></li>
<li><a className="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
</NavMenu>
</Nav>The Salient Timeline is a customizable timeline component that can be easily configured using classes and attributes.
-
isHorz(Optional)- Type:
Boolean(true|false) - Description: Determines the timeline's orientation.
true: Displays the timeline horizontally (timeline-horzclass is applied).false: Default. Displays the timeline vertically.
- Type:
-
isLoading(Required)- Type:
Boolean(true|false) - Description: Used with React state to determine if data has been fetched.
- Use
setIsLoadedto update the state when data is fetched. - When loaded, the
loadedclass is applied to the timeline.
- Use
- Type:
-
isStaggered(Optional)- Type:
Boolean(true|false) - Description: Applies a staggered layout to timeline items.
true: Adds thetimeline-staggeredclass.- Horizontal timeline: Items stagger up and down.
- Vertical timeline: Items stagger left and right.
false: Default. No staggering applied.
- Type:
-
showCount(Optional)- Type:
Integer - Description: Limits the number of timeline events displayed per page. Defaults to 3 if data-show-count attribute in Timeline.js is not found. However, it is better to set it as the props.showCount is use by React state.
- Events exceeding this count are pushed to subsequent pages.
- Up and Down Arrow Buttons: Always visible for navigation between pages (See
showControlsprops below).- Up Arrow: Navigates to the previous page.
- Down Arrow: Navigates to the next page.
- Type:
-
centerEvents(Optional)- Type:
Boolean(true|false) - Description: Centers the events items of the timeline on a horizontal timeline. This will apply the
center-eventsclass.true: Applies thecenter-eventsclass.false: Default. Each events items are place at the left.
- Note: This props works only for horizontal timeline, when
screen size <= 768px, the timeline will automatically become a vertical timeline.
- Type:
-
showControls(Optional)- Type:
Boolean(true|false) - Description: Conditions for showing the up and down arrow buttons
true: Default. To change the default behaviour, adjust the defaultProps in Timeline.js. Otherwise, the up and down arrow buttons will be visible.false: Will remove the up and down arrows from the DOM.
- Example Usage with Dynamic data:
showControls={data.length > 0 && data.length > showCount}may be set in Container.js wheredatarefers to the an array fetch through axios or other means.- Note: for the above example to work, ensure showCount is a variable instead of defining it as part of Timeline attribute directly. ie:
showCount = {showCount}
- Type:
-
isTimelineActive(Optional)- Type:
Boolean(true|false) - Description: Apply the
timeline-activeclass to the timelinetrue: Adds thetimeline-activeclass.false: Default.timeline-activeclass is not applied.- Note: To apply the style,
activeEventIDprops must also be defined (seeactiveEventIDbelow)
- Type:
-
activeEventID(Optional)- Type:
Integer - Description: Apply the
active-eventclass to the timeline event- Adds the
active-eventclass to the timeline event where the index matches theactiveEventID. The event item having matching index asactiveEventIDwill have an effect similar to hovering state. Defaults toundefinedif data-active-id attribute in Timeline.js is not found. Whenundefined, bothactive-eventclass andtimeline-activeclass will not be applied.
- Adds the
- Type:
import Timeline, {TimelineEvent} from '../utils/Salient/UI/Timeline/Timeline';
<Timeline
showCount={3}
isHorz={true}
isLoading={isLoading}
isStaggered={true}
centerEvents={true}
showControls={true}
isTimelineActive={true}
activeEventID={3}>
{data.map((item, index) => (
<TimelineEvent
key={item.id}
icon={index === 0 ? 'icon-square' : 'icon-circle'}
text={item.text}
event={item.thumbnail}/>
))}
</Timeline>The Salient Tabs is a customizable component that can be easily configured using classes and attributes.
-
sideTabs(Optional)- Type:
Boolean(true|false) - Description: Determines the tab orientation.
true: Displays the tabs vertically (tabs-sideclass is applied).false: Default. Displays the tabs horizontally.
- Type:
-
tabStyleActive(Optional)- Type:
String(box|underline) - Description: Determine the tab style effect when active state, either box or underline. Default will be
boxtab style.
- Type:
-
activeTabIndex(Optional)- Type:
Integer - Description: Initialize the tab content based on the set index. Default to 0, the first tab
- Type:
Note
The tabs will automatically become an accordian when the screen size is less than 768px. This is to cater to mobile responsive design
<Tab sideTabs={isSideTab} activeTabIndex={1}>
<TabItems tabStyleActive={tabStyle}>
<li><a>Tab 1</a></li>
<li><a>Tab 2</a></li>
<li><a>Tab 3</a></li>
</TabItems>
<TabContent>
<section className="item" data-title="Tab 1">
<div className="item-content">
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Ut dicta neque deleniti dignissimos doloribus asperiores vel velit recusandae quasi? Fugit?</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo doloribus quibusdam ratione aliquid ut, dolorem illum velit ad sunt dolorum!</p>
</div>
</section>
<section className="item" data-title="Tab 2">
<div className="item-content">
Tab 2 content. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
</div>
</section>
<section className="item" data-title="Tab 3">
<div className="item-content">
Tab 3 content. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
</div>
</section>
</TabContent>
</Tab>The Salient Accordion is a customizable component designed for easy integration. It allows for smooth expand-and-collapse functionality and can be tailored using classes and attributes to fit any design need.
activeToggle(Optional)- Type:
String(single|multiple) - Description: Controls the accordion toggle behavior.
- "single": Only one item can be expanded at a time.
- "multiple": Allows multiple items to be expanded simultaneously.
- Type:
<Accordian activeToggle="single">
<AccordianItem title="Section 1" content="Content for Section 1" />
<AccordianItem title="Section 2" content="Content for Section 2" />
<AccordianItem title="Section 3" content="Content for Section 3" />
</Accordian>animation(Optional)- Type:
String(flip-x|flip-y|tilt|scale) - Description: Adds an in-built hover effect to the card.
- Type:
<Card className="card-flat" animation="tilt">
<CardInfo>
{Insert any HTML code here or add a card title as shown below}
<CardTitle>Title</CardTitle>
</CardInfo>
<CardContent>
{Insert any HTML code here}
</CardContent>
</Card>-
showModal(Required)- Type:
Boolean(true|false) - Description: Controls the visibility of the modal based on its state
- Type:
-
onCloseModal(Required)- Type:
Function - Description: A callback function triggered to close the modal.
- Type:
-
hasSection(Optional)- Type:
Boolean(true|false) - Description: Specifies whether the modal content should be displayed in sections. When set to
true, a dot indicator appears at the bottom, along with left and right arrows for navigation. The default value isfalse, displaying all content on a single page.
- Type:
-
onModalBlur(Optional)- Type:
Function - Description: A callback function invoked to close the modal when a click event occurs outside its boundaries.
- Type:
-
title(Optional)- Type:
String - Description: Set the modal header title
- Type:
<Modal title="Header" showModal={showModal} onCloseModal={(e) => {e.preventDefault(); setShowModal(false)}} className="light-theme" hasSections={true} onModalBlur={() => setShowModal(false)}>
<section className='center-content'>
Section 1
</section>
<section className='fit-content'>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Iste corporis sunt culpa illum assumenda ex iusto totam mollitia facere. Libero deserunt natus ea ad sint ex voluptates repellendus architecto tenetur!
</section>
<section className='fit-content'>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem facere fuga rerum. Voluptate molestiae assumenda dicta velit perferendis exercitationem ratione eligendi amet, modi soluta praesentium fugit, quidem alias voluptatum illo iure. Beatae nobis ipsam dolor quam, ex, nesciunt ea pariatur in quas quo debitis, corrupti illum provident laborum cum expedita!
</section>
</Modal>Tip
Any element can be added within the modal. In the example above, each section is displayed on a separate page.
Static Table With & Without Pagination

-
draggable(Optional)- Type:
Boolean(true|false) - Description: Enables or disables row dragging in the table. By default, rows are not draggable.
- Type:
-
showColToggleUI(Optional)- Type:
Boolean(true|false) - Description: Displays column toggle buttons when set to
true. The default value isfalse.
- Type:
-
onRetrievedSelected(Optional)- Type:
Function - Description: A callback function invoked to fetch the data of selected rows.
- Type:
-
showRowSelector(Optional)- Type:
Boolean(true|false) - Description: Displays checkboxes for each row. Works in conjunction with the
onRetrievedSelectedprop.
- Type:
-
ref(Optional)- Type:
Reference - Description: Provides access to the DOM elements for additional customization.
- Type:
-
data(Optional)- Type:
Array<Object> - Description: Accepts an array of objects, where each object represents a row. Required for dynamic tables.
- Type:
-
columns(Required)- Type:
Array - Description: An array of elements used to define and display the table headers (thead).
- Type:
-
retrieveRowsBtnTitle(Optional)- Type:
String - Description: Customizes the default button title used for retrieving row data
- Type:
-
sortable(Optional)- Type:
Boolean(true|false) - Description: Enables or disable column data sorting. By default this is set to
false.
- Type:
<Table draggable={true} columns={["Company", "Contact", "Country"]} showColToggleUI={true} showRowSelector={true} onRetrievedSelected={handleRetrievedRows} ref={tableRef} sortable={true}>
<TableRow>
<td data-field="Company">Alfreds Futterkiste</td>
<td data-field="Contact">Maria Anders</td>
<td data-field="Country">Germany</td>
</TableRow>
<TableRow>
<td data-field="Company">Centro comercial Moctezuma</td>
<td data-field="Contact">Francisco Chang</td>
<td data-field="Country">Mexico</td>
</TableRow>
<TableRow>
<td data-field="Company">Ernst Handel</td>
<td data-field="Contact">Roland Mendel</td>
<td data-field="Country">Austria</td>
</TableRow>
</Table>-
text(Required)- Type:
String - Description: Tree item title
- Type:
-
subtext(Optional)- Type:
String - Description: Add a comment next to the main text.
- Type:
-
expandOnLoad(Optional)- Type:
Boolean(true|false) - Description: Determine the initial state of the tree item when the UI first render.
- Type:
<Treeview>
<TreeItem text='Item 1' subtext="(with levels)">
<li><span>1.1</span></li>
<li><span>1.2</span></li>
</TreeItem>
<TreeItem text='Item 2' subtext="(multilevel)" expandOnLoad={true}>
<li><span>2.1</span></li>
<TreeItem text="2.2">
<li><span>2.2.1</span></li>
<li><span>2.2.2</span></li>
<TreeItem text="2.2.3" subtext="(we can continue adding levels)">
<li><span>2.2.3.1</span></li>
<li><span>2.2.3.2</span></li>
</TreeItem>
</TreeItem>
</TreeItem>
<TreeItem text='Item 3' subtext="(No Level)"/>
</Treeview>-
bcType(Optional)- Type:
String(dot|triangle|multiStep) - Description: Specifies the breadcrumb style to be used by the component.
- Type:
-
centerBc(Optional)- Type:
Boolean(true|false) - Description: Centers the breadcrumb items. By default, items are aligned to the left and placed next to each other.
- Type:
-
hasBadge(Optional)- Type:
Boolean(true|false) - Description: Displays a counter badge on each breadcrumb item.
- Type:
-
separator(Optional)- Type:
String - Description: Sets a custom separator between breadcrumb items. The default separator is
>>.
- Type:
Note
Seperator will not work with multiStep and triangle breadcrumbs.
<Breadcrumb bcType="dot" centerBc={true}>
<li><a href="#0"><FontAwesomeIcon icon="house" style={{marginRight: '.6em'}}/>Home</a></li>
<li><a href="#0">Gallery</a></li>
<li className="active"><a href="#0">Web</a></li>
<li><a href="#0">Project</a></li>
</Breadcrumb>The pagination component is a higher-order component (HOC) designed using the currying approach, allowing props to be passed seamlessly to child components.
This flexible design lets you integrate pagination in two ways:
- Direct Integration: Use it within a custom component, passing props directly.
- Wrapper Usage: Wrap it around an external component to automatically forward props to its children.
This versatility makes it easy to manage paginated data while maintaining clean and reusable component structures.
-
itemsPerPage(Required)- Type:
Integer - Description: Defines the number of items to display on each page.
- Type:
-
items(Optional)- Type:
Array<Object> - Description: An array of dynamic data to be paginated.
- Type:
-
showPageItemsControl(Optional)- Type:
Boolean(true|false) - Description: Show the UI for setting the number of rows to be displayed per page. Default is
false.
- Type:
const StaticPaginatedTable = withPagination()(Table);
const SampleStaticPaginatedTable = (props) => {
return (
<StaticPaginatedTable {...props} columns={["Company", "Contact", "Country"]}>
<TableRow>
<td data-field="Company">Alfreds Futterkiste</td>
<td data-field="Contact">Maria Anders</td>
<td data-field="Country">Germany</td>
</TableRow>
<TableRow>
<td data-field="Company">Centro comercial Moctezuma</td>
<td data-field="Contact">Francisco Chang</td>
<td data-field="Country">Mexico</td>
</TableRow>
<TableRow>
<td data-field="Company">Ernst Handel</td>
<td data-field="Contact">Roland Mendel</td>
<td data-field="Country">Austria</td>
</TableRow>
</StaticPaginatedTable>
)
}
export default SampleStaticPaginatedTable;import SampleStaticPaginatedTable from '../components/SampleStaticPaginatedTable';
<SampleStaticPaginatedTable itemsPerPage={4}/>- ExternalPaginatedTable invokes this function and passes the paginated data (paginatedItems) as an argument.
- The function returns JSX — a dynamic list of rows based on the current page’s data.
In this example, the ExternalPaginatedTable component is used to create a dynamic, paginated table with customizable features such as row dragging, column toggling, and row selection
import Table, {TableRow} from '../utils/Salient/UI/Table/Table';
const ExternalPaginatedTable = withPagination()(Table);
<ExternalPaginatedTable
items={filteredTable}
itemsPerPage={5}
draggable={true}
showColToggleUI={true}
columns={["Type", "Name", "Description", "Tags", "Last Viewed", "Expiration"]}
showRowSelector={true}>
{(paginatedItems) =>
(Array.isArray(paginatedItems) ? paginatedItems : []).map((row, index) => (
<TableRow key={index}>
<td data-field="Type"><FontAwesomeIcon icon={"file-"+row.Type}></FontAwesomeIcon></td>
<td data-field="Name">{row.Name} app</td>
<td data-field="Description">{row.Description}</td>
<td data-field="Tags">{row.Tags}</td>
<td data-field="Last Viewed">{row.LastViewed}</td>
<td data-field="Expiration">{row.Expiration}</td>
</TableRow>
))
}
</ExternalPaginatedTable>Salient Button consist of the following types:
- Toggle Switch
- Normal Buttons
- Checkboxes
-
type(Required)- Type:
String(button|checkbox|switch) - Description: Specifies the button style to be used by the component.
- Type:
-
isBlock(Optional)- Type:
Boolean(true|false) - Description: Determines if the button style should be block. By default, buttons are placed next to each other inline. If
isBlockis specified astrue, the adjacent buttons will be place below the current button. Note: This works only for button of typebutton.
- Type:
-
expandFull(Optional)- Type:
Boolean(true|false) - Description: Determine if the button should take up the full container width. By default, the buttons only takes up the necessary space. This works only for button of type
button.
- Type:
-
buttonStyle(Optional)- Type:
String(clear|blur|blueBlur) - Description: Sets a button design and theme based on in-built CSS. Note: this works only for button of type
button
- Type:
-
inverseColor(Optional)- Type:
Boolean(true|false) - Description: Inverse the color of the in-built button theme. Note: this works only for button of type
button
- Type:
-
buttonType(Optional)- Type:
String(widget) - Description: Determine if a button should consist of an icons, this will create a button with a predefined icons sets. If this parameter is set,
iconparameter must also be set
- Type:
-
icon(Optional)- Type:
String(See below list of in-built icons) - Description: Insert an icon to the button from predefined icons sets. Note: this parameter only works for
buttonType='button'. - In-built Icons:
- Directional Icons:
icon-chevron-left,icon-chevron-right,icon-chevron-up,icon-chevron-down,icon-left,icon-right,icon-up,icon-down,icon-backward,icon-forward,icon-step-backward,icon-step-forward,icon-right-arrow,icon-left-arrow,icon-top-arrow,icon-bottom-arrow,icon-top-fill,icon-bottom-fill - File Type Icons:
icon-file,icon-video,icon-photo,icon-folder - Social Icons:
icon-tag,icon-heart,icon-comment,icon-profile,icon-share,icon-location - Document Icons:
icon-search,icon-flag,icon-forbidden,icon-gear,icon-lock,icon-unlock,icon-link,icon-list,icon-filter,icon-bookmark,icon-sort-by,icon-sort-by-fill - Media Icons:
icon-eject,icon-pause,icon-play,icon-sound - Other Icons:
icon-wrench,icon-gear
- Directional Icons:
- Type:
-
onChange|onClick(Required)- Type:
Function - Description: A callback function invoked to perform an action when the button state change or when the button is clicked.
- Type:
-
checked(Optional)- Type:
Boolean(true|false) - Description: Set the state of a button of type
switchorcheckbox.
- Type:
-
disabled(Optional)- Type:
Boolean(true|false) - Description: Determine if the button should be disabled.
- Type:
-
mode(Optional)- Type:
String(dark|forest|sunset|indigo|light) - Description: Determines if the
switchorcheckboxbutton should have adark,forest,sunset,indigoorlighttheme. By default, the switch button has a blue background. This parameter only works withbuttonType='switch'andbuttonType='checkbox'.
- Type:
<Button type="switch" onChange={(e) => {setCheck(!check)}} checked={check} mode="dark"></Button><Button type="checkbox" disabled={true} mode="light"></Button><Button type="button" buttonStyle="blur" isBlock={false} expandFull={false} inverseColor={true}>Button6</Button>-
placeholder(Optional)- Type:
String - Description: Insert a placeholder on initialization of the dropdown.
- Type:
-
isSearchable(Optional)- Type:
Boolean(true|false) - Description: Determine if the dropdown should include an input field to search through the dropdown items. The searching feature works based on match instead of filtering and match based on starting text.
- Type:
-
expandFull(Optional)- Type:
Boolean(true|false) - Description: Determine if the dropdown element should take up the full width.
- Type:
-
inputPrefix(Optional)- Type:
ReactNode - Description: Include an icon at the front of the dropdown field. To use this,
FormAffixcomponent can be imported from the Salient library. Alternatively, you may defined your own component to be used. It is possible to use external icon package such as fontAwesome as well, by including the fontAwesome icon directly in theiconparameter of theFormAffixcomponent. - In-built Icons:
- Directional Icons:
icon-chevron-left,icon-chevron-right,icon-chevron-up,icon-chevron-down,icon-left,icon-right,icon-up,icon-down,icon-backward,icon-forward,icon-step-backward,icon-step-forward,icon-right-arrow,icon-left-arrow,icon-top-arrow,icon-bottom-arrow,icon-top-fill,icon-bottom-fill - File Type Icons:
icon-file,icon-video,icon-photo,icon-folder - Social Icons:
icon-tag,icon-heart,icon-comment,icon-profile,icon-share,icon-location - Document Icons:
icon-search,icon-flag,icon-forbidden,icon-gear,icon-lock,icon-unlock,icon-link,icon-list,icon-filter,icon-bookmark,icon-sort-by,icon-sort-by-fill - Media Icons:
icon-eject,icon-pause,icon-play,icon-sound - Other Icons:
icon-wrench,icon-gear
- Directional Icons:
- Type:
<Dropdown placeholder="Dropdown" isSearchable={true} inputPrefix={<FormAffix icon="icon-search"/>}>
<DropdownItem value="Test1">Test1</DropdownItem>
<DropdownItem value="Test2">Test2</DropdownItem>
<DropdownItem value="Test3">Test3</DropdownItem>
</Dropdown>-
min(Required)- Type:
Number - Description: Set the minimum numeric value of the input field
- Type:
-
max(Required)- Type:
Number - Description: Set the maximum numeric value of the input field.
- Type:
-
step(Optional)- Type:
Number - Description: Set the increment or decrement step value. Default is 1.
- Type:
-
value(Optional)- Type:
Number - Description: Set the initial value of the field. Defaults to
minif not set.
- Type:
-
enableSuggestion(Optional)- Type:
Boolean(true|false) - Description: Enable Suggestion Dropdowns. This suggestion dropdown will contain a range of values between the min and max values.
- Type:
-
suggestionLimit(Optional)- Type:
Integer - Description: Determines the number of suggestion to be included in the dropdown. By default this value is 5.
- Type:
-
fieldName(Optional)- Type:
String - Description: Add a description below the field.
- Type:
-
hasFieldName(Optional)- Type:
Boolean(true|false) - Description: Determine if a field name should be included below the input.
- Type:
-
callbackFn(Optional)- Type:
Function - Description: Add a callback function to be triggered on input change.
- Type:
-
ref(Optional)- Type:
React useRef Object - Description: Attach a reference object to the element.
- Type:
-
fieldControlPlacement(Optional)- Type:
String(top|bottom|right) - Description: Determines the placement of the increment and decrement control button. By default, the controls are place on the right hand side of the field.
- Type:
<NumericField min={1} max={20} value={5} step={.01} fieldName="Items Per Page" enableSuggestion={true} suggestionLimit={8} callBackFn={someFunction} ref={ref}/>-
type(Required)- Type:
String - Description: Set the type of input field. Standard types following HTML input elements.
- Type:
-
expandFull(Optional)- Type:
Boolean(true|false) - Description: Determines if the text field should be expanded to full width.
- Type:
-
inputPrefix(Optional)- Type:
ReactNode - Description: Include an icon at the front of the text field. To use this,
FormAffixcomponent can be imported from the Salient library. Alternatively, you may defined your own component to be used. It is possible to use external icon package such as fontAwesome as well, by including the fontAwesome icon directly in theiconparameter of theFormAffixcomponent or using theFontAwesomeIconcomponent from fontAwesome library.
- Type:
-
inputSuffix(Optional)- Type:
ReactNode - Description: Include an icon at the back of the text field. To use this,
FormAffixcomponent can be imported from the Salient library. Alternatively, you may defined your own component to be used. It is possible to use external icon package such as fontAwesome as well, by including the fontAwesome icon directly in theiconparameter of theFormAffixcomponent or using theFontAwesomeIconcomponent from fontAwesome library.
- Type:
-
label(Optional)- Type:
String - Description: Adds a label on top of the text input
- Type:
Note
The component also accepts other attributes similar to those on found on standard HTML elements such as className, style or any other attributes.
<TextField
placeholder="Username"
type="text"
expandFull={true}
inputPrefix={<FormAffix icon="icon-search"/>}
inputSuffix={<FontAwesomeIcon icon="eye" style={{padding: '0 5px'}}/>}
label="Username:"
/>Salient Form affix is a component used to apply in-built icons before a field (prefix) or after a field (suffix).
icon(Required)- Type:
String - Description: Set the type of in-built icons to be applied (see below list).
- In-built Icons:
- Directional Icons:
icon-chevron-left,icon-chevron-right,icon-chevron-up,icon-chevron-down,icon-left,icon-right,icon-up,icon-down,icon-backward,icon-forward,icon-step-backward,icon-step-forward,icon-right-arrow,icon-left-arrow,icon-top-arrow,icon-bottom-arrow,icon-top-fill,icon-bottom-fill - File Type Icons:
icon-file,icon-video,icon-photo,icon-folder - Social Icons:
icon-tag,icon-heart,icon-comment,icon-profile,icon-share,icon-location - Document Icons:
icon-search,icon-flag,icon-forbidden,icon-gear,icon-lock,icon-unlock,icon-link,icon-list,icon-filter,icon-bookmark,icon-sort-by,icon-sort-by-fill - Media Icons:
icon-eject,icon-pause,icon-play,icon-sound - Other Icons:
icon-wrench,icon-gear
- Directional Icons:
- Type:
<FormAffix icon="icon-search"/>-
min(Optional)- Type:
Number - Description: Set the minimum range value of the slider field. Default is 0
- Type:
-
max(Optional)- Type:
Number - Description: Set the maximum range value of the slider field. Default is 100.
- Type:
-
step(Optional)- Type:
Number - Description: Set the increment or decrement step value. Default is 1.
- Type:
-
onChange(Optional)- Type:
function - Description: Set a callback function to be trigger when the slider is triggered.
- Type:
-
theme(Optional)- Type:
String(dark|gray) - Description: Define the theme for the slider. This is optional, and the component will apply a default theme.
- Type:
-
label(Optional)- Type:
String - Description: Include a label above the slider.
- Type:
-
displayMinMaxText(Optional)- Type:
Object - Description: Define the config of to display the min or max values next to the slider. By default both are set to
true. - Example:
displayMinMaxText: {{min: true, max: false }}.
- Type:
-
defaultValue(Optional)- Type:
Number - Description: Set the initial starting value for the slider.
- Type:
Salient List is a container component designed to wrap multiple ListItem components. To render list items correctly, each item must be defined using the ListItem component within the List.
theme(Optional)- Type:
String(dark) - Description: Apply a predefined theme to the list component.
- Type:
hasHoverHighlight(Optional)- Type:
Boolean(true|false) - Description: Enables a hover animation effect when set to true.
- Type:
<List>
<ListItem hasHoverHighlight={true}>List Item 1</ListItem>
<ListItem hasHoverHighlight={true}>List Item 2</ListItem>
<ListItem hasHoverHighlight={true}>List Item 3</ListItem>
</List>-
theme(Optional)- Type:
String(disabled|active|cancel|teal|purple|emergency|warn) - Description: Set the color theme of the banner
- Type:
-
blockquoteStyle(Optional)- Type:
Boolean(true|false) - Description: Determines if the banner should have a coloured left border
- Type:
-
onBannerDismiss(Optional)- Type:
Function - Description: Triggers an additional actions when the banner closes.
- Type:
-
allowBannerDismiss(Optional)- Type:
Boolean(true|false) - Description: Determines if the banner should have a close button. The purpose here is so that the banner can be used as an alert or a blockquote.
- Type:
Note
Additional attributes or properties passed to any of the banner components (Banner, BannerContent, BannerActions) are automatically spread onto the underlying elements.
To trigger an action on the <BannerAction> component, you can attached an onClick listener or any other listener, the UI will automatically take these attributes/parameters into consideration.
<Banner theme="disabled" blockquoteStyle={true}>
<BannerContent>
Some Banner Content
</BannerContent>
<BannerActions>
<BannerAction>Some Action</BannerAction>
<BannerAction>Second Action></BannerAction>
</BannerActions>
</Banner>-
iconPrefix(Optional)- Type:
String - Description: Include an icon before the sidebar main header
- Type:
-
iconSuffix(Optional)- Type:
String - Description: Include an icon after the sidebar main header. By default the component will detect if child elements are present and apply the
icon-righticon.
- Type:
-
title(Required)- Type:
String - Description: Define the title of the Sidebar Item
- Type:
-
notification(Optional)- Type:
String - Description: Define a badge for the Sidebar Item.
- Type:
<Sidebar>
<SideBarItem title="Menu Item 1"/>
<SideBarItem title="Menu Item 2" iconPrefix="icon icon-file">
<li><a>Sub Item 1</a></li>
<li><a>Sub Item 2</a></li>
</SideBarItem>
<SideBarItem title="Menu Item 3" iconPrefix="icon icon-heart" notification={4}>
<li><a>Sub Item 1</a></li>
<li><a>Sub Item 2</a></li>
</SideBarItem>
</Sidebar>Note
Any level of sidebar items may be added, the component will auto compute the correct style based on level.
Salient grid system works the same way as Bootstrap Grid system. You can add any number of Grid Items within the each grid rows.
Similarly to other components, any number of attribute may be added the component.
<Sidebar>
<Grid>
<GridRow>
<GridItem>Row 1 - Item 1</GridItem>
<GridItem>Row 1 - Item 2</GridItem>
<GridItem>Row 1 - Item 3</GridItem>
</GridRow>
<GridRow>
<GridItem>Row 2 - Item 1</GridItem>
<GridItem>Row 2 - Item 2</GridItem>
<GridItem>Row 2 - Item 3</GridItem>
<GridItem>Row 2 - Item 4</GridItem>
</GridRow>
</Grid>
</Sidebar>-
progressItems(Required)- Type:
Array - Description: Accepts an array of elements where each items represent a milestone.
- Type:
-
currentProgressIndex(Optional)- Type:
Integer - Description: Used to determine the starting index of the progress or for updating the progress.
- Type:
-
type(Optional)- Type:
String(linear|circular) - Description: Define if the progress chart should be linear or circular. Defaults to
linearprogress bar.
- Type:
-
onProgressPointClick(Optional)- Type:
Function - Description: Use to trigger a callback function when a point on a progress bar is click. This only works with
linearprogress chart.
- Type:
-
showProgressStep(Optional)- Type:
Boolean(true|false) - Description: Show the progress step on a
linearprogress bar. Default isfalse.
- Type:
-
showCompleteStepCheckmark(Optional)- Type:
Boolean(true|false) - Description: Show the checkmark in place of step number for the completed step. Default is
false.
- Type:
<Progress
progressItems={progressItems}
currentProgressIndex={currentProgressIndex}
type={progressType}
onProgressPointClick={onProgressPointClick}
showProgressStep={showProgressStep}
showCompleteStepCheckmark={showCheckmark}/>















