Components

Primer Components are reusable, interactive building blocks for designing consistent user interfaces. They include elements for actions, containment, communication, navigation, selection, and text input, ensuring a cohesive and accessible design across applications. Each component is designed to be flexible and can be seamlessly integrated into various projects to enhance functionality and user experience.

Image

ActionBar

A collection of horizontally aligned IconButtons. The IconButtons can be split into groups by adding a divider. When there is not enough space, IconButtons that don't fit will be added to an overflow menu.

Learn more
Image

ActionList

ActionList is a vertical list of interactive actions or options. It's composed of items presented in a consistent, single-column format, with room for icons, descriptions, side information, and other rich visuals.

Learn more
Image

ActionMenu

ActionMenu is composed of ActionList and Overlay patterns used for quick actions and selections.

Learn more
Image

AnchoredOverlay

AnchoredOverlay opens an Overlay relative to the anchor position.

Learn more
Image

Autocomplete

Autocomplete allows users to quickly filter through a list of options and pick one or more values for a field.

Learn more
Image

Avatar

Avatar is an image that represents a user or organization.

Learn more
Image

AvatarStack

AvatarStack displays two or more Avatars in an inline stack.

Learn more
Image

Banner

Banner is used to highlight important information.

Learn more
Image

Blankslate

Blankslate is used as placeholder to tell users why content is missing.

Learn more
Image

BranchName

BranchName is a label-type component rendered as an <a> tag by default that displays the name of a branch.

Learn more
Image

Breadcrumbs

Breadcrumbs display the current page or context within the site, allowing them to navigate different levels of the hierarchy.

Learn more
Image

Button

Button is used to initiate actions on a page or form.

Learn more
Image

ButtonGroup

ButtonGroup renders a series of buttons.

Learn more
Image

Card

Card is a styled container component with border, box-shadow, and border-radius that groups related content. It supports structured layouts with subcomponents or custom content.

Learn more
Image

Checkbox

Checkbox is a form control for single and multiple selections.

Learn more
Image

CheckboxGroup

CheckboxGroup renders a set of Checkboxes.

Learn more

CircleBadge

CircleBadge visually connects logos of third-party services, eg. in the marketplace.

Learn more
Image

ConfirmationDialog

ConfirmationDialog is a specialized dialog component used to confirm user actions. It provides a simple way to ask users to confirm or cancel potentially destructive or important actions.

Learn more
Image

CounterLabel

Adds a count to navigational elements and buttons.

Learn more
Image

DataTable

DataTable is a 2-dimensional data structure where each row is an item, and each column is a data point about the item.

Learn more
Image

Details

Details is a styled component to enhance the native behaviors of the <details> element.

Learn more
Image

Dialog

Dialog is a floating surface used to display transient content such as confirmation actions, selection options, and more.

Learn more
Image

FormControl

FormControl displays a labelled input and, optionally, associated validation text and/or hint text.

Learn more
Image

Heading

Heading defines the hierarchical structure and importance of the content they contain.

Learn more
Image

IconButton

IconButton is used for buttons that show an icon in place of a text label.

Learn more
Image

InlineMessage

InlineMessage is used to inform the user about the result of an action within the content.

Learn more
Image

Label

Use the label component to add contextual metadata to a design.

Learn more
Image

LabelGroup

Use LabelGroup to add commonly used margins and other layout constraints to groups of Labels

Learn more
Image

Link

Links are used to apply styles to hyperlink text.

Learn more
Image

NavList

NavList renders a vertical list of navigation links.

Learn more
Image

Overlay

Overlay components codify design patterns related to floating surfaces such as Dialogs and menus.

Learn more
Image

PageHeader

PageHeader determines the top-level headings of a UI.

Learn more
Image

PageLayout

PageLayout defines the header, main, pane, and footer areas of a page.

Learn more
Image

Pagination

Pagination is a horizontal set of links to navigate paginated content.

Learn more
Image

Popover

Popover is used to bring attention to specific user interface elements.

Learn more
Image

ProgressBar

A ProgressBar is a simple chart that can be used to show how complete something is, or visualize parts that make up a whole.

Learn more
Image

Radio

Radio button is a form control for making a single selection from a short list of options.

Learn more
Image

RadioGroup

RadioGroup is used to render a short list of mutually exclusive options.

Learn more
Image

RelativeTime

RelativeTime displays time in a way that is clear, concise, and accessible.

Learn more
Image

SegmentedControl

SegmentedControl is used to pick one choice from a linear set of closely related choices, and immediately apply that selection.

Learn more
Image

Select

Select is for choosing a single option from a dropdown menu of predefined choices.

Learn more
Image

SelectPanel

The SelectPanel is a dialog that allows users to quickly navigate and select one or multiple items from a list. It includes a text input for filtering, supports item grouping, and supports optional primary and secondary actions. In anchored panels, changes are applied when the panel closes; in modal or full-screen variants, changes are applied when the primary action (for example, Save) is confirmed.

Learn more
Image

SkeletonAvatar

SkeletonAvatars are placeholders for loading Avatars. They support the same variants as the Avatar component.

Learn more
Image

SkeletonBox

A SkeletonBox provides a placeholder for non-text, non-Avatar elements (e.g., hero images) that are still loading.

Learn more
Image

SkeletonText

SkeletonText shows a placeholder for loading text to improve perceived performance.

Learn more
Image

Spinner

A Spinner is an indeterminate loading indicator, ideal for processes with unknown or variable durations.

Learn more
Image

SplitPageLayout

SplitPageLayout is a layout component that allows you to create a two-column layout with a main content area and a sidebar.

Learn more
Image

Stack

Stack is a layout component that creates responsive horizontal and vertical flows.

Learn more
Image

StateLabel

StateLabel is used for rendering the status of an issue or pull request.

Learn more
Image

Text

An abstraction for using Primer's typographic styles.

Learn more
Image

Textarea

Textarea is used to set a value that is multiple lines of text.

Learn more
Image

TextInput

TextInput is used to set a value that is a single line of text.

Learn more
Image

TextInputWithTokens

TextInputWithTokens is an input for a value that is a list.

Learn more
Image

Timeline

The Timeline component is used to display items on a vertical Timeline, connected by Timeline elements.

Learn more
Image

ToggleSwitch

ToggleSwitch is used to immediately toggle a setting on or off.

Learn more
Image

Token

Token is a compact representation of an object, and is typically used to show a collection of related metadata.

Learn more
Image

Tooltip

Tooltips add additional context to interactive UI elements and appear on mouse hover or keyboard focus.

Learn more
Image

TreeView

TreeView is a hierarchical list of items that may have a parent-child relationship where children can be toggled into view by expanding or collapsing their parent item.

Learn more
Image

Truncate

Use Truncate to shorten overflowing text with an ellipsis.

Learn more
Image

UnderlineNav

The UnderlineNav is used to display navigation in a horizontal tabbed format.

Learn more
Image

UnderlinePanels

The UnderlinePanels are used to break related content into tabbed panels.

Learn more