npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

astro-textcircle

v1.0.2

Published

If you want to showcase your text in a circular layout, give this Astro component a try.

Downloads

1

Readme

textcircle-min

Astro TextCircle

If you want to showcase your text in a circular layout, give this Astro component a try.

While this component isn't inherently responsive, you can easily create multiple circles that adjust to fit the viewport - just keep this in mind.

Live Demo

Instalation

using npm

npm install astro-textcircle

using pnpm

pnpm add astro-textcircle

Possible Props

If Visual Studio Code is your preferred IDE, simply press CRTL+SPACE / CMD+SPACE to reveal the valid properties.

  • text [sting]
  • class [sting]
  • options [object]
  • animation [object]

| Property | Object | Type | Default | Desctription | | ------------------ | :-------: | :---------------: | :-----: | ---------------------------------------------------- | | class | - | string | - | Add classes to the circle contaner | | text | - | string | - | Shows the added text in a circular layout | | spacing | options | number | 1 | Spacing between the letters | | textTransform | options | string | - | Will add text-transform with the given value | | fontSizeInRem | options | number | 1 | Will change the font-size to the given number in rem | | fontWeight | options | string / number | normal | Will change the font-weight to the given value | | divider | options | string | - | Change the spaces to the given value | | dividerColor | options | string | - | Change the text color to the given color code | | rotate | options | number | - | Rotate the circle to the given value in deg | | duration | animation | string | - | Change the animation speed | | timing | animation | string | - | Animation timing function | | delay | animation | string | 0s | Animation delay | | direction | animation | normal / reverse | normal | Animation rotation direction | | count | animation | infinite / number | infinit | Animation rotation count | | animateOnHover | animation | boolean | false | Start animation on mouse hover | | stopAnimateOnHover | animation | boolean | false | Stop animation on hover |

divider and dividerColor

Give your text a stylish twist with a divider instead of spacing - just use the divider property and set a custom color with dividerColor. Keep in mind that in order to use the dividerColor property, the divider property must be set beforehand.

animation

If you are using the animation property, you need to declare the duration poperty!

Keep in mind that using animateOnHover + stopAnimateOnHover will result in animateOnHover

How to use

---
import { TextCircle } from 'astro-textcircle';
---

<div>

  <!-- basic -->
  <TextCircle text="Display text in a circle" />

  <!-- using class with tailwind -->
  <Textcircle 
    text="Display text in a circle" 
    class="text-red-500 absolute top-8 left-8"
  />

  <!-- using options -->
  <TextCircle 
    text="Display text in a circle"
    options={{ 
      uppercase: true,
      fontSizeInRem: 0.75,
      fontWeight: 'bold',
      divider: '-',
      dividerColor: 'red',
      rotation: 45
    }}
  />

  <!-- using animation -->
  <TextCircle 
    text="Display text in a circle"
    animation={{ 
      duration: '12s',
      timing: 'linear',
      delay: '5s',
      direction: 'reverse',
      count: 'infinite',
      animateOnHover: true
    }}
  />

</div>

Notice that every letter and spacing in your text will be outputed as set:html={}

Using Slot

While slot can be used in this component, note that the height of the slot-container is dependent on the size of the text-circle.

  <TextCircle text="Display text in a circle">
    <img src="/my-image.jpg" alt="" />
  <TextCircle>

CSS Classes

<div class="lw-textcircle">
  <div class="lw-textcircle__inner">
    <p class="lw-textcircle-circle">
      Circle Text
    </p>
    <div class="lw-textcircle-slot">
      <slot />
    </div>
  </div>
</div>