Skip to content

SParagraph <s-paragraph> ​

ts
import { SParagraph } from 'polaris-vue-elements'

Example ​

Default paragraph text, used for the bulk of body copy.A subdued paragraph, useful for secondary or helper text.A critical paragraph, useful for inline error copy. A long paragraph that demonstrates lineClamp truncating its content after a fixed number of lines instead of wrapping indefinitely down the page.
vue
<script setup>
import { SParagraph } from 'polaris-vue-elements'
</script>

<template>
  <SParagraph>Default paragraph text, used for the bulk of body copy.</SParagraph>
  <SParagraph color="subdued">A subdued paragraph, useful for secondary or helper text.</SParagraph>
  <SParagraph tone="critical">A critical paragraph, useful for inline error copy.</SParagraph>
  <SParagraph :lineClamp="2" style="max-width: 280px">
    A long paragraph that demonstrates lineClamp truncating its content after a fixed
    number of lines instead of wrapping indefinitely down the page.
  </SParagraph>
</template>

Props ​

PropTypeDescription
accessibilityVisibility"visible" | "hidden" | "exclusive"Changes the visibility of the element. - visible: the element is visible to all users. - hidden: the element is removed from the accessibility tree but remains visible. - exclusive: the element is visually hidden but remains in the accessibility tree.
color"subdued" | "base"Modify the color to be more or less intense.
dir"auto" | "ltr" | "rtl"Indicates the directionality of the element’s text. - ltr: languages written from left to right (e.g. English) - rtl: languages written from right to left (e.g. Arabic) - auto: the user agent determines the direction based on the content - '': direction is inherited from parent elements (equivalent to not setting the attribute)
fontSize"base" | "auto" | "small-200" | "small-100" | "small" | "large" | "large-100"Font size of the paragraph. The named values also apply their matching line-height and letter-spacing.
fontVariantNumeric"auto" | "normal" | "tabular-nums"Set the numeric properties of the font.
fontWeight"base" | "auto" | "medium" | "semibold" | "bold"Font weight of the paragraph.
lineClampnumberTruncates the text content to the specified number of lines.
tone"auto" | "neutral" | "info" | "success" | "caution" | "warning" | "critical"The semantic tone that's applied to the paragraph text, which changes its color to convey meaning. - info: Informational content or helpful tips (blue). - success: Positive outcomes or successful states (green). - warning: Important warnings about potential issues (orange). - critical: Urgent problems or destructive actions (red). - caution: Advisory notices that need attention (yellow).

Slots ​

SlotDescription
defaultThe paragraph text content displayed within the paragraph component, which presents a block of related text with appropriate styling.

Released under the MIT License.