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

react-curved-text

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-curved-text

A library for creating circular / curved texts in React projects

latest
Source
npmnpm
Version
3.0.1
Version published
Weekly downloads
2.1K
-7.28%
Maintainers
1
Weekly downloads
 
Created
Source

react-curved-text

react-curved-text a library for creating circular / curved texts in React projects.

exampletext

Installation

react-curved-text requires:

  • React 18.0.0 or later
yarn add react-curved-text

or

npm install react-curved-text

Usage

import ReactCurvedText from 'react-curved-text';

const MyComponent = () => {
    return (
        <ReactCurvedText
            width={300}
            height={300}
            cx={150}
            cy={150}
            rx={100}
            ry={100}
            startOffset={50}
            reversed={false}
            text="react-curved-text"
            textProps={{ style: { fontSize: 24 } }}
            textPathProps={null}
            tspanProps={null}
            ellipseProps={null}
            svgProps={null}
        />
    );
};

export default MyComponent;

Examples

Checkout live examples on react-curved-text-demo page for various customizations.

Checkout a Live Example with Rotate Animation.

API

PropTypeRequiredDescription
textstringyesText to be displayed
widthnumberyesWidth of the SVG
heightnumberyesHeight of the SVG
cxnumberyesCenter x of the ellipse
cynumberyesCenter y of the ellipse
rxnumberyesRadius x of the ellipse
rynumberyesRadius y of the ellipse
startOffsetnumbernoStart offset of the text
reversedbooleannoReverse the text path
textPropsobjectnoProps to be passed to the text element
textPathPropsobjectnoProps to be passed to the textPath element
tspanPropsobjectnoProps to be passed to the tspan element
ellipsePropsobjectnoProps to be passed to the ellipse element
svgPropsobjectnoProps to be passed to the svg element

Keywords

react

FAQs

Package last updated on 08 Feb 2024

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