A library of components based on the concept of neumorphism
npm install --save neumorphic-ui
NeuHeading is a component by which you can put interactive headings in your web pages.
This component accepts 3 props:
text
- text which you want as a headingfontSize
- font-size of heading (in px)fontWeight
- font-weight of heading
import { NeuHeading } from 'neumorphic-ui';
class Example extends Component {
render () {
return (
<NeuHeading text="Neumorphic UI" fontSize="128px" fontWeight="900" />
)
}
}
NeuButton is a component which is equivalent to Button component in other libraries.
This component accepts 1 prop:
text
- text which you want as text in button
import { NeuButton } from 'neumorphic-ui';
class Example extends Component {
render () {
return (
<NeuButton text="Neumorphic UI" />
)
}
}
NeuCard is a component which is equivalent to Card component in other libraries.
This component accepts 3 props:
children
- This represents children of Card. You do not need to pass this prop explicilty toNeuCard
component. Instead just wrap child components inNeuCard
opening and closing tags.width
- width of the card (px or percentages)height
- height of the card (px or percentages)
import { NeuCard } from 'neumorphic-ui';
class Example extends Component {
render () {
return (
<NeuCard width="350px" height="320px">
...Child components
</NeuCard>
)
}
}
NeuInput is a component which you can use as an input field.
This component accepts 4 props:
width
- width of input field (in px or %)placeholder
- placeholder value of input fieldvalue
- value of input fieldonChange
- function which you want to pass to interact with changes in input field
import { NeuInput } from 'neumorphic-ui';
class Example extends Component {
constructor(props){
super(props);
this.state = {
value: ""
}
}
render () {
return (
<NeuInput width="96%" onChange={e => this.setState({value:e.target.value})} placeholder="Neumorphic Input" value={this.state.value} />
)
}
}
NeuProgressBar is a component which you can use as a progress bar.
This component accepts 1 prop:
progress
- progress of input field (in %)
import { NeuProgressBar } from 'neumorphic-ui';
class Example extends Component {
render () {
return (
<NeuProgressBar progress="80%" />
)
}
}
NeuReaction is a component which you can use as a reaction button.
This component accepts 2 props:
size
- size of reaction button (in px)children
- This represents children of NeuReaction component. You do not need to pass this prop explicilty toNeuReaction
component. Instead just wrap child components inNeuReaction
opening and closing tags.
import { NeuReaction } from 'neumorphic-ui';
class Example extends Component {
render () {
return (
<NeuReaction ><img src={like} width="30px" height="30px"></NeuReaction>
)
}
}
Suggestions and contributions are welcome. If you can by any means improve the library, just reach out to me at anyone of my social media platforms. Also, ou can email me at : [email protected]
(My personal website)[https://saeeddev.netlify.com/]
MIT ยฉ dev-saeed