Mantle UI icon

Installation

MantleUI is a rich set of open source UI components for React.

MantleUI is available for download at npm.


// with npm
npm install primereact

// with yarn
yarn add primereact
         

Configuration is managed by the MantleProvider and MantleContext imported from primereact/api.


import { MantleProvider, MantleContext } from '@mantle-ui/react/api';
         

The MantleProvider component is used to wrap the application and the MantleContext is used to access the configuration options.


// _app.js
import { MantleProvider } from '@mantle-ui/react/api';

export default function MyApp({ Component, pageProps }) {
    return (
        <MantleProvider>
            <Component {...pageProps} />
        </MantleProvider>
    );
}
         

Each component can be imported individually so that you only bundle what you use. Import path is available in the documentation of the corresponding component.


import { Button } from '@mantle-ui/react/button';                             
         

MantleUI has two theming modes; styled or unstyled.

Styled mode is based on pre-skinned components with opinionated themes like Material, Bootstrap or PrimeOne themes. Theme is the required css file to be imported, visit the Themes section for the complete list of available themes to choose from.


import "@mantle-ui/react/resources/themes/lara-light-cyan/theme.css";
 

Unstyled mode is disabled by default for all components. Using the MantleContext during installation, set unstyled as true to enable it globally. Visit the Unstyled mode documentation for more information and examples.


import { MantleProvider } from "@mantle-ui/react/api";
...
return(
    <MantleProvider value={{ unstyled: true }}>
        <App />
    </MantleProvider>
)
 

We've created various samples for the popular options in the React ecosystem.

Create React AppNext.JSViteRefine