compon-css
v1.0.36
Published
It is our costamize CSS library where you will be aable to access different CSS framework
Downloads
7
Maintainers
Readme
It is our costamize CSS library where you will be aable to access different CSS framework
Compon-CSS
Compon-CSS is a collection of reusable React components with styles powered by Tailwind CSS and Bootstrap.
Installation
npm install compon-css
Components
Button
A simple button component.
import { Button } from 'compon-css'; function TypesExample() { return ( <>
</>
); }
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>
<button type="button" class="btn btn-link">Link</button>
Card
<div class="card" style="width: 18rem;">
<img src="..." class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Columns
A component for creating responsive columns.
import { Columns } from 'compon-css';
const MyComponent = () => {
return (
<Columns>
<div>Column 1</div>
<div>Column 2</div>
</Columns>
);
};
Footer
A simple footer component.
import { Footer } from 'compon-css';
const MyComponent = () => {
return <Footer>Copyright © 2023 My Company</Footer>;
};
Forms
A collection of form-related components.
import { Forms } from 'compon-css';<form>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
<div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me out</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
Grid
A grid layout component.
import { Grid } from 'compon-css';
const MyComponent = () => {
return (
<div class="container">
<div class="row">
<div class="col">
Column
</div>
<div class="col">
Column
</div>
<div class="col">
Column
</div>
</div>
</div>
);
};
Header
A simple header component.
import { Header } from 'compon-css';
const MyComponent = () => {
return <Header>My Website</Header>;
};
Label
A label or badge component.
import { Label } from 'compon-css';
const MyComponent = () => {
return <Label>New</Label>;
};
Slider
A slider or range input component.
import { Slider } from 'compon-css';
const MyComponent = () => {
return <Slider min={0} max={100} value={50} />;
};
Alert Modal Component
The Alert Modal component provides a simple way to display alert messages in a modal dialog.
import { AlertModal } from 'compon-css';
// Inside your component
<AlertModal
show={true} // Set to true to display the modal
title="Alert Title"
message="This is an important message!"
onClose={() => handleModalClose()} // Callback function for modal close
/>
Props
show
(boolean): Controls the visibility of the modal.title
(string): The title of the alert modal.message
(string): The main message to be displayed in the modal.onClose
(function): Callback function triggered when the modal is closed.
Navbar Component
The Navbar component provides a navigation bar for your application.
import { Navbar } from 'compon-css';
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
<ul class="nav">
<li class="nav-item">
<a class="nav-link active" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>