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.

ActionBar

Image

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

ActionList

Image

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

ActionMenu

Image

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

Learn more

AnchoredOverlay

Image

AnchoredOverlay opens an Overlay relative to the anchor position.

Learn more

Autocomplete

Image

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

Learn more

Avatar

Image

Avatar is an image that represents a user or organization.

Learn more

AvatarStack

Image

AvatarStack displays two or more Avatars in an inline stack.

Learn more

Banner

Image

Banner is used to highlight important information.

Learn more

Blankslate

Image

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

Learn more

BranchName

Image

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

Learn more

Breadcrumbs

Image

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

Learn more

Button

Image

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

Learn more

ButtonGroup

Image

ButtonGroup renders a series of buttons.

Learn more

Checkbox

Image

Checkbox is a form control for single and multiple selections.

Learn more

CheckboxGroup

Image

CheckboxGroup renders a set of Checkboxes.

Learn more

CircleBadge

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

Learn more

ConfirmationDialog

Image

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

CounterLabel

Image

Adds a count to navigational elements and buttons.

Learn more

DataTable

Image

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

Details

Image

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

Learn more

Dialog

Image

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

Learn more

FormControl

Image

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

Learn more

Heading

Image

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

Learn more

IconButton

Image

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

Learn more

InlineMessage

Image

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

Learn more

Label

Image

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

Learn more

LabelGroup

Image

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

Learn more

Link

Image

Links are used to apply styles to hyperlink text.

Learn more

NavList

Image

NavList renders a vertical list of navigation links.

Learn more

Overlay

Image

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

Learn more

PageHeader

Image

PageHeader determines the top-level headings of a UI.

Learn more

PageLayout

Image

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

Learn more

Pagination

Image

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

Learn more

Popover

Image

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

Learn more

ProgressBar

Image

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

Radio

Image

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

Learn more

RadioGroup

Image

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

Learn more

RelativeTime

Image

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

Learn more

SegmentedControl

Image

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

Learn more

Select

Image

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

Learn more

SelectPanel

Image

The SelectPanel is an anchored 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 offers a footer for additional actions. Changes are applied upon closing the panel.

Learn more

Skeleton loaders

Image

Replaces content while it's in a loading state.

Learn more

Spinner

Image

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

Learn more

SplitPageLayout

Image

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

Learn more

Stack

Image

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

Learn more

StateLabel

Image

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

Learn more

Text

Image

An abstraction for using Primer's typographic styles.

Learn more

Textarea

Image

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

Learn more

TextInput

Image

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

Learn more

TextInputWithTokens

Image

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

Learn more

Timeline

Image

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

Learn more

ToggleSwitch

Image

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

Learn more

Token

Image

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

Learn more

Tooltip

Image

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

Learn more

TreeView

Image

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

Truncate

Image

Use Truncate to shorten overflowing text with an ellipsis.

Learn more

UnderlineNav

Image

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

Learn more

UnderlinePanels

Image

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

Learn more