Socket
Book a DemoInstallSign in
Socket

@css-hooks/react

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@css-hooks/react

CSS Hooks for React

Source
npmnpm
Version
0.8.0
Version published
Weekly downloads
166
147.76%
Maintainers
1
Weekly downloads
 
Created
Source

CSS Hooks CSS Hooks

Build Status Latest Release License

Overview

Hooks bring CSS features to native inline styles, enabling you to target various states such as hover, focus, and active, all without leaving the style prop. For example, hooks can easily solve the common use case of applying state-driven styles to a link:

<a
  href="https://css-hooks.com/"
  style={hooks({
    color: "#03f",
    hover: {
      color: "#09f",
    },
    active: {
      color: "#e33",
    },
  })}
>
  Hooks
</a>

Notably, the hooks function is pure. It simply returns a flat style object that is compatible with the style prop, creating dynamic property values that change under various conditions through CSS variables.

Documentation

Please visit css-hooks.com to get started.

Packages

Contributing

Contributions are welcome. Please see the contributing guidelines for more information.

License

CSS Hooks is offered under the MIT license.

FAQs

Package last updated on 13 Sep 2023

Did you know?

Socket

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