New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dynascale

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynascale

![NPM Version](https://img.shields.io/npm/v/dynascale) ![NPM Last Update](https://img.shields.io/npm/last-update/dynascale) ![NPM Type Definitions](https://img.shields.io/npm/types/dynascale) ![NPM Downloads](https://img.shields.io/npm/dw/dynascale)

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

NPM Version NPM Last Update NPM Type Definitions NPM Downloads

Dynascale

A dynamic scaling component for React that automatically scales its children to fit within their container while maintaining aspect ratio.

Table of Contents

  • Dynascale

Features

  • Automatic Scaling: Scales content to always fit its container.
  • Aspect Ratio Preservation: Maintains the original aspect ratio of the content.

Installation

yarn add dynascale
# or
npm install dynascale

Usage

import React from 'react';
import { Dynascale } from 'dynascale';

const Example = () => (
  <div style={{ width: 400, height: 300, border: '1px solid #ccc' }}>
    <Dynascale margin={0.05} debug={true}>
      <div style={{ width: 600, height: 400, background: '#eee' }}>
        This content will always fit and scale!
      </div>
    </Dynascale>
  </div>
);

export default Example;

Props

NameTypeDefaultDescription
defaultScalenumber0Initial scale value.
minScalenumber0.1Minimum allowed scale factor.
marginnumber0Margin as a percentage (0–1) to leave around the scaled content.
classNamestring''Additional class names for the container.
debugbooleanfalseShow debug information overlay.
childrenReactNodeContent to be scaled.

License

This project is licensed under the MIT License.

Keywords

react

FAQs

Package last updated on 26 Feb 2026

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