
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-equalizer
Advanced tools
Pure React component which equalizes heights of components.
npm install --save react-equalizer
This is a basic example which equalizes height of child components.
<Equalizer>
<div>Child 1</div>
<div>Child 2</div>
<div>Child 3</div>
</Equalizer>
| Prop | Default | Description |
|---|---|---|
property
|
height
|
The style property used when setting height. Usually height, maxHeight or minHeight.
|
byRow
|
true
| By default Equalizer will attempt to take into account stacking by matching rows by their window offset. |
enabled
|
(component, node) => true
|
Takes a function that returns true or false and can be used to disable Equalizer. Useful if you want to disable Equalizer when something changes such as window width or height based on a media query..
|
nodes
|
| Function which returns nodes to equalize. By default Equalizer only measures the heights of its direct descendants. |
<Equalizer
byRow={false}
property="maxHeight"
enabled={() => window.matchMedia("(min-width: 400px)").matches}>
<div>Child 1</div>
<div>Child 2</div>
<div>Child 3</div>
</Equalizer>
This can be useful if you want to equalize components other than direct descendants.
class MyComponent extends Component {
getNodes(equalizerComponent, equalizerElement) {
return = [
this.refs.node1,
this.refs.node2,
this.refs.node3
]
}
render() {
return(
<Equalizer nodes={this.getNodes.bind(this)}>
<div ref="node1"></div>
<div>
<div ref="node2"></div>
</div>
<div ref="node3"></div>
</Equalizer>
)
}
}
http://jsbin.com/ceyumumuye/edit?js,output
Grab the latest source and in the project directory run:
npm install
npm test
FAQs
Pure React Match Height Component
The npm package react-equalizer receives a total of 693 weekly downloads. As such, react-equalizer popularity was classified as not popular.
We found that react-equalizer 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.