|
@@ -0,0 +1,725 @@
|
|
|
|
+---
|
|
|
|
+layout: documentation
|
|
|
|
+doc-tab: form
|
|
|
|
+doc-subtab: general
|
|
|
|
+---
|
|
|
|
+
|
|
|
|
+{% capture example %}
|
|
|
|
+<div class="field">
|
|
|
|
+ <label class="label">Name</label>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Text input">
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field">
|
|
|
|
+ <label class="label">Username</label>
|
|
|
|
+ <div class="control has-icons-left has-icons-right">
|
|
|
|
+ <input class="input is-success" type="text" placeholder="Text input" value="bulma">
|
|
|
|
+ <span class="icon is-small is-left">
|
|
|
|
+ <i class="fa fa-user"></i>
|
|
|
|
+ </span>
|
|
|
|
+ <span class="icon is-small is-right">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <p class="help is-success">This username is available</p>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field">
|
|
|
|
+ <label class="label">Email</label>
|
|
|
|
+ <div class="control has-icons-left has-icons-right">
|
|
|
|
+ <input class="input is-danger" type="text" placeholder="Email input" value="hello@">
|
|
|
|
+ <span class="icon is-small is-left">
|
|
|
|
+ <i class="fa fa-envelope"></i>
|
|
|
|
+ </span>
|
|
|
|
+ <span class="icon is-small is-right">
|
|
|
|
+ <i class="fa fa-warning"></i>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <p class="help is-danger">This email is invalid</p>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field">
|
|
|
|
+ <label class="label">Subject</label>
|
|
|
|
+ <div class="control">
|
|
|
|
+ <span class="select">
|
|
|
|
+ <select>
|
|
|
|
+ <option>Select dropdown</option>
|
|
|
|
+ <option>With options</option>
|
|
|
|
+ </select>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field">
|
|
|
|
+ <label class="label">Message</label>
|
|
|
|
+ <div class="control">
|
|
|
|
+ <textarea class="textarea" placeholder="Textarea"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <label class="checkbox">
|
|
|
|
+ <input type="checkbox">
|
|
|
|
+ I agree to the <a href="#">terms and conditions</a>
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <label class="radio">
|
|
|
|
+ <input type="radio" name="question">
|
|
|
|
+ Yes
|
|
|
|
+ </label>
|
|
|
|
+ <label class="radio">
|
|
|
|
+ <input type="radio" name="question">
|
|
|
|
+ No
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-grouped">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <button class="button is-primary">Submit</button>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control">
|
|
|
|
+ <button class="button is-link">Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture field_example %}
|
|
|
|
+<div class="field">
|
|
|
|
+ <label class="label">Label</label>
|
|
|
|
+ <div class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Text input">
|
|
|
|
+ </div>
|
|
|
|
+ <p class="help">This is a help text</p>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture fields_example %}
|
|
|
|
+<div class="field">
|
|
|
|
+ <label class="label">Name</label>
|
|
|
|
+ <div class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="e.g Alex Smith">
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field">
|
|
|
|
+ <label class="label">Email</label>
|
|
|
|
+ <div class="control">
|
|
|
|
+ <input class="input" type="email" placeholder="e.g. alexsmith@gmail.com">
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture control_input_example %}
|
|
|
|
+<div class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Text input">
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture control_select_example %}
|
|
|
|
+<div class="control">
|
|
|
|
+ <div class="select">
|
|
|
|
+ <select>
|
|
|
|
+ <option>Select dropdown</option>
|
|
|
|
+ <option>With options</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture control_button_example %}
|
|
|
|
+<div class="control">
|
|
|
|
+ <button class="button is-primary">Submit</button>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture addons_example %}
|
|
|
|
+<div class="field has-addons">
|
|
|
|
+ <p class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Find a repository">
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <a class="button is-info">
|
|
|
|
+ Search
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture addons_static_example %}
|
|
|
|
+<div class="field has-addons">
|
|
|
|
+ <p class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Your email">
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <a class="button is-static">
|
|
|
|
+ @gmail.com
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture addons_expanded_example %}
|
|
|
|
+<div class="field has-addons">
|
|
|
|
+ <p class="control">
|
|
|
|
+ <span class="select">
|
|
|
|
+ <select>
|
|
|
|
+ <option>$</option>
|
|
|
|
+ <option>£</option>
|
|
|
|
+ <option>€</option>
|
|
|
|
+ </select>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Amount of money">
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <a class="button">
|
|
|
|
+ Transfer
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field has-addons">
|
|
|
|
+ <p class="control">
|
|
|
|
+ <span class="select">
|
|
|
|
+ <select>
|
|
|
|
+ <option>$</option>
|
|
|
|
+ <option>£</option>
|
|
|
|
+ <option>€</option>
|
|
|
|
+ </select>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control is-expanded">
|
|
|
|
+ <input class="input" type="text" placeholder="Amount of money">
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <a class="button">
|
|
|
|
+ Transfer
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture addons_expanded_fullwidth_example %}
|
|
|
|
+<div class="field has-addons">
|
|
|
|
+ <p class="control is-expanded">
|
|
|
|
+ <span class="select is-fullwidth">
|
|
|
|
+ <select name="country">
|
|
|
|
+ <option value="Argentina">Argentina</option>
|
|
|
|
+ <option value="Bolivia">Bolivia</option>
|
|
|
|
+ <option value="Brazil">Brazil</option>
|
|
|
|
+ <option value="Chile">Chile</option>
|
|
|
|
+ <option value="Colombia">Colombia</option>
|
|
|
|
+ <option value="Ecuador">Ecuador</option>
|
|
|
|
+ <option value="Guyana">Guyana</option>
|
|
|
|
+ <option value="Paraguay">Paraguay</option>
|
|
|
|
+ <option value="Peru">Peru</option>
|
|
|
|
+ <option value="Suriname">Suriname</option>
|
|
|
|
+ <option value="Uruguay">Uruguay</option>
|
|
|
|
+ <option value="Venezuela">Venezuela</option>
|
|
|
|
+ </select>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <button type="submit" class="button is-primary">Choose</button>
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture addons_center_example %}
|
|
|
|
+<div class="field has-addons has-addons-centered">
|
|
|
|
+ <p class="control">
|
|
|
|
+ <span class="select">
|
|
|
|
+ <select>
|
|
|
|
+ <option>$</option>
|
|
|
|
+ <option>£</option>
|
|
|
|
+ <option>€</option>
|
|
|
|
+ </select>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Amount of money">
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <a class="button is-primary">
|
|
|
|
+ Transfer
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture addons_right_example %}
|
|
|
|
+<div class="field has-addons has-addons-right">
|
|
|
|
+ <p class="control">
|
|
|
|
+ <span class="select">
|
|
|
|
+ <select>
|
|
|
|
+ <option>$</option>
|
|
|
|
+ <option>£</option>
|
|
|
|
+ <option>€</option>
|
|
|
|
+ </select>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Amount of money">
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <a class="button is-primary">
|
|
|
|
+ Transfer
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture group_example %}
|
|
|
|
+<div class="field is-grouped">
|
|
|
|
+ <p class="control is-expanded">
|
|
|
|
+ <input class="input" type="text" placeholder="Find a repository">
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control">
|
|
|
|
+ <a class="button is-info">
|
|
|
|
+ Search
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture horizontal_form_example %}
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label is-normal">
|
|
|
|
+ <label class="label">From</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <p class="control is-expanded has-icons-left">
|
|
|
|
+ <input class="input" type="text" placeholder="Name">
|
|
|
|
+ <span class="icon is-small is-left">
|
|
|
|
+ <i class="fa fa-user"></i>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field">
|
|
|
|
+ <p class="control is-expanded has-icons-left has-icons-right">
|
|
|
|
+ <input class="input is-success" type="email" placeholder="Email" value="alex@smith.com">
|
|
|
|
+ <span class="icon is-small is-left">
|
|
|
|
+ <i class="fa fa-envelope"></i>
|
|
|
|
+ </span>
|
|
|
|
+ <span class="icon is-small is-right">
|
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
|
+ </span>
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label"></div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field is-expanded">
|
|
|
|
+ <div class="field has-addons">
|
|
|
|
+ <p class="control">
|
|
|
|
+ <a class="button is-static">
|
|
|
|
+ +44
|
|
|
|
+ </a>
|
|
|
|
+ </p>
|
|
|
|
+ <p class="control is-expanded">
|
|
|
|
+ <input class="input" type="tel" placeholder="Your phone number">
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ <p class="help">Do not enter the first zero</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label is-normal">
|
|
|
|
+ <label class="label">Department</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field is-narrow">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <div class="select is-fullwidth">
|
|
|
|
+ <select>
|
|
|
|
+ <option>Business development</option>
|
|
|
|
+ <option>Marketing</option>
|
|
|
|
+ <option>Sales</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label">
|
|
|
|
+ <label class="label">Already a member?</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field is-narrow">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <label class="radio">
|
|
|
|
+ <input type="radio" name="member">
|
|
|
|
+ Yes
|
|
|
|
+ </label>
|
|
|
|
+ <label class="radio">
|
|
|
|
+ <input type="radio" name="member">
|
|
|
|
+ No
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label is-normal">
|
|
|
|
+ <label class="label">Subject</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <input class="input is-danger" type="text" placeholder="e.g. Partnership opportunity">
|
|
|
|
+ </div>
|
|
|
|
+ <p class="help is-danger">
|
|
|
|
+ This field is required
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label is-normal">
|
|
|
|
+ <label class="label">Question</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <textarea class="textarea" placeholder="Explain how we can help you"></textarea>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label">
|
|
|
|
+ <!-- Left empty for spacing -->
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <button class="button is-primary">
|
|
|
|
+ Send message
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% capture field_label_example %}
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label">
|
|
|
|
+ <label class="label">No padding</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <label class="checkbox">
|
|
|
|
+ <input type="checkbox">
|
|
|
|
+ Checkbox
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label is-small">
|
|
|
|
+ <label class="label">Small padding</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <input class="input is-small" type="text" placeholder="Small sized input">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label is-normal">
|
|
|
|
+ <label class="label">Normal label</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <input class="input" type="text" placeholder="Normal sized input">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label is-medium">
|
|
|
|
+ <label class="label">Medium label</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <input class="input is-medium" type="text" placeholder="Medium sized input">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<div class="field is-horizontal">
|
|
|
|
+ <div class="field-label is-large">
|
|
|
|
+ <label class="label">Large label</label>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="field-body">
|
|
|
|
+ <div class="field">
|
|
|
|
+ <div class="control">
|
|
|
|
+ <input class="input is-large" type="text" placeholder="Large sized input">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+{% endcapture %}
|
|
|
|
+
|
|
|
|
+{% include subnav-form.html %}
|
|
|
|
+
|
|
|
|
+<section class="section">
|
|
|
|
+ <div class="container">
|
|
|
|
+ <h1 class="title">Form controls</h1>
|
|
|
|
+ <h2 class="subtitle">
|
|
|
|
+ All generic <strong>form controls</strong>, designed for consistency
|
|
|
|
+ </h2>
|
|
|
|
+
|
|
|
|
+ <hr>
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>The following form controls <strong>classes</strong> are supported:</p>
|
|
|
|
+ <ul>
|
|
|
|
+ <li><code>.label</code></li>
|
|
|
|
+ <li><code>.input</code></li>
|
|
|
|
+ <li><code>.textarea</code></li>
|
|
|
|
+ <li><code>.select</code></li>
|
|
|
|
+ <li><code>.checkbox</code></li>
|
|
|
|
+ <li><code>.radio</code></li>
|
|
|
|
+ <li><code>.button</code></li>
|
|
|
|
+ <li><code>.help</code></li>
|
|
|
|
+ </ul>
|
|
|
|
+ <p>Each of them should be wrapped in a <code>.control</code> container.<br>
|
|
|
|
+ When combining several controls in a <strong>form</strong>, use the <code>.field</code> class as a <strong>container</strong>, to keep the spacing consistent.</p>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="columns">
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {{example}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {% highlight html %}{{example}}{% endhighlight %}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <hr>
|
|
|
|
+
|
|
|
|
+ <h3 id="form-addons" class="title">Form field</h3>
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>The <code>field</code> container is a simple container for:</p>
|
|
|
|
+ <ul>
|
|
|
|
+ <li>a text <code>label</code></li>
|
|
|
|
+ <li>a form <code>control</code></li>
|
|
|
|
+ <li>an optional <code>help</code>text</li>
|
|
|
|
+ </ul>
|
|
|
|
+ <p>It allows form fields to be <strong>spaced consistently</strong>.</p>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="columns">
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {{field_example}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {% highlight html %}{{field_example}}{% endhighlight %}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>This container allows form fields to be <strong>spaced consistently</strong>.</p>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="columns">
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {{fields_example}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {% highlight html %}{{fields_example}}{% endhighlight %}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <hr>
|
|
|
|
+
|
|
|
|
+ <h3 id="form-control" class="title">Form control</h3>
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>The <code>control</code> is a versatile container meant to <strong>enhance single form controls</strong>. Because it has the same height as a control elements, It can <strong class="has-text-danger">only contain</strong> the following elements:</p>
|
|
|
|
+ <ul>
|
|
|
|
+ <li><code>input</code></li>
|
|
|
|
+ <li><code>select</code></li>
|
|
|
|
+ <li><code>button</code></li>
|
|
|
|
+ <li><code>icon</code></li>
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="columns">
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {{control_input_example}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {% highlight html %}{{control_input_example}}{% endhighlight %}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="columns">
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {{control_select_example}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {% highlight html %}{{control_select_example}}{% endhighlight %}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="columns">
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {{control_button_example}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="column is-half">
|
|
|
|
+ {% highlight html %}{{control_button_example}}{% endhighlight %}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <hr>
|
|
|
|
+
|
|
|
|
+ <h3 id="form-addons" class="title">Form addons</h3>
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>If you want to <strong>attach controls</strong> together, use the <code>has-addons</code> modifier on the <code>field</code> container:</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{addons_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{addons_example}}{% endhighlight %}
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>You can attach inputs, buttons, and dropdowns <strong>only</strong>.</p>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>
|
|
|
|
+ <span class="tag is-success">New!</span>
|
|
|
|
+ <span class="tag is-info">0.4.2</span>
|
|
|
|
+ </p>
|
|
|
|
+ <p>It can be useful to append a <a href="{{site.url}}/documentation/elements/button#static-button">static button</a>.</p>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{addons_static_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{addons_static_example}}{% endhighlight %}
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>Use the <code>is-expanded</code> modifier on the element you want to fill up the remaining space (in this case, the input):</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{addons_expanded_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{addons_expanded_example}}{% endhighlight %}
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>If you want a full width select dropdown, pair <code>control is-expanded</code> with <code>select is-fullwidth</code>.</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{addons_expanded_fullwidth_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{addons_expanded_fullwidth_example}}{% endhighlight %}
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>Use the <code>has-addons-centered</code> or the <code>has-addons-right</code> modifers to alter the <strong>alignment</strong>.</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{addons_center_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{addons_center_example}}{% endhighlight %}
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{addons_right_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{addons_right_example}}{% endhighlight %}
|
|
|
|
+
|
|
|
|
+ <hr>
|
|
|
|
+
|
|
|
|
+ <h3 class="title">Form group</h3>
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>
|
|
|
|
+ If you want to <strong>group</strong> controls together, use the <code>is-grouped</code> modifier on the <code>field</code> container.
|
|
|
|
+ <br>
|
|
|
|
+ Use the <code>is-grouped-centered</code> or the <code>is-grouped-right</code> modifers to alter the <strong>alignment</strong>.
|
|
|
|
+ </p>
|
|
|
|
+ <p>
|
|
|
|
+ Add the <code>is-expanded</code> modifier on the control element you want to <strong>fill up the remaining space</strong> with.
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{group_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{group_example}}{% endhighlight %}
|
|
|
|
+
|
|
|
|
+ <hr>
|
|
|
|
+
|
|
|
|
+ <h3 class="title">Horizontal form</h3>
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>If you want a <strong>horizontal</strong> form control, use the <code>is-horizontal</code> modifier on the <code>field</code> container, in which you include:</p>
|
|
|
|
+ <ul>
|
|
|
|
+ <li>
|
|
|
|
+ <code>field-label</code> for the side label
|
|
|
|
+ </li>
|
|
|
|
+ <li>
|
|
|
|
+ <code>field-body</code> for the input/select/textarea container
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ <p>You can use <code>is-grouped</code> or <code>has-addons</code> for the child elements.</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{horizontal_form_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{horizontal_form_example}}{% endhighlight %}
|
|
|
|
+
|
|
|
|
+ <div class="content">
|
|
|
|
+ <p>
|
|
|
|
+ To preserve the <strong>vertical alignment</strong> of labels with each type and size of control, the <code>.field-label</code> comes with <strong>4 size modifiers</strong>:
|
|
|
|
+ </p>
|
|
|
|
+ <ul>
|
|
|
|
+ <li>
|
|
|
|
+ <code>.is-small</code>
|
|
|
|
+ </li>
|
|
|
|
+ <li>
|
|
|
|
+ <code>.is-normal</code> for any <code>.input</code> or <code>.button</code>
|
|
|
|
+ </li>
|
|
|
|
+ <li>
|
|
|
|
+ <code>.is-medium</code>
|
|
|
|
+ </li>
|
|
|
|
+ <li>
|
|
|
|
+ <code>.is-large</code>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="example">
|
|
|
|
+ {{field_label_example}}
|
|
|
|
+ </div>
|
|
|
|
+ {% highlight html %}{{field_label_example}}{% endhighlight %}
|
|
|
|
+ </div>
|
|
|
|
+</section>
|