# clsx v2.1.0 - Product: clsx (https://whatsnew.fyi/product/clsx) - Vendor: Luke Edwards - Date: 2023-12-29 - Version: v2.1.0 - Original notes: https://github.com/lukeed/clsx/releases/tag/v2.1.0 - Permalink: https://whatsnew.fyi/product/clsx/releases/v2.1.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- ##### Features - Add new `clsx/lite` submodule for `string`-only usage: 1a49142 _This is a **140b** version of `clsx` that is ideal for Tailwind and/or React contexts, which typically follow this `clsx` usage pattern:_ ```js clsx('foo bar', props.maybe && 'conditional classes', props.className); ``` > **Important:** This `clsx/lite` module **ignores all non-string arguments** and is therefore not a 1:1 replacement for `clsx` itself! ```js import { clsx } from 'clsx'; import { clsx as lite } from 'clsx/lite'; // strings-only usage is identical clsx('foo', null, 'bar', true && 'baz'); //=> "foo bar baz" lite('foo', null, 'bar', true && 'baz'); //=> "foo bar baz" // clsx/lite ignores all non-strings clsx('foo', { a: true, b: false, c: true }); //=> "foo a c" lite('foo', { a: true, b: false, c: true }); //=> "foo" ``` --- > **Full Changelog**: https://github.com/lukeed/clsx/compare/v2.0.1...v2.1.0