react-wrap-balancer

Simple React Component That Makes Titles More Readable

MIT License

Downloads
576K
Stars
3.8K

Bot releases are visible (Hide)

react-wrap-balancer - 1.1.1 Latest Release

Published by shuding 5 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/shuding/react-wrap-balancer/compare/1.1.0...1.1.1

react-wrap-balancer - 1.1.0

Published by shuding about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/shuding/react-wrap-balancer/compare/1.0.0...1.1.0

react-wrap-balancer - 1.0.0

Published by shuding over 1 year ago

V1.0 is here! Major new feature from this release is that <Balancer> will now switch to use the native CSS text-wrap: balance if it's available. This improves the runtime performance quite a lot!

With that, it's even more important to always add a <Provider> to your app as that makes the CSS feature detection logic shared across all <Balancer> components.

Lastly, if the native CSS balance is available, the ratio option will be ignored because that's not part of the text-wrap: balance standard.

What's Changed

New Contributors

Full Changelog: https://github.com/shuding/react-wrap-balancer/compare/0.5.0...1.0.0

react-wrap-balancer -

Published by shuding over 1 year ago

Highlights

nonce prop

Since React Wrap Balancer generates inlined script tags under the hood, you can now set the nonce prop for them:

<Balancer nonce="...">

// => <script nonce="...">

Support for React 16.8.0+

By adding a workaround for useId, we now have support for React 16.8.0+.

Bug fixes & Other Improvements

See the full changelog below.

What's Changed

New Contributors

Full Changelog: https://github.com/shuding/react-wrap-balancer/compare/0.4.1...0.5.0

react-wrap-balancer - 0.4.1

Published by shuding over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/shuding/react-wrap-balancer/compare/0.4.0...0.4.1

react-wrap-balancer - 0.4.0

Published by shuding over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/shuding/react-wrap-balancer/compare/0.3.0...0.4.0

react-wrap-balancer - 0.3.0

Published by shuding almost 2 years ago

Improvements

This new release has improved types for <Balancer>'s props (#14) and a critical bug fix when web font is used (#18) with a new API.
It's not breaking and recommended to upgrade.

If you have multiple <Balancer> components used, it’s recommended (but optional) to also use <Provider> to wrap the entire app. This will make them share the re-balance logic and reduce the HTML size:

import { Provider } from 'react-wrap-balancer'

// ...

function App() {
  return (
    <Provider>
      <MyApp/>
    </Provider>
  )
}

To learn more about the bug and the fix, check out #20.

What's Changed

New Contributors

Full Changelog: https://github.com/shuding/react-wrap-balancer/compare/0.2.4...0.3.0

react-wrap-balancer - 0.2.4

Published by shuding almost 2 years ago

What's Changed

Core

Website & Docs

New Contributors

Full Changelog: https://github.com/shuding/react-wrap-balancer/commits/0.2.4

Package Rankings
Top 1.47% on Npmjs.org
Badges
Extracted from project README
React Wrap Balancer - Simple React Component That Makes Titles More Readable