Socket
Socket
Sign inDemoInstall

@types/classnames

Package Overview
Dependencies
0
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/classnames

Type definitions for classnames from https://www.github.com/DefinitelyTyped/DefinitelyTyped


Version published
Weekly downloads
1.3M
increased by5.72%
Maintainers
1
Install size
3.30 kB
Created
Weekly downloads
 

Package description

What is @types/classnames?

The @types/classnames package provides TypeScript type definitions for the classnames library, which is a utility for conditionally joining classNames together. This package is useful for TypeScript users who want to ensure type safety when using classnames to dynamically generate class strings based on certain conditions.

What are @types/classnames's main functionalities?

Basic usage with strings

Combine multiple class names into a single string.

classNames('foo', 'bar'); // 'foo bar'

Using objects to conditionally apply classes

Apply classes based on the truthiness of the associated value.

classNames({ 'foo': true, 'bar': false }); // 'foo'

Combining types

Mix strings and objects to conditionally apply classes.

classNames('foo', { 'bar': true }, 'baz', { 'qux': false }); // 'foo bar baz'

Using arrays

Pass arrays of class names to be joined together.

classNames(['foo', 'bar'], ['baz']); // 'foo bar baz'

Other packages similar to @types/classnames

Readme

Source

Installation

npm install --save-dev @types/classnames

Summary

This package contains type definitions for classnames.

The project URL or description is https://github.com/JedWatson/classnames

Credits

These definitions were written by Dave Keen http://www.keendevelopment.ch, Adi Dahiya https://github.com/adidahiya, Jason Killian https://github.com/JKillian.

Details

Typings were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/classnames

Additional Details

  • Last updated: Thu, 19 May 2016 20:05:35 GMT
  • Typings kind: Mixed
  • Library Dependencies: none
  • Module Dependencies: none
  • Global values: classNames

FAQs

Last updated on 19 May 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc