@redis-ui/components 51.7.0 → 51.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,11 @@ The Redis UI component library — a themed, accessible React component library
|
|
|
7
7
|
Install the components package and its required peer dependencies:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install @redis-ui/components @redis-ui/styles @redis-ui/icons styled-components
|
|
10
|
+
npm install @redis-ui/components @redis-ui/styles @redis-ui/icons styled-components modern-normalize
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Peer dependencies: `react` and `react-dom` 18 or 19, `styled-components` 5, `@redis-ui/styles` 21.4 or later, `@redis-ui/icons` 8–10. For tables and charts, add [`@redis-ui/table`](https://www.npmjs.com/package/@redis-ui/table) and [`@redis-ui/charts`](https://www.npmjs.com/package/@redis-ui/charts).
|
|
14
|
+
|
|
13
15
|
## Setup
|
|
14
16
|
|
|
15
17
|
### 1. Import global styles
|
|
@@ -17,8 +19,9 @@ npm install @redis-ui/components @redis-ui/styles @redis-ui/icons styled-compone
|
|
|
17
19
|
Import the normalized styles and fonts from `@redis-ui/styles` in your app entry point:
|
|
18
20
|
|
|
19
21
|
```ts
|
|
22
|
+
import 'modern-normalize/modern-normalize.css';
|
|
20
23
|
import '@redis-ui/styles/normalized-styles.css';
|
|
21
|
-
import '@redis-ui/styles/fonts.css';
|
|
24
|
+
import '@redis-ui/styles/fonts.css'; // or fonts-next.css with themesNext, see below
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
### 2. Provide the theme and render global styles
|
|
@@ -41,6 +44,15 @@ function App() {
|
|
|
41
44
|
}
|
|
42
45
|
```
|
|
43
46
|
|
|
47
|
+
#### Choosing a theme bundle
|
|
48
|
+
|
|
49
|
+
`@redis-ui/styles` exports two bundles, each with `light` and `dark`:
|
|
50
|
+
|
|
51
|
+
- `themes` with `fonts.css`: the current (classic) Redis brand
|
|
52
|
+
- `themesNext` with `fonts-next.css`: the next brand, used by the Redis Ultra console
|
|
53
|
+
|
|
54
|
+
Use one bundle per app. Pass `themesNext.light` (or `.dark`) wherever the examples use `themes.light`, and import the matching fonts file. See [`@redis-ui/styles`](https://www.npmjs.com/package/@redis-ui/styles).
|
|
55
|
+
|
|
44
56
|
#### Dark mode support
|
|
45
57
|
|
|
46
58
|
For automatic light/dark mode switching with persistence, use the `SwitchableModeThemeProvider`:
|
|
@@ -76,4 +88,14 @@ function MyPage() {
|
|
|
76
88
|
</div>
|
|
77
89
|
);
|
|
78
90
|
}
|
|
79
|
-
```
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Documentation
|
|
94
|
+
|
|
95
|
+
- **Storybook**: every component with live examples, props tables and composition guides: https://redislabsdev.github.io/redis-ui/
|
|
96
|
+
- **Agent skill**: `skills/redis-ui-components` ships in this package, with a reference per component. See [Redis UI Skills](https://github.com/redislabsdev/redis-ui#redis-ui-skills) to link it into your project.
|
|
97
|
+
- **Release notes**: [GitHub Releases](https://github.com/redislabsdev/redis-ui/releases)
|
|
98
|
+
|
|
99
|
+
## Contributing
|
|
100
|
+
|
|
101
|
+
See [CONTRIBUTING.md](https://github.com/redislabsdev/redis-ui/blob/master/packages/components/CONTRIBUTING.md) for how components are built (Radix, folder structure, conventions, tests), and the [root README](https://github.com/redislabsdev/redis-ui) for Storybook, visual testing and releasing.
|