Paragraph Text

This paragraph explains the purpose of the component.

<PrimerElement Tag="ElementTag.P" ClassName="color-fg-muted text-normal mb-2">
    This paragraph explains the purpose of the component.
</PrimerElement>

Emphasis Text

Important Notice (This is italicized text.)
<PrimerElement Tag="ElementTag.Strong" ClassName="text-bold">
    Important Notice
</PrimerElement>

<PrimerElement Tag="ElementTag.Em" ClassName="color-fg-subtle ml-2">
    (This is italicized text.)
</PrimerElement>

List

  • Install the package
  • Configure your environment
  • Deploy to production
<PrimerElement Tag="ElementTag.Ul" ClassName="pl-3 mt-2">
    <PrimerElement Tag="ElementTag.Li">Install the package</PrimerElement>
    <PrimerElement Tag="ElementTag.Li">Configure your environment</PrimerElement>
    <PrimerElement Tag="ElementTag.Li">Deploy to production</PrimerElement>
</PrimerElement>

Link

<PrimerElement Tag="ElementTag.A" ClassName="text-link"
                AdditionalAttributes="@(new Dictionary<string, object> { { "href", "https://github.com" }, { "target", "_blank" } })">
    View on GitHub
</PrimerElement>

Header

Getting Started

<PrimerElement Tag="ElementTag.H3" ClassName="h3 mt-3 mb-1">
    Getting Started
</PrimerElement>

Box Content

This is a wrapped box using Primer styles.

<PrimerElement Tag="ElementTag.Div" ClassName="Box p-3 color-bg-subtle">
    <PrimerElement Tag="ElementTag.P" ClassName="mb-0">
        This is a wrapped box using Primer styles.
    </PrimerElement>
</PrimerElement>

Button

<PrimerElement Tag="ElementTag.Button" ClassName="btn btn-danger mt-3 mb-1">
    Delete
</PrimerElement>

Element Options

Available options for Element component

NameDescriptionDefault ValueCSS Class
Tag
HTML tag to render
Div
-
ClassName
CSS classes to apply
null
-
Style
Inline styles for the element
null
-
ChildContent
Inner content of the element
-
-
AdditionalAttributes
Additional attributes like href, target, etc.
null
-