An open API service indexing awesome lists of open source software.

https://github.com/hiroppy/react-scalable

Fit your element with the outer frame
https://github.com/hiroppy/react-scalable

Last synced: about 2 months ago
JSON representation

Fit your element with the outer frame

Awesome Lists containing this project

README

          


react-scalable


Respect [Scalable](https://github.com/ScriptArtist/Scalable).

![](./images/readme.gif)

## Demo
https://abouthiroppy.github.io/react-scalable

## Install
```sh
$ npm i --save react-scalable
```

## Usage
```javascript
import React from 'react';
import Scalable from 'react-scalable';

const Component = () => (

Hello!



);
```

## Props

| Name | Default | Type | Description |
| ------------- | ------------- | ------------- | ------------- |
| align | center | center | left | right | An element's horizontal alignment |
| verticalAlign | center | center | top | bottom | An element's vertical alignment |
|containerHeight|fixed| fixed | auto| whether the element is fitted within content |
|minScale| N/A | number | an element's minimum scale |
|maxScale| N/A | number | an element's maximum scale |

## Development
```sh
$ npm i
$ npm start # start storybook
$ open http://localhost:8080
```