5.24.1 • Published 9 months ago

@purpurds/paragraph v5.24.1

Weekly downloads
-
License
AGPL-3.0-only
Repository
-
Last release
9 months ago

import { Meta, Stories, ArgTypes, Primary, Subtitle } from "@storybook/blocks";

import * as ParagraphStories from "./src/paragraph.stories"; import packageInfo from "./package.json";

Paragraph

Version {packageInfo.version}

Note that the responsive behaviour of this component is more fluid than the specification in Figma, meaning that it adheres to the min and max sizes specified, but in viewports in-between in will be a ratio to the viewport with rather than a fixed size.

Create a block level element with text content styled as a paragraph.

  • paragraph-100 the default paragraph style for body texts
  • paragraph-200 has extended line height for long texts, e.g. blog or article texts

Accessibility

Paragraphs make a page more accessible and physically separated from adjacent blocks through blank lines. Assistive technology supports shortcuts to navigate through next and previous paragraph. For more detailed accessibilty guidelines See W3Cs information about p element.

Inline elements

Inline elements can be used inside paragraph to highlight a specific part of text. They add an effect on the text, for example bolding or italics, and for screen reader the pronounciation is be different. Tags marking an inline element can be placed inside the paragraph tags without breaking the flow of the content. The most commonly used inline elements are presented below.

ElementTagDescription
Bring Attention To<b>Used to draw the reader's attention to the element's contents.
Citation<cite>Used to describe a reference to a cited creative work.
Emphasis<em>Marks text that has stress emphasis.
Idiomatic Text<i>Represents a range of text that is set off from the normal text for some reason.
Strong Importance<strong>Indicates that its contents have strong importance, seriousness, or urgency.
Time<time>Represents a specific period in time.

Showcase

Properties

Installation

Via NPM

Add the dependency to your consumer app like "@purpurds/purpur": "^x.y.z"

In MyApp.tsx

import "@purpurds/purpur/styles";

In MyComponent.tsx

import { Paragraph } from "@purpurds/purpur";

export const MyComponent = () => {
  return (
    <div>
      <Paragraph {...someProps}>Some content</Paragraph>
    </div>
  );
};
5.24.1

9 months ago

5.24.0

9 months ago

5.23.0

9 months ago

5.21.1

9 months ago

5.21.0

9 months ago

5.22.0

9 months ago

5.18.3

10 months ago

5.18.2

10 months ago

5.18.1

10 months ago

5.18.0

10 months ago

5.19.1

9 months ago

5.19.0

9 months ago

5.17.0

10 months ago

5.20.1

9 months ago

5.20.0

9 months ago

5.16.1

10 months ago

5.16.0

10 months ago

5.15.1

10 months ago

5.15.0

10 months ago

5.14.0

11 months ago

5.5.0

1 year ago

5.3.0

1 year ago

5.1.2

1 year ago

5.13.0

11 months ago

5.11.2

11 months ago

5.11.1

11 months ago

5.11.0

11 months ago

5.8.2

1 year ago

5.8.1

1 year ago

5.8.0

1 year ago

5.4.3

1 year ago

5.6.0

1 year ago

5.4.2

1 year ago

5.4.1

1 year ago

5.4.0

1 year ago

5.2.0

1 year ago

5.12.0

11 months ago

5.10.1

11 months ago

5.10.0

12 months ago

5.9.0

1 year ago

5.7.0

1 year ago

5.1.1

1 year ago

5.1.0

1 year ago

5.0.0

1 year ago

4.5.0

1 year ago

4.6.0

1 year ago

4.5.1

1 year ago

4.4.0

1 year ago

4.3.0

1 year ago

4.2.0

1 year ago

4.1.1

1 year ago

4.1.0

1 year ago

4.0.2

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

3.7.1

1 year ago

3.7.0

1 year ago

3.6.0

1 year ago

3.5.1

1 year ago

3.5.0

1 year ago

3.4.0

1 year ago

3.3.2

1 year ago

3.3.1

1 year ago

3.3.0

1 year ago

3.2.0

1 year ago

3.1.0

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.8.0

1 year ago