3.0.37 • Published 21 days ago

@smitch/fluid v3.0.37

Weekly downloads
-
License
MIT
Repository
-
Last release
21 days ago

Fluid UI

A Next.js/React UI component library.

Overview

Fluid UI is a comprehensive library of reusable UI components for Next.js/React applications. This library is designed to streamline the development process and ensure consistency across your projects.

Features

  • Reusable UI components
  • Built with React
  • Easy to integrate
  • Supports TypeScript

Getting Started

To use Fluid UI in your Next.js/React project, follow these steps:

1. Install Next.js and React

If you haven't set up your Next.js project yet, start by initializing it:

npx create-next-app@latest

When prompted:

  • Use TypeScript?: Select Yes to enable TypeScript in your project.
  • Use Tailwind CSS?: Select Yes to install and configure Tailwind CSS automatically.

Next.js will then generate the necessary configuration for both TypeScript and Tailwind CSS, including tsconfig.json, tailwind.config.js, and PostCSS setup.

2. Configure Tailwind

To ensure that Fluid UI works correctly, you need to configure Tailwind CSS and install the Tailwind Forms plugin. Follow the steps below:

1. Install Tailwind CSS Forms Plugin

You need to install the Tailwind CSS forms plugin for proper form styling:

npm install @tailwindcss/forms

2. Configure tailwind.config.js

Update your tailwind.config.js file to match the configuration below:

import type { Config } from 'tailwindcss'
/* Import colors if using Tailwind's color palette */
import colors from 'tailwindcss/colors'

const config: Config = {
    /* The selector strategy replaced the class strategy in Tailwind CSS v3.4.1.*/
	darkMode: 'selector',
	content: [
		'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
		'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
		'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
		/* Add this line: */
		 "./node_modules/@smitch/fluid/**/*.js",
	],
	theme: {
		extend: {
			colors: {
                /* Modify color values as desired to suit your theme */
				primary: {
					DEFAULT: colors.indigo[600],
					light: colors.indigo[300],
					dark: colors.indigo[900],
				},
				secondary: {
					DEFAULT: colors.gray[600],
					light: colors.gray[300],
					dark: colors.gray[900],
				},
				accent: {
					DEFAULT: colors.orange[500],
					light: colors.orange[300],
					dark: colors.orange[700],
				},
				neutral: colors.gray[400],
				dark: colors.gray[900],
				light: colors.gray[100],
				info: {
					DEFAULT: colors.sky[400],
					light: colors.sky[200],
					dark: colors.sky[600],
				},
				success: {
					DEFAULT: colors.green[600],
					light: colors.green[400],
					dark: colors.green[800],
				},
				warning: {
					DEFAULT: colors.amber[500],
					light: colors.amber[300],
					dark: colors.amber[700],
				},
				error: {
					DEFAULT: colors.red[600],
					light: colors.red[400],
					dark: colors.red[800],
				},
				danger: {
					DEFAULT: colors.red[600],
					light: colors.red[400],
					dark: colors.red[800],
				},
				current: 'currentColor',
				transparent: 'transparent',
			},
		},
	},
	plugins: [
        /* Tailwind Forms plugin for consistent form styling */
		require('@tailwindcss/forms')({
			strategy: 'class',
		}),
	],
}
export default config

Installation

npm install @smitch/fluid

Basic Usage

Now, you can import and use any Fluid UI component in your Next.js project:

import { Button } from '@smitch/fluid'

const App = () => (
  <Button>Click me</Button>
)

export default App

Optimized Usage

To ensure an optimized CSS build, create file fluid.ts and export components like so:

export {
  Heading,
  Loading,
  Pagination,
  Alert,
  Input,
  Select,
} from "@smitch/fluid";

Import into component:

import { Loading, Alert } from "@/lib/fluid";

Components

Buttons

  • Button
  • Close Button
  • Button Group

Inputs

  • Checkbox
  • Counter
  • File Upload
  • Input
  • Password Input
  • Radio Group
  • Range Input
  • Search Input
  • Select
  • Switch
  • Textarea
  • Text Input

Forms

  • Fieldset
  • Form
  • Label

Menus

  • Accordion
  • Breadcrumbs
  • Carousel
  • Drawer
  • Dropdown
  • NavBar
  • Pagination
  • Sidebar
  • Tabs

Feedback

  • Alert
  • Badge
  • Dialog
  • Loading
  • Progress
  • Ratings
  • Ticker
  • Toast

Media

  • Card
  • Figure
  • Gallery
  • Hero
  • Icon
  • Modal
  • PlaceHolder
  • Twitter Embed
  • Twitter Timeline
  • Video
  • Video Player
  • YouTube Embed

Typography

  • Blockquote
  • Codeblock
  • Heading

Data Visualization

  • Data Table
  • Pictogram
  • Line Chart
  • Bar Chart
  • Mixed Chart
  • Pie Chart
  • Doughnut Chart
  • Radar Chart
  • PolarArea Chart
  • Scatter Chart
  • Stat Bar

Time

  • Clock

Map

  • Map

Author

Fluid UI is developed and maintained by Stephen Mitchell.

2.0.3

7 months ago

2.0.2

7 months ago

2.0.5

7 months ago

2.0.4

7 months ago

2.0.7

7 months ago

2.0.6

7 months ago

2.0.8

7 months ago

2.0.1

7 months ago

2.0.0

8 months ago

3.0.12

3 months ago

3.0.10

5 months ago

3.0.11

5 months ago

3.0.16

3 months ago

3.0.17

3 months ago

3.0.14

3 months ago

3.0.15

3 months ago

2.1.9

7 months ago

2.4.16

7 months ago

2.4.15

7 months ago

2.2.11

7 months ago

2.2.10

7 months ago

3.0.4

6 months ago

3.0.3

6 months ago

3.0.2

6 months ago

3.0.1

6 months ago

3.0.8

5 months ago

3.0.7

6 months ago

3.0.6

6 months ago

3.0.5

6 months ago

3.0.0

6 months ago

2.5.16

7 months ago

2.5.17

7 months ago

3.0.23

2 months ago

3.0.24

2 months ago

3.0.21

3 months ago

3.0.22

3 months ago

3.0.27

2 months ago

3.0.28

2 months ago

3.0.25

2 months ago

3.0.26

2 months ago

3.0.20

3 months ago

2.1.8

7 months ago

3.0.18

3 months ago

3.0.19

3 months ago

3.0.9

5 months ago

3.0.34

1 month ago

3.0.35

1 month ago

3.0.32

1 month ago

3.0.33

1 month ago

3.0.36

23 days ago

3.0.37

21 days ago

2.2.9

7 months ago

3.0.30

2 months ago

3.0.31

1 month ago

2.3.13

7 months ago

2.3.12

7 months ago

2.3.15

7 months ago

2.3.14

7 months ago

3.0.29

2 months ago

2.3.11

7 months ago

1.2.0

8 months ago

0.3.100

8 months ago

1.1.0

8 months ago

1.0.0

8 months ago

0.3.97

8 months ago

0.3.96

8 months ago

0.3.95

8 months ago

0.3.94

8 months ago

0.3.93

8 months ago

0.3.92

8 months ago

0.3.91

8 months ago

0.3.99

8 months ago

0.3.98

8 months ago

0.3.90

8 months ago

0.3.86

8 months ago

0.3.85

8 months ago

0.3.89

8 months ago

0.3.88

8 months ago

0.3.87

8 months ago

0.3.84

8 months ago

0.3.83

8 months ago

0.3.82

8 months ago

0.3.75

9 months ago

0.3.77

8 months ago

0.3.76

8 months ago

0.3.73

9 months ago

0.3.64

9 months ago

0.3.63

9 months ago

0.3.62

9 months ago

0.3.61

9 months ago

0.3.60

9 months ago

0.3.69

9 months ago

0.3.68

9 months ago

0.3.67

9 months ago

0.3.66

9 months ago

0.3.65

9 months ago

0.3.53

9 months ago

0.3.52

9 months ago

0.3.51

9 months ago

0.3.50

9 months ago

0.3.59

9 months ago

0.3.58

9 months ago

0.3.57

9 months ago

0.3.56

9 months ago

0.3.55

9 months ago

0.3.54

9 months ago

0.3.49

9 months ago

0.3.48

9 months ago

0.3.47

9 months ago

0.3.46

9 months ago

0.3.45

9 months ago

0.3.44

9 months ago

0.3.31

10 months ago

0.3.30

10 months ago

0.1.11

1 year ago

0.1.12

1 year ago

0.1.13

1 year ago

0.1.14

1 year ago

0.3.39

9 months ago

0.3.17

12 months ago

0.3.38

9 months ago

0.3.16

12 months ago

0.3.37

9 months ago

0.3.15

12 months ago

0.3.36

9 months ago

0.3.14

12 months ago

0.3.35

9 months ago

0.3.34

9 months ago

0.3.33

10 months ago

0.3.32

10 months ago

0.3.29

10 months ago

0.3.20

12 months ago

0.3.41

9 months ago

0.3.40

9 months ago

0.3.28

10 months ago

0.3.25

11 months ago

0.3.24

12 months ago

0.3.23

12 months ago

0.3.22

12 months ago

0.3.21

12 months ago

0.3.19

12 months ago

0.3.18

12 months ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.72

2 years ago

0.1.71

2 years ago

0.1.7

2 years ago

0.1.604

2 years ago

0.1.603

2 years ago

0.1.602

2 years ago

0.1.601

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago