Skip to content

Commit

Permalink
Added basic documentation for select widget (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
ackushiw authored and verythorough committed Dec 4, 2017
1 parent 8b24d1c commit 8e529ee
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8e529ee

Please sign in to comment.