
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-chevron
Advanced tools

No more '>' in your button, no more complicated image customization.
Insert chevron image that perfectly fits with sibling text by the super-light library, which doesn't have any peer dependencies.
$ yarn add react-chervron
The React-chevron supports TypeScript.

import Chevron from 'react-chevron'
...
const myComponent = (...) => {
...
return (
<div>
More Info <Chevron/>
</div>
)
}
Import and use. That's it!


import Chevron from 'react-chevron'
...
const myComponent = (...) => {
...
return (
<>
<div style={ { 'fontSize': '24px' } }>
More Info <Chevron/>
</div>
<div style={ { 'color': '#bb0000' } }>
More Info <Chevron/>
</div>
</>
)
}
As explained above, you don't have to customize chevron size. It will be automatically fit with sibling text.
*Inline styles are for the convenience of creating examples. You may use a CSS file or a Styled Component at all.

import Chevron from 'react-chevron'
...
const myComponent = (...) => {
...
return (
<>
<div>
Four directions available
<Chevron/>
<Chevron direction={'right'}/>
<Chevron direction={'down'}/>
<Chevron direction={'up'}/>
<Chevron direction={'left'}/>
</div>
</>
)
}
Four direction options are available. The default direction is 'right'.

import Chevron from 'react-chevron'
import 'myStyle.css'
...
const myComponent = (...) => {
...
return (
<div>
More Info <Chevron className="tilt"/>
</div>
)
}
/* myStyle.css */
.tilt svg {
transform: rotate(30deg);
}
As same as other react components, you can pass className as props.
⚠️ Be aware the <span> that wrapping svg exists.

import Chevron from 'react-chevron'
import 'myStyle.css'
...
const myComponent = (...) => {
...
const [ reversed, setReversed ] = useState<boolean>(false)
return (
<div onClick={() => setReversed(!reversed) }>
More Info <Chevron reversed={ reversed }/>
</div>
)
}
You can toggle direction as opposed by toggle status.
Open License 😎
You can use it for commercial, non-commercial either without any charge.
Also, there is no need to specify the author's name separately.
Author: blueStragglr (Oortcloud1599@gmail.com) [https://bluestragglr.com]
FAQs
The chevron component that works as inline character in React
We found that react-chevron 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.