Skip to content
Primer/ViewComponents
What's new
Design
Interface guidelinesOcticonsPresentationsCommand lineMobileDesktop
Build
CSSReactViewComponents
ContributeAbout
Getting started
ContributingSystem argumentsLintingMigrationComponent status
Components
AutoCompleteAutoCompleteItemAvatarAvatarStackBlankslateBorderBoxBoxBreadcrumbsButtonButtonGroupButtonMarketingClipboardCopyCloseButtonCounterDetailsDropdownDropdownMenuFlashFlexFlexItemHeadingHiddenTextExpanderIconButtonImageImageCropLabelLayoutLinkLocalTimeMarkdownMenuOcticonOcticonSymbolsPopoverProgressBarSpinnerStateSubheadTabContainerTabNavTabPanelsTextTimeAgoTimelineItemTruncateUnderlineNavUnderlinePanels
Architecture decisions
Developing and publishing client-side behaviours251. Use Catalyst for client-side behaviours
GitHub
On this page
  • Arguments
  • Examples

AutoCompleteItem

Beta
View sourceView storybook
On this page
  • Arguments
  • Examples

Use AutoCompleteItem to list results of an auto-completed search.

Arguments

NameTypeDefaultDescription
valueStringN/AValue of the item.
selectedBooleanfalseWhether the item is selected.
disabledBooleanfalseWhether the item is disabled.
system_argumentsHashN/ASystem arguments

Examples

Default

  • Selected
  • Not selected
  • <%= render(Primer::Beta::AutoComplete::Item.new(selected: true, value: "value")) do |c| %>
    Selected
    <% end %>
    <%= render(Primer::Beta::AutoComplete::Item.new(value: "value")) do |c| %>
    Not selected
    <% end %>
    Edit this page on GitHub