Giter Site home page Giter Site logo

arctext's Introduction

arctext

NPM version Package size

proof that tony stark has a heart

๐Ÿ’ฟ UI component to draw curved text in circles

๐Ÿ“ฆ Installation

Currently, this module is only available for React, but I have plans to support all major frontend libraries such as Vue and Svelte.

# โŽŠ Arc Reactor(Cool!)
yarn add @arctext/react

๐Ÿš€ Usage

Basic Usage

junhoyeo

import { ArcText } from '@arctext/react'

<ArcText text="@junhoyeo" width={500} characterWidth={4.8} />

// You can pass `radius` instead of `width`
<ArcText text="@junhoyeo" radius={250} characterWidth={4.8} />

Upside-down(bottom text)

junhoyeo upside down

<ArcText
  text="@junhoyeo"
  upsideDown
  width={500}
  characterWidth={4.8}
/>

Nested

proof that tony stark has a heart

<ArcText
  text="PROOF THAT TONY STARK"
  characterWidth={6}
  radius={250}
>
  <ArcText
    text="HAS A HEART"
    upsideDown // bottom text
    characterWidth={6}
    radius={250}
  />
</ArcText>

Styling

Monospaced fontsโ€”the fonts that have the same width for each characterโ€”are recommended here. The result may look awkward with other typefaces.

junhoyeo styled

import { ArcText } from '@arctext/react'
import styled from 'styled-components'

<Circle text="@junhoyeo" width={500} characterWidth={4.8} />

// Styling is based on `className`
const Circle = styled(ArcText)`
  background-color: white;
  border-width: 50%;

  // Applied to each characters
  & span.character {
    color: black;
    font-size: 37px;
    font-family: monospace;
  }
`

arctext's People

Contributors

junhoyeo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.