whatisgithub

What is samples?

googlechrome/samples — explained in plain English

Analysis updated 2026-06-26

5,883JavaScriptAudience · developerComplexity · 1/5Setup · easy

In one sentence

A collection of small self-contained demos from the Google Chrome team, each showing how to use a new browser feature added to Chrome, hosted as a live website that developers can browse or contribute to.

Mindmap

mindmap
  root((chrome samples))
    What it does
      Browser feature demos
      Reference for devs
      Live website
    Tech stack
      HTML CSS JS
      Jekyll templates
      ESLint
    Use cases
      Learn new APIs
      Contribute demos
      Browse by feature
    Setup
      gh-pages branch
      npm for linting
      Template folder
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Look up a working code example for a new Chrome web platform feature or browser API.

USE CASE 2

Reference real sample code when learning how to use a browser capability in your own web app.

USE CASE 3

Contribute a demo for a Chrome feature you want to document or help developers discover.

What is it built with?

JavaScriptHTMLCSSJekyllESLint

How does it compare?

googlechrome/samplesprettier/eslint-config-prettierkoenbok/framer
Stars5,8835,8835,879
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity1/51/52/5
Audiencedeveloperdeveloperdesigner

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

So what is it?

This repository is a collection of small code samples created by the Google Chrome team to demonstrate new browser features as they are added to Chrome. Each time Chrome ships a new web platform capability, a corresponding demo shows developers how that feature works in practice. The samples are hosted as a website and are also browsable through the Chrome Platform Status site, which tracks every feature added to the browser. Each sample is a self-contained folder containing HTML, JavaScript, and CSS files. Some samples use a Jekyll-based templating system to reduce repeated boilerplate, while simpler contributions can just be plain files in a folder. The entire site is served from the gh-pages branch of the repository. Contributing a new sample follows a defined process. You start from a template provided in the repository, create a folder for the feature, write the demo, and file a pull request against the gh-pages branch. The instructions suggest mentioning the Chrome engineer who implemented the feature in the pull request so they can verify the sample accurately represents what was built. Their contact information can be found in the corresponding Chrome Platform Status entry. Code style follows the Google JavaScript Style Guide. Linting is enforced with ESLint using a Google base configuration, and can be run locally with a standard npm command. The README also notes that many code editors can show linting errors in real time, which helps catch problems before submitting. This is primarily a reference and documentation resource rather than a reusable library.

Copy-paste prompts

Prompt 1
I want to add the Web Share API to my web app. Find me the Chrome sample for it and show me the key JavaScript I need to implement a Share button.
Prompt 2
I want to contribute a sample to the Chrome Samples repo for the View Transitions API. Walk me through creating the sample folder, writing the demo HTML and JS, and submitting a pull request to the gh-pages branch.
Prompt 3
Show me a working implementation of the Intersection Observer API based on the Chrome Samples demos.
Prompt 4
How do I run the ESLint linter locally on my Chrome sample contribution before submitting a pull request?

Frequently asked questions

What is samples?

A collection of small self-contained demos from the Google Chrome team, each showing how to use a new browser feature added to Chrome, hosted as a live website that developers can browse or contribute to.

What language is samples written in?

Mainly JavaScript. The stack also includes JavaScript, HTML, CSS.

How hard is samples to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is samples for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.