@shared-cms/button-react-standalone-ssr-safe
v1.0.14
Published
SSR-safe Button React component from Shared CMS UI library
Maintainers
Readme
React UI Components Standalone Bundle
This is a standalone bundle that includes all Shared CMS UI components in a single package. No external dependencies required for the components themselves.
Installation
npm install @shared-cms/ui-react-standaloneUsage
For React Bundle (Selected)
import { ReactSharedAlert, ReactSharedButton, ReactSharedBadge } from "@shared-cms/ui-react-standalone";
import "@shared-cms/ui-react-standalone/style.css";
function App() {
return (
<div>
<ReactSharedAlert message="Hello from React!" variant="info" />
<ReactSharedButton variant="primary">Click me</ReactSharedButton>
<ReactSharedBadge variant="success">New</ReactSharedBadge>
</div>
);
}For Lit Bundle (Not this package)
import { SharedAlert, SharedButton, SharedBadge } from "@shared-cms/ui-react-standalone";
import "@shared-cms/ui-react-standalone/style.css";
// Use in any framework or vanilla JavaScript
const alert = document.createElement('shared-alert');
alert.message = 'Hello from Lit!';
alert.variant = 'info';
document.body.appendChild(alert);Available Components
- Alert: Display alert messages with different variants (info, success, warning, error)
- Button: Customizable buttons with various styles and states
- Badge: Small status indicators and labels
Features
- 🚀 All components included - No need to install individual packages
- 💨 Zero dependencies - Components are fully self-contained
- 🎨 Styled with TailwindCSS - Consistent design system
- 📱 Responsive design - Works on all screen sizes
- 🔧 TypeScript support - Full type definitions included
- 🎯 Framework agnostic - Lit components work with any framework
Styling
Include the CSS file in your application:
import "@shared-cms/ui-react-standalone/style.css";The bundle includes all necessary styles for all components.
Peer Dependencies
- React >= 16.8.0
- React-DOM >= 16.8.0
License
MIT License - see LICENSE file for details.
