1.0.56 • Published 11 months ago

alif-ui-test v1.0.56

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Installation

npm install alif-ui
yarn add alif-ui

Usage

  • brand: This prop sets the brand for your application and should be one of the following options: 'alif', 'alifshop', or 'aliftech'.
  • initialMode: This prop sets the initial theme mode for your application and can be either 'light' or 'dark'. Note: You can easily change the mode with useMode hook provided by this library

To use the alif-ui components in your project, follow these steps:

For a Standard React Application

Wrap your application with the AlifProvider.

import { AlifProvider } from 'alif-ui';

function App() {
	return (
		<AlifProvider brand="alif" initialMode="light">
			{/* Your application components */}
		</AlifProvider>
	);
}

export default App;

For a Next.js Application

Using the App Router

To integrate AlifProvider into a Next.js application using the App Router, follow these steps:

1. Create a Client-Side Wrapper Component File: components/ClientProviderWrapper.tsx

'use client';

import { ReactNode } from 'react';
import { AlifProvider } from 'alif-ui'; // Adjust the import path accordingly

interface ClientProviderWrapperProps {
	children: ReactNode;
}

const ClientProviderWrapper = ({ children }: ClientProviderWrapperProps) => {
	return (
		<AlifProvider initialMode="light" brand="alif">
			{children}
		</AlifProvider>
	);
};

export default ClientProviderWrapper;

2. Update the Root Layout File: app/layout.tsx

import { ReactNode } from 'react';
import ClientProviderWrapper from '../components/ClientProviderWrapper'; // Adjust the import path accordingly

interface RootLayoutProps {
	children: ReactNode;
}

const RootLayout = ({ children }: RootLayoutProps) => {
	return (
		<html lang="en">
			<body>
				<ClientProviderWrapper>{children}</ClientProviderWrapper>
			</body>
		</html>
	);
};

export default RootLayout;

Documentation

Visit https://ui.alif.tj to view the full documentation.

1.0.48

11 months ago

1.0.47

11 months ago

1.0.46

11 months ago

1.0.49

11 months ago

1.0.51

11 months ago

1.0.50

11 months ago

1.0.55

11 months ago

1.0.54

11 months ago

1.0.53

11 months ago

1.0.52

11 months ago

1.0.56

11 months ago

1.0.39

11 months ago

1.0.38

11 months ago

1.0.40

11 months ago

1.0.44

11 months ago

1.0.43

11 months ago

1.0.42

11 months ago

1.0.41

11 months ago

1.0.45

11 months ago

1.0.37

11 months ago

1.0.36

11 months ago

1.0.35

11 months ago

1.0.19

11 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.22

11 months ago

1.0.21

11 months ago

1.0.20

11 months ago

1.0.26

11 months ago

1.0.25

11 months ago

1.0.24

11 months ago

1.0.23

11 months ago

1.0.29

11 months ago

1.0.28

11 months ago

1.0.27

11 months ago

1.0.33

11 months ago

1.0.11

11 months ago

1.0.32

11 months ago

1.0.31

11 months ago

1.0.30

11 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.34

11 months ago

1.0.12

11 months ago

1.0.10

12 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago