react-x-ray

CSS layout debugger component

MIT 5 个版本
安装
npm install react-x-ray
yarn add react-x-ray
pnpm add react-x-ray
bun add react-x-ray
README

React X-Ray

React CSS Layout Debugger

demo

npm i react-x-ray

Demo: http://jxnblk.com/react-x-ray

Usage

import React from 'react'
import XRay from 'react-x-ray'

const App = props => (
  <XRay>
    <div style={{ padding: 32 }}>
      <h1>Look at me!</h1>
    </div>
  </XRay>
)

Props

  • grid (number or boolean) pixel dimensions of background grid
  • outline (boolean) show element outlines
  • center (boolean) center the background grid
  • color (string) base color for grid and outlines
  • backgroundColor (string) background color of XRay component

Inspired by Tachyons X-RAY

MIT License

版本列表
1.0.0-4 2017-12-13
1.0.0-3 2017-09-23
1.0.0-2 2017-06-11
1.0.0-1 2017-05-30
1.0.0-0 2017-05-30