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

react-circle-text

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-circle-text

Lightweight React component for circular text rendering

latest
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

🌀 React Circle Text

A lightweight and flexible React component for rendering beautiful circular text on a canvas — perfect for profile frames, banners, posters, and more.

Demo

Features

  • Render text in clockwise or counter-clockwise directions
  • Fully customizable typography (font, weight, spacing, alignment)
  • RTL support (Right-to-Left languages)
  • Letter flipping for upright orientation
  • Text alignment: start / center / end
  • Export to PNG or SVG with callback support
  • Lightweight and framework-agnostic canvas renderer under the hood

Installation

npm install react-circle-text

Usage

import { CircularText } from 'react-circle-text'

export default function Example() {
  return (
    <CircularText
      text="Hello Circular World!"
      radius={90}
      fontSize={24}
      fontFamily="Arial"
      fontWeight="bold"
      color="#0070f3"
      angleDeg={90}
      direction="clockwise"
      flip={false}
      align="center"
    />
  )
}

Props

PropTypeDefaultDescription
textstringThe text to render
radiusnumber150Circle radius
fontSizenumber24Font size in px
fontFamilystringArialFont family
fontWeightstringnormalFont weight
colorstring#000Text color
angleDegnumber0Starting angle in degrees
direction'clockwise' | 'counter-clockwise''clockwise'Text direction
flipbooleanfalseKeep letters upright
align'start' | 'center' | 'end''center'Text alignment
rtlbooleanfalseRTL support
letterSpacingnumber0Additional space between letters
exportAs'png' | 'svg'Optional export format
onExport(url: string) => voidCallback fired after export

Testing

This package uses Vitest and jsdom for unit tests.

npm test

✅ Includes:

  • Math utility tests
  • Canvas renderer smoke tests
  • Component render tests

Development


# run tests
npm test

# build package
npm run build

License

MIT © Hovhannes Khachatryan

Contributing / Feedback

Pull requests and feature suggestions are welcome!
If you build something cool with this library, tag us or share a screenshot 😎

Keywords

react

FAQs

Package last updated on 06 Oct 2025

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