Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A higher-order react component enabling container queries today

License

NotificationsYou must be signed in to change notification settings

VinSpee/react-container-query-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm package

Usage

  1. npm i -D react-container-query-container
  2. initialize thecontainer queriesprolyfillonce in the top of your app. (setpostcss: true if you're using thepostcss-plugin):
    import ContainerQueryContainer, { cq } from 'react-container-query-container';const cqAPI = cq({ postcss: true });
  3. decorate your component with the higher-order component, passing an optionalcallback to execute when the component is reevaluated:
    @ContainerQueryContainer({cqAPI,componentShouldReevaluate: () => console.log('reevaluated.'),})class DemoComponent extends Component { …

Welcome to the future!

Collaborating on this React component:

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone https://github.com/VinSpee/react-container-query-container.git this repository
  • change into the new directory
  • npm install

Running / Development

Running Tests

  • nwb test will run the tests once
  • nwb test --server will run the tests on every change

Building

  • nwb build

About

A higher-order react component enabling container queries today

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp