From 8e529ee7ccbfe7f3d3b412738e3e298e998b9891 Mon Sep 17 00:00:00 2001 From: Alexander Kushi-Willis Date: Mon, 4 Dec 2017 13:51:31 -0500 Subject: [PATCH] Added basic documentation for select widget (#806) --- docs/widgets.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/widgets.md b/docs/widgets.md index 7cae9f68..66e1c159 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -22,6 +22,23 @@ Widgets define the data type and interface for entry fields. Netlify CMS comes w We’re always adding new widgets, and you can also [create your own](/docs/extending)! +### Select Widget + +The select widget allows you to pick a string value from a drop down menu + +```yaml +collections: + - name: posts + label: Post + folder: "_posts" + slug: "{{year}}-{{month}}-{{day}}-{{slug}}" + create: true + fields: + - {label: Title, name: title, widget: string, tagname: h1} + - {label: Body, name: body, widget: markdown} + - {label: Align Content, name: align, widget: select, options: ['left', 'center', 'right']} +``` + ### List Widget The list widget allows you to map a user-provided string with a comma delimiter into a list. Consider the following example that also demonstrates how to set default values: