
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-kindness
Advanced tools
A lightweight, fully-customizable kind screen guide for React

To install
$ npm install --save react-kindness
Put this somewhere in your component tree,
import {KindnessPanel, Kindness} from 'react-kindness';
import 'react-kindness/dist/index.css';
// ...
<KindnessPanel enabled={this.state.show}
onExit={() => this.setState({show: false})} />
then point out some elements that you want your guests to focus on
<Kindness>
<input type="text" {...} />
</Kindness>
<Kindness message="Click here to submit your post!">
<button type="submit">Submit</button>
</Kindness>
When the <KindnessPanel /> becomes enabled={true}, the screen guide starts.
<KindnessPanel />type SeriesId = string;
type KindnessPanelProps = {|
enabled: boolean,
onExit: () => void,
shape?: 'circle' | 'rect', // 'circle' by default
initialIndex?: number, // 0 by default
children?: (KindnessPanelContentArgs) => React.Component,
seriesId?: SeriesId, // 'default' by default
onClickOutside?: () => ?boolean, // () => {} by default.
// If false was returned, react-kindness
// tries to disable user interactions.
|};
<Kindness />type KindnessProps = {|
children: mixed,
shape?: 'circle' | 'rect', // Use <KindnessPanel shape={} /> by default and being able to override it
title?: mixed, // null by default
message?: mixed, // null by default
order?: number | 'auto', // 'auto' by default
seriesId?: SeriesId, // 'default' by default
|}
By default <KindnessPanel /> uses <KindnessPanelContent /> internally. By passing a function as a child, you can customize the content.
<KindnessPanel enabled={true}>
{
({totalSize, currentIndex, goPrev, goNext}) => (
<div>
<h3>{`This is ${currentIndex + 1} of ${totalSize} item.`}</h3>
<button onClick={goPrev}>Go previous</button>
<button onClick={goNext}>Go next</button>
</div>
)
}
</KindnessPanel>
Properties of the argument is these:
type KindnessPanelContentArgs = {|
title: mixed,
message: mixed,
totalSize: number,
currentIndex: number,
goPrev: () => void,
goNext: () => void,
skip: () => void,
goIndex: (number) => void,
transitionEmitter: EventEmitter,
|};
<Kindness />When you pass a function to <Kindness /> as a child, you can use additional variables.
<Kindness>
{ (focused) => <div style={focused && {fontWeight: 'bold'}}>yeah</div> }
</Kindness>
onClickOutside of <KindnessPanel />onClickOutside<Kindness shape={'circle'|'rect'} /> with smooth spot transition of each<Kindness />MIT
FAQs
A lightweight, fully-customizable kind screen guide for React
We found that react-kindness demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.