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

react-word-section

v1.0.3

Published

React component that displays a text subject under that there is text content as a word section.

Downloads

9

Readme

react-word-section

This library gives developers other appropriate options of displaying a word section represented by a subject following the content of the text information in addition to simply displaying a subject on top of the text content.

This library gives 6 ways of displaying a section of text.

Common

The subject text is larger than the content text.

PC:

Mobile:

Vertical Line

On top of the common style, a vertical line is added to the left of the subject text.

PC:

Mobile:

Underline

On top of the common style, an underline is added to the bottom of the subject text.

PC:

Mobile:

Background Color

On top of the common style, the subject text block has a background color.

PC:

Mobile:

Bold

On top of the common style, the subject text is in bold.

PC:

Mobile:

Block Corner Round

On top of the common style, a lightgrey background color is added to the text block that has the subject and the content, and the block corner becomes round.

PC:

Mobile:

Installation

$ npm install --save react-word-section

Usage

Here's a sample implementation that creates a word section on a dummy Create-React-App page.

import React from 'react';
import WordSection from 'react-word-section';

function App() {
  const subject = 'Retailers Embrace AI Tech for Improved Customer Experience';
  const content = 'Artificial Intelligence is becoming commonplace across major industries and retail is no exception.The retail industry is looking for ways to keep up with the times and many companies have started implementing AI technology across the entire product and service cycle – from assembly to post-sale customer service interactions.';
  
  return (
    <>
      <WordSection 
        subject={subject}
        subjectStyle='common'
        background='white'
        corner='sharp'
      >
        {content}
      </WordSection>
      
    </>
  );
}

export default App;

Options


| Option | Type | Required | Default | Description | | --------------------- | ---------- | ---------- | ------------------------- | ---------------------------------------------------------- | | subject | String | Yes | N/A | Subject text | | subjectStyle | String | No | common | Subject text UI style. common, verticalLine, underline, backgroundColor, or bold | | background | String | No | white | Background color of the section. white or lightgrey | | corner | String | No | sharp | Corner appearance of the section block. sharp or round |

Demo

CodeSandbox