Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <p>Also written in <a href="" target="_blank">Vue</a> and <a href="" target="_blank">jQuery</a>.</p>

<div class="container">
	<div class="filter">
		<label><input type="radio" name="category" checked value="All" data-bind="checked: selectedCategory" /> All</label>
		<label><input type="radio" name="category" value="Tech" data-bind="checked: selectedCategory" /> Tech</label>
		<label><input type="radio" name="category" value="Entertainment" data-bind="checked: selectedCategory" /> Entertainment</label>
		<label><input type="radio" name="category" value="Fictional" data-bind="checked: selectedCategory" /> Fictional</label>
	<ul class="people-list" data-bind="foreach: filteredPeople">
		<li data-bind="text: name"></li>


                .container {
	padding: 20px;
	width: 90%;
	max-width: 400px;
	margin: 0 auto;

label {
	display: block;
	line-height: 1.5em;

ul {
	margin-left: 0;
	padding-left: 0;
	list-style: none;

li {
	padding: 8px 16px;
	border-bottom: 1px solid #eee;


                // Data from server
var people = [
	{ name: "Bill Gates", category: "Tech" },
	{ name: "Steve Jobs", category: "Tech" },
	{ name: "Jeff Bezos", category: "Tech" },
	{ name: "George Clooney", category: "Entertainment" },
	{ name: "Meryl Streep", category: "Entertainment" },
	{ name: "Amy Poehler", category: "Entertainment" },
	{ name: "Lady of Lórien", category: "Fictional" },
	{ name: "BB8", category: "Fictional" },
	{ name: "Michael Scott", category: "Fictional" }

// View Model
function PeopleViewModel() {
	var self = this;

	// import starting data
	self.people = people;

	// currently selected category
	self.selectedCategory = ko.observable("All");

	// filtered people list
	self.filteredPeople = ko.computed(function() {
		var category = self.selectedCategory();

		if(category === "All") {
			return self.people;
		} else {
			return self.people.filter(function(person) {
				return person.category === category;

ko.applyBindings(new PeopleViewModel());