1.0.111 • Published 8 months ago
hashui v1.0.111
hashui - UI Component Library
hashui
is a simple and customizable UI component library built with React. It provides reusable components like buttons and icons to speed up your development process.
Features
- Button Component: A customizable button with
onPress
event handler. - Icon Components: A set of vector icons to use within your React app, with customizable properties like
size
,color
,stroke
, etc.
Installation
To install hashui
, run the following command:
npm install hashui
Or if you're using Yarn:
yarn add hashui
Usage
Button Component
You can use the Button
component to display a clickable button. Here's an example:
import React from 'react';
import { Button } from 'hashui';
export default function MyComponent() {
return (
<Button onPress={() => alert('Button clicked!')}>
Click Me!
</Button>
);
}
Icon Component
The LlIcon
component allows you to render an icon. You can customize the size, color, and stroke attributes.
import React from 'react';
import { LlIcon } from 'hashui/icons';
export default function MyComponent() {
return (
<div>
<LlIcon
size={48}
color="red"
stroke="black"
strokeWidth={1}
strokeLinecap="butt"
strokeLinejoin="miter"
/>
</div>
);
}
Available Props
Button
onPress
: Function to be called when the button is clicked.
LlIcon
size
: Icon size (in px).color
: Icon color (CSS color value).stroke
: Stroke color for the icon.strokeWidth
: Width of the icon's stroke.strokeLinecap
: Shape of the end of the stroke (butt
,round
, orsquare
).strokeLinejoin
: Shape of the join between two segments of the stroke (miter
,round
, orbevel
).
License
This project is licensed under the MIT License - see the LICENSE file for details.