Installations
npm install soda-material
Developer Guide
Typescript
Yes
Module System
ESM
Node Version
20.17.0
NPM Version
10.8.2
Score
63.8
Supply Chain
95.2
Quality
83.5
Maintenance
100
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (74.98%)
SCSS (24.49%)
JavaScript (0.32%)
CSS (0.2%)
Developer
Download Statistics
Total Downloads
5,150
Last Day
21
Last Week
728
Last Month
1,156
Last Year
3,869
GitHub Statistics
6 Stars
153 Commits
1 Watching
1 Branches
1 Contributors
Package Meta Information
Latest Version
0.0.29
Package Id
soda-material@0.0.29
Unpacked Size
4.51 MB
Size
1.21 MB
File Count
392
NPM Version
10.8.2
Node Version
20.17.0
Publised On
31 Aug 2024
Total Downloads
Cumulative downloads
Total Downloads
5,150
Last day
-86.2%
21
Compared to previous day
Last week
118.6%
728
Compared to previous week
Last month
1,382.1%
1,156
Compared to previous month
Last year
202%
3,869
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
31
Soda
A React(>=18) component library that may follow Material Design 3 (a.k.a. Material You)
Features:
- Less dependencies (bundled in npm package)
- Follow the Material You design
- Complete implementation of Material You components
- Keyboard accessibility
- Support both controlled and uncontrolled
[!WARNING]
Working in progress, API is unstable and can be changed in any time.
For production, you may want use the official material web component library or the MDUI library.
This is an experimental project, (best) browser support:
Chrome>=105, Safari>=15.4, Firefox>=121
The recommended browser is Chrome>=119
Installation
1npm install soda-material
1import React from 'react' 2import ReactDOM from 'react-dom/client' 3import 'soda-material/dist/style.css' // Note that you MUST import the style 4import { Button } from 'soda-material' 5 6ReactDOM.createRoot(document.getElementById('root')!).render( 7 <React.StrictMode> 8 <Button variant="outlined">Button</Button> 9 </React.StrictMode>, 10)
If bundle size is your concern, it's also possible to import only the specific component.
1import 'soda-material/dist/style.css' // Still need to import the style in some where 2import { Button } from 'soda-material/dist/components/button' 3import { Select } from 'soda-material/dist/composition/Select' 4 5export default function App() { 6 return ( 7 <> 8 <Button variant="text">Button</Button> 9 <Select options={['one', 'two', 'three']}></Select> 10 </> 11 ) 12}
Next.js is also supported out of the box.
[!TIP] This library is designed to maintain a small footprint, making it easy to integrate with other libraries in the ecosystem. For instance, it pairs well with Tailwind CSS, although this does not depend on it.
Documentation
See: https://soda.js.org
[!IMPORTANT]
Only components defined in the Material Design Docs will be put intosrc/components
directory, these components do NOT include heavy logic.
Other necessary components or helpers can be found atsrc/composition
directory.
[!NOTE]
Most components insrc/components
forwardref
attribute for library interactivity.
If has, it will be the root DOM node of the entire component.
If not, it will be documented and will be checked if you use typescript.
TODO
-
More ARIA support
-
More customizable CSS vars
Development
1npm install 2npm run storybook
Naming convention:
- A
.tsx
file with a capitalized beginning is a react component (exports the same name, no default export) - A
.scss
file will use hyphen to separate component name in the file name - In any css code, use underscore to separate component name, use hyphen to separate name segments
No vulnerabilities found.
No security vulnerabilities found.