2.45.0 • Published 3 months ago

@vonage/vwc-text v2.45.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

vwc-text

Represents a text custom element. The component provisions the Vivid typography font faces and connotations supported by our design system.

typography scale

typography font faces scale image

Basic usage

The following will generate a headline-1 styled font face

<vwc-text font-face="headline-1">
	lorem ipsum dolor sit amet
</vwc-text>

Semantic usage

HTML semantics indicates authoring intent and is important for accessibility, search engine optimizations and clear code. Therefore, you'd probably need to nest html tags that apply different styling and may affect the font face appearance provided by the vwc-text element. This component takes care of overriding the direct nested child within the component to inherit applied font face (if not over specified by the application styles).

custom elements (not extending a built-in native element with the is="" attribute) have a transparent content model.

This means they can be ignored when a parent is validating its own content model`s children.

note that web component cannot style or access any descendent greater than a direct child.

The following will generate a caption styled font face even though it's wrapped by a h1 tag -

<vwc-text font-face="caption">
	<h1>
		lorem ipsum dolor sit amet, consectetur adipiscing elit
	</h1>
</vwc-text>

On the other hand, 'vwc-text' can nest within semantic tags instead -

<h1>
	<vwc-text font-face="caption">
		lorem ipsum dolor sit amet, consectetur adipiscing elit
	</vwc-text>
</h1>

Properties

PropertyAttributeType
fontFacefont-facebody-1 | body-1-bold | body-1-code | body-1-link | body-2 | body-2-bold | body-2-code | body-2-link | button | button-dense | button-enlarge | caption | caption-bold | caption-code | caption-link | headline-1 | headline-2 | subtitle-1 | subtitle-2 | title-1 | title-2
tighttightboolean
2.45.0

3 months ago

2.43.0

10 months ago

2.43.2

9 months ago

2.43.1

10 months ago

2.44.0

8 months ago

2.41.0

11 months ago

2.42.0

11 months ago

2.38.0

1 year ago

2.39.1

1 year ago

2.39.0

1 year ago

2.37.2

1 year ago

2.40.0

1 year ago

2.36.3

1 year ago

2.36.2

1 year ago

2.37.0

1 year ago

2.36.0

2 years ago

2.36.1

2 years ago

2.35.0

2 years ago

2.32.0

2 years ago

2.31.0

2 years ago

2.34.0

2 years ago

2.33.1

2 years ago

2.33.0

2 years ago

2.34.1

2 years ago

2.29.0

2 years ago

2.28.1

2 years ago

2.28.0

2 years ago

2.28.2

2 years ago

2.30.2

2 years ago

2.30.1

2 years ago

2.30.3

2 years ago

2.30.0

2 years ago

2.27.1

2 years ago

2.27.0

2 years ago

2.26.0

2 years ago

2.25.10

2 years ago

2.25.9

2 years ago

2.25.8

2 years ago

2.25.7

2 years ago

2.25.6

2 years ago

2.25.5

2 years ago

2.25.3

2 years ago

2.25.2

2 years ago

2.25.1

2 years ago

2.25.0

2 years ago

2.24.1

2 years ago

2.24.0

2 years ago

2.23.0

2 years ago

2.22.1

3 years ago

2.22.0

3 years ago

2.21.1

3 years ago

2.21.0

3 years ago

2.20.1

3 years ago

2.20.0

3 years ago

2.19.0

3 years ago

2.18.1

3 years ago

2.18.0

3 years ago

2.17.0

3 years ago

2.16.1

3 years ago

2.16.0

3 years ago

2.15.0

3 years ago

2.14.0

3 years ago