1.3.11 • Published 6 months ago

retro-react v1.3.11

Weekly downloads
2
License
MIT
Repository
github
Last release
6 months ago

React Retro UI Library

npm version npm license

React Retro UI Library is a retro-themed UI library for React that offers a unique set of over 20 components to help you effortlessly build nostalgic user interfaces. The library includes components such as buttons, containers, inputs, boxes, cards, text, modals, progress bars, chips, and alerts, among others.

There are also some unique components such as the MouseTrail component, which creates a trail of mouse cursors that follow the user's mouse movements, PixelatedImage, which pixelates an image, and many more. Additional components can be found in the demo.

The library is in it's early stages, so there are still many components to be added. Suggestions are always welcome, so feel free to open an issue here.

For detailed changes between versions, please refer to the github releases page. Stay tuned for frequent updates!

Demo

Explore the demo of the library to see all the components in action.

Installation

You can install the retro-react package using npm or yarn:

npm install retro-react

or

yarn add retro-react

Usage

You can import the components from the retro-react package and use them in your React application as follows:

import React from 'react';
import {
	Alert,
	Box,
	Button,
	Card,
	Chip,
	Container,
	Input,
	Modal,
	ProgressBar,
	Text,
} from 'retro-react';

const App = () => {
	return (
		<div>
			<Button>Click me</Button>
			<Container>{/* Your content here */}</Container>
			<Input placeholder="Enter text" />
			<Box>Box content</Box>
			<Card header="Header" footer="Footer">
				{/* Card content */}
			</Card>
			<Text variant="h1">Hello, world!</Text>
			<Modal open={true}>{/* Modal content */}</Modal>
			<ProgressBar value={50} />
			<Chip color="primary">Chip</Chip>
			<Alert open={true} color="success">
				{/* Alert content */}
			</Alert>
		</div>
	);
};

export default App;

Components

Please refer to the demo for a complete list of components and their props.

Global styles

Every component in React Retro UI has a retro-ui class name attached. This makes it easy to apply global styling to all components. For instance, you can change the font family of all components by adding the following CSS to your main stylesheet:

.retro-ui {
	font-family: 'Roboto', sans-serif !important;
}

sx prop

All components in React Retro UI support the sx prop, which allows you to add custom styles to the component. The sx prop accepts an object with CSS properties and values. For more information on the sx prop, please refer to the documentation.

<Button sx={{ backgroundColor: 'red' }}>Click me</Button>
<Text sx={{ color: 'blue' }}>Hello, world!</Text>
<Container sx={{ border: '1px solid black', width: '100vh' }}>{/* Your content here */}</Container>

Styling

Emotion is used for styling the components. You can create your own components by using the styled function from Emotion or use the theme values using the useTheme hook. For more information on styling, please refer to this documentation.

import React from 'react';
import { styled, useTheme } from 'retro-react';

const StyledButton = styled('button')`
	background-color: ${(props) => props.theme.colors.primary};
	color: ${(props) => props.theme.colors.white};
`;

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! People who want to contribute to this project can open an issue or submit a pull request here. If you are dedicated to contributing to this project, you can also contact me there.

1.3.11

6 months ago

1.3.10

8 months ago

1.3.7

9 months ago

1.2.8

11 months ago

1.3.6

9 months ago

1.2.7

12 months ago

1.3.5

10 months ago

1.3.4

10 months ago

1.3.3

10 months ago

1.3.2

10 months ago

1.3.1

11 months ago

1.3.0

11 months ago

1.3.9

8 months ago

1.3.8

8 months ago

1.2.9

11 months ago

1.2.10

11 months ago

1.2.0

1 year ago

1.0.2

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.2.6

12 months ago

1.2.5

12 months ago

1.0.7

1 year ago

1.2.4

12 months ago

1.0.6

1 year ago

1.2.3

12 months ago

1.0.5

1 year ago

1.2.2

1 year ago

1.0.4

1 year ago

1.2.1

1 year ago

1.0.3

1 year ago

1.0.7-beta.1

1 year ago

1.1.0-alpha.1

1 year ago

1.1.0-beta.2

1 year ago

1.1.0-beta.1

1 year ago

0.0.0

1 year ago

1.1.0-beta.3

1 year ago

0.0.1

3 years ago