Skip to content

Releases: nextui-org/tailwind-variants

v0.2.1

15 Mar 11:57
Compare
Choose a tag to compare

What's Changed

  • fix: Support false-only variant with fallback behaviour by @lrholmes in #159
  • update version to match release by @ben-hapip in #162
  • fix: VariantProps doesn't type responsiveVariants in global configuration by @hoangdevnull in #160
  • fix: adjust path for types by @Gomah in #164
  • feat(transformer): support custom aliases by @Gomah in #169
  • fix: support multi-level extend for compoundVariants by @mskelton in #170

New Contributors

Full Changelog: v0.2.0...v0.2.1

v0.2.0

11 Feb 03:13
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.20...v0.2.0

v0.1.20

03 Jan 12:47
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.19...v0.1.20

v0.1.19

16 Dec 15:40
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.18...v0.1.19

v0.1.18

28 Oct 15:08
Compare
Choose a tag to compare

What's Changed

  • feat: add createTV utility to create a tv function from a config by @mskelton in #121

Full Changelog: v0.1.17...v0.1.18

v0.1.17

27 Oct 00:53
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.16...v0.1.17

v0.1.16

24 Oct 01:50
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.15...v0.1.16

v0.1.15

23 Oct 22:49
Compare
Choose a tag to compare

What's Changed

  • fix: The compoundSlots does not accept an array in the property by @Alex-Programmer-Bro in #99
  • fix: align class value with tailwind-merge by @marbemac in #89
  • fix: prevent extend from modifying extended slots by @mskelton in #106
  • feat: support goto definition for slots by @mskelton in #116

New Contributors

  • @Alex-Programmer-Bro made their first contribution in #99
  • @marbemac made their first contribution in #89

Full Changelog: v0.1.14...v0.1.15

v0.1.14

02 Sep 15:40
Compare
Choose a tag to compare

What's Changed

  • fix: support false variants when using compoundSlots by @mskelton in #83
  • feat: Add support for slot level variant overrides by @mskelton in #82

Slots Variant Overrides

This is useful in a variety of situations:

  1. Component libraries that provide slot level class name functions:
    const {base,tab} = tv({...})
    
    <Tabs className={() => base()}>
      <Tab className={({ isSelected }) => tab({isSelected})}>
        Settings
      </Tab>
    </Tabs>
  2. Reusing styles for vary similar components.
    const {base,item} = tv({...})
    
    <Nav className={base()}>
      <NavItem className={item({isActive: activeItem === 'foo'})}>foo</NavItem>
      <NavItem className={item({isActive: activeItem === 'bar'})}>bar</NavItem>
    </Nav>

Full Changelog: v0.1.13...v0.1.14

Huge thanks to @mskelton and @tianenpang 🙏🏻

v0.1.13

11 Jul 21:00
Compare
Choose a tag to compare

What's Changed

New Benchmark

TV without slots & tw-merge (enabled) x 452,002 ops/sec ±0.28% - 6.57% (% speed increased)
TV without slots & tw-merge (disabled) x 558,383 ops/sec ±0.60% - 17.41% (% speed increased)
TV with slots & tw-merge (enabled) x 311,351 ops/sec ±0.68% (99 runs sampled) - 8.01% (% speed increased)
TV with slots & tw-merge (disabled) x 359,928 ops/sec ±0.81% (93 runs sampled) - 8.61% (% speed increased)
TV without slots & custom tw-merge config x 429,622 ops/sec ±1.60% (95 runs sampled) - 4.42% (% speed increased)
TV with slots & custom tw-merge config x 393,804 ops/sec ±0.84% (96 runs sampled) - 4.94% (% speed increased)

Fastest is TV without slots & tw-merge (disabled)

New Contributors

Full Changelog: v0.1.12...v0.1.13