Atomize Environment Support
masterAtomize is designed to work across various environments, including:
- Browsers: Modern browsers and Internet Explorer 9+
- Rendering: Supports Server-side Rendering (SSR)
- Desktop: Electron
repository·master·Indexed 23 days ago
https://github.com/proksh/atomizeA UI design system for React JS providing components for building web applications. Version 1.0.21 supports modern browsers, Internet Explorer 9+, Server-side Rendering (SSR), and Electron. The library includes layout components (Container, Row, Col, Div), form elements (Button, Input, Checkbox), overlays (Modal, SideDrawer, Notification, Dropdown), and a comprehensive SVG icon set.
Atomize is designed to work across various environments, including:
To clone the repository and run the development environment locally:
git clone git@github.com:Proksh/atomize.gitcd atomizenpm install // or yarnnpm startOnce started, visit http://localhost:8080 in your browser.
$ git clone git@github.com:Proksh/atomize.git
$ cd atomize
$ npm install // or yarn
$ npm startTo use Atomize in your React project, you must install both atomize and react-transition-group as dependencies.
Using npm:
npm install atomize react-transition-groupUsing yarn:
yarn add atomize react-transition-groupAfter installation, you can import components directly from the atomize package. Here is a basic example of rendering a Button component:
import { Button } from "atomize";
ReactDOM.render(<Button />, mountNode);The Modal component is a React component used to display content in an overlay. It includes a semi-transparent backlayer and automatically manages body scroll behavior (disabling it when open and re-enabling it when closed).
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen | boolean | Required | Controls the visibility of the modal. |
onClose | function | () => {} | Callback function triggered when the modal overlay is clicked. |
align | string | 'start' | Alignment for the modal content within the flex container. |
onEntering | function | undefined | Callback function executed when the modal begins its entering transition. |
onExiting | function | undefined | Callback function executed when the modal begins its exiting transition. |
children | ReactNode | Required | The content to be rendered inside the modal container. |
...rest | object | N/A | Any additional props are passed down to the inner Div container that wraps the children. |
When passing extra props via ...rest, the following defaults are applied to the inner content Div:
m: { y: { xs: "1rem", lg: "2rem" }, x: { xs: "1rem", lg: "auto" } }p: "2rem"maxW: "32rem"w: "100%"pos: "relative"shadow: "4"cursor: "default"ThemeProvider to enable theme-aware styling for atomize components. This allows you to inject custom theme configurations into the component lifecycle.The Notification component is a React component used to display transient messages. It features built-in entrance and exit transitions and automatically triggers the onClose callback 2000ms after the entering transition completes.
To control visibility, use the isOpen prop. To handle the component's removal from the UI, provide an onClose function. You can also pass prefix and suffix elements to be rendered around the main content.
The SideDrawer component is a React component used to display a sliding panel (drawer) from the right side of the screen. It includes a semi-transparent backlayer (overlay) that, when clicked, triggers the onClose callback. When the drawer is open, the component automatically disables body scrolling to prevent background scrolling.
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen | boolean | Required | Controls the visibility of the drawer. |
onClose | function | () => {} | Callback function triggered when the backlayer is clicked. |
onEntering | function | undefined | Custom callback triggered when the drawer starts opening. |
onExiting | function | undefined | Custom callback triggered when the drawer starts closing. |
children | ReactNode | Required | The content to be rendered inside the drawer. |
w | object/string | { xs: '100vw', sm: '24rem' } | The width of the drawer (supports responsive object syntax). |
bg | string | 'white' | The background color of the drawer content. |
p | string | '1.5rem' | The padding of the drawer content. |
pos | string | 'relative' | The position property for the inner content container. |
Note: The component uses react-transition-group for animations with a fixed duration of 300ms.
The iconPaths object provides a collection of React components that render SVG <path> elements. Each icon component accepts a color prop to set the fill attribute and allows spreading other standard SVG props (like className, style, or onClick) via a ...rest parameter.
Commonly available icons include:
AddAlert, AlertSolidAttachmentBackBagBehanceBookmark, BookmarkSolidBulkCamera, CameraSolidCardCheckedClose, CloseSolidCoinCrossDelete, DeleteSolidDotDown, DownArrow, DownArrowCircle, DownArrowSolidDownloadDraftDribbbleEdit, EditSolidEmailExpandExternalEye, EyeSolidFacebookFolder, FolderSolidThe atomize library provides a collection of UI components (atoms) and utility functions. You can import these directly from the main entrypoint.
Available components include:
StyleReset, Container, Row, Col, DivText, Image, Tag, AnchorButton, Input, Textarea, Label, Checkbox, Radiobox, SwitchCollapse, Modal, SideDrawer, Notification, DropdownIcon (and iconPaths for raw path data)Available utility functions:
scrollTo: For programmatic scrolling.currentDevice: To detect the current device type.Core Providers:
ThemeProvider: For managing theme context.Icon component for rendering icons and an iconPaths object containing the raw path data for the available icons. Use the Icon component to display visual indicators within your UI.<path> elements. Each icon component accepts a color prop to set the fill attribute and spreads other props (...rest) onto the underlying <path> element, allowing for standard SVG attributes like className, style, or onClick.