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

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

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

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

Learn more

AnchoredOverlay

AnchoredOverlay opens an Overlay relative to the anchor position.

Learn more

Autocomplete

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

Learn more

Avatar

Avatar is an image that represents a user or organization.

Learn more

AvatarStack

AvatarStack displays two or more Avatars in an inline stack.

Learn more

Banner

Banner is used to highlight important information.

Learn more

Blankslate

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

Learn more

BranchName

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

Learn more

Breadcrumbs

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

Learn more

Button

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

Learn more

ButtonGroup

ButtonGroup renders a series of buttons.

Learn more

Checkbox

Checkbox is a form control for single and multiple selections.

Learn more

CheckboxGroup

CheckboxGroup renders a set of Checkboxes.

Learn more

CircleBadge

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

Learn more

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

CounterLabel

Adds a count to navigational elements and buttons.

Learn more

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

Details

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

Learn more

Dialog

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

Learn more

FormControl

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

Learn more

Heading

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

Learn more

IconButton

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

Learn more

InlineMessage

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

Learn more

Label

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

Learn more

LabelGroup

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

Learn more

Link

Links are used to apply styles to hyperlink text.

Learn more

NavList

NavList renders a vertical list of navigation links.

Learn more

Overlay

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

Learn more

PageHeader

PageHeader determines the top-level headings of a UI.

Learn more

PageLayout

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

Learn more

Pagination

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

Learn more

Popover

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

Learn more

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

Radio

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

Learn more

RadioGroup

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

Learn more

RelativeTime

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

Learn more

SegmentedControl

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

Learn more

Select

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

Learn more

SelectPanel

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

Replaces content while it's in a loading state.

Learn more

Spinner

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

Learn more

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

Stack

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

Learn more

StateLabel

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

Learn more

Text

An abstraction for using Primer's typographic styles.

Learn more

Textarea

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

Learn more

TextInput

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

Learn more

TextInputWithTokens

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

Learn more

Timeline

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

Learn more

ToggleSwitch

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

Learn more

Token

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

Learn more

Tooltip

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

Learn more

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

Truncate

Use Truncate to shorten overflowing text with an ellipsis.

Learn more

UnderlineNav

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

Learn more

UnderlinePanels

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

Learn more