xsans
v1.4.7
Published
React components with CLI for easy installation
Downloads
109
Maintainers
Readme
XSANS React Component Library
XSANS is a beautifully crafted React component library, built with Tailwind CSS, to help developers quickly build sleek and modern UIs. The library provides reusable components such as buttons, inputs, progress bars, and more, with built-in flexibility and customization options.
Features
- Customizable Components: Easily customizable with Tailwind CSS classes.
- Simple Integration: Quickly add components to your project using our CLI tool.
- Reusable UI Elements: A growing list of reusable, responsive, and accessible components.
Installation
You can install components individually using our npx xsans
CLI tool.
Install a Specific Component
To install a specific component (e.g., XButton
), use the following command:
```bash npx xsans add xbutton ```
This will install the required files and dependencies for the selected component.
Install All Components
To install the entire XSANS component library, you can run:
```bash npx xsans add all ```
This will install all available components under `src/xcomponents` in your project.
Getting Started
Prerequisites
Before using the XSANS components, make sure your project is set up with Tailwind CSS. If Tailwind CSS is not yet installed, follow the Tailwind CSS installation guide.
Example Usage
Here’s how you can use a component from XSANS:
- After running the installation command, import the desired component in your React project.
```jsx import XButton from '@xsans/xbutton';
const MyComponent = () => { return ( Click Me ); };
export default MyComponent; ```
- Tailwind CSS will automatically apply styles to XSANS components based on your project's configuration. You can further customize these components using additional Tailwind classes if needed.
```jsx Submit ```
Available Components
- XButton: Customizable button component with Tailwind CSS styling.
- XInput: Beautiful and accessible input field for forms.
- XProgress: A responsive progress bar component.
- More components are coming soon!
Available Scripts
After installing components, you can run the following scripts in your project:
`npm start`
Runs the app in development mode.\ Open http://localhost:3000 to view it in your browser.
The page will reload if you make edits.\ You will also see any lint errors in the console.
`npm run build`
Builds the app for production, including all installed XSANS components. The build will be optimized for best performance and ready for deployment.
Customization
XSANS components are designed to be flexible. You can easily customize the components by extending or overriding the default Tailwind CSS classes.
Example:
```jsx Custom Button ```
Contributions
We welcome contributions! If you'd like to add a new component or improve existing ones, feel free to submit a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Learn More
To learn more about Tailwind CSS, visit the official Tailwind documentation.
To learn more about React, check out the React documentation. """
Saving the content to README.md
file_path = "/mnt/data/README_XSANS.md" with open(file_path, "w") as f: f.write(readme_content)
file_path