|
|
<!DOCTYPE html>
<head>
<!-- Standard Meta --> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width" />
<!-- Site Properities --> <meta http-equiv="X-Powered-By" content="DocPad v6.32.0"/> <title>Form | Semantic UI</title>
<meta name="description" content="Semantic empowers designers and developers by creating a shared vocabulary for UI." /> <meta name="keywords" content="html5, ui, library, framework, javascript" />
<link rel="stylesheet" type="text/css" href="/stylesheets/reset.css">
<link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/icons.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/button.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/header.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/label.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/divider.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/block.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/segment.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/grid.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/table.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/form.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/menu.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/modules/shape.css"> <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/modules/checkbox.css">
<link rel="stylesheet" type="text/css" href="/stylesheets/library/sidr.css"> <link rel="stylesheet" type="text/css" href="/stylesheets/semantic.css"> <link rel="stylesheet" type="text/css" href="/stylesheets/shape.css">
<script src="/javascript/library/jquery.js"></script> <script src="/javascript/library/ace/ace.js"></script> <script src="/javascript/library/sidr.js"></script> <script src="/javascript/library/waypoints.js"></script>
<script src="/ui/flat/modules/behavior/state.js"></script> <script src="/ui/flat/modules/shape.js"></script> <script src="/ui/flat/modules/checkbox.js"></script>
<script src="/javascript/semantic.js"></script> <script src="/javascript/shape.js"></script>
</head> <body id="example"> <div class="ui large vertical menu" id="menu"> <div class="header item">Table of Contents</div> <div class="item"><a href="/index.html"><b>Introduction</b></a></div> <div class="item"><a href="/download.html"><b>Download</b></a></div> <div class="item"> <a href="/element.html"><b>UI Elements</b></a> <div class="menu"> <a class="item" href="/elements/button.html">Button</a> <a class="item" href="/elements/label.html">Label</a> </div> </div> <div class="item"> <a href="/collection.html"><b>UI Collections</b></a> <div class="menu"> <a class="active item" href="/collections/form.html">Form</a> <a class="item" href="/collections/grid.html">Grid</a> <a class="item" href="/collections/menu.html">Menu</a> <a class="item" href="/collections/table.html">Table</a> <a class="item" href="/collections/block.html">Text Block</a> </div> </div> <div class="item"> <a href="/module.html"><b>UI Modules</b></a> <div class="menu"> <a class="item" href="/modules/shape.html">Shape</a> </div> </div> </div>
<div class="ui fixed transparent contrasting main menu"> <div class="container"> <div class="title item"> <b>UI Collection:</b> Form </div> <div class="icon previous link disabled item"> <i class="icon left-open"></i> </div> <div class="section dropdown item"> 1 of 5 <div class="menu"> <div class="active item"> <a href="/collections/form.html">1. Form</a> </div> <div class="item"> <a href="/collections/grid.html">2. Grid</a> </div> <div class="item"> <a href="/collections/menu.html">3. Menu</a> </div> <div class="item"> <a href="/collections/table.html">4. Table</a> </div> <div class="item"> <a href="/collections/block.html">5. Text Block</a> </div> </div> </div> <div class="icon next link item"> <a href="/collections/grid.html"><i class="icon right-open"></i></a> </div> <div class="right menu"> <a class="item" href="https://github.com/quirkyinc/semantic"> <i class="icon github"></i> </a> <div class="dropdown item"> <i class="icon tint"></i> Theme <div class="theme menu"> <div class="active item" data-theme="flat">Flat</div> <div class="item" data-theme="shaded">Shaded</div> <div class="item" data-theme="classic">Classic</div> </div> </div> </div> </div> </div> <div class="ui huge left attached vertical side buttons"> <div class="ui large blue sidebar button"><i class="icon th-list"></i> Menu</div> </div> <div class="segment"> <div class="container"> <h1>Form</h1> <p>Forms are a grouping of elements requiring user input.</p> <p> Forms always include fields, and fields always contain form elements. Fields themselves may also include: <a href="#">standard form fields</a>, like labels, inputs and textareas, as well as: <a href="#">checkboxes</a>, <a href="#">sliders</a>, and <a href="#">message blocks</a>. </p> <p>Validation messages are <a href="#">text blocks</a> which are formatted for use inside forms.</p> </div> </div> <div class="main container"> <div class="peek"> <div class="ui vertical pointing link menu"> <div class="active item">Collection</div> <div class="item">Elements</div> <div class="item">States</div> <div class="item">Variations</div> </div> </div> <h2>Collection</h2> <div class="example"> <h4>Form:</h4> <p>A form is a collection of user input elements, and has no stylings of its own.</p> <div class="ui info block"> <p>This example uses a ui segment to add the padding and background color. This is not required.</p> </div> <div class="ui form segment"> <p>Let's go ahead and get you signed up.</p> <div class="two fields"> <div class="field"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> <div class="field"> <label>Username</label> <input placeholder="Username" type="text"> </div> <div class="field"> <label>Password</label> <input type="password"> </div> <div class="inline field"> <div class="ui checkbox"> <input type="checkbox" id="terms" /> <label for="terms"></label> </div> <label>I agree to the terms and conditions</label> </div> <div class="ui blue submit button">Submit</div> </div> </div>
<h2>Elements</h2>
<div class="example"> <h4>Field</h4> <p>A field is a form element containing a label and an input</p> <div class="ui form"> <div class="field"> <label>User Input</label> <input type="text"> </div> </div> </div> <div class="example"> <h4>Text Area</h4> <p>A textarea uses the default form element</p> <div class="ui form"> <div class="field"> <label>User Text</label> <textarea></textarea> </div> </div> </div>
<div class="example"> <h4>Checkbox</h4> <p>Checkboxes are styled forms of standard form checkboxes.</p> <div class="ui form"> <div class="field"> <label>Checkbox (Using attribute ID to trigger checked event)</label> <div class="ui checkbox"> <input type="checkbox" id="uniqueid" /> <label for="uniqueid"></label> </div> </div> <div class="field"> <label>Checkbox (<a href="#">Javascript</a>)</label> <div class="ui checkbox"> <input type="checkbox"/> <label></label> </div> </div> </div> </div> <div class="example"> <h4>Text Block</h4> <p>Text blocks have special meaning inside a form tag. All message blocks are hidden by default.</p> <div class="ui form"> <div class="ui block"> <div class="header">We had some issues</div> <ul class="list"> <li>Please enter your first name</li> <li>Please enter your last name</li> </ul> </div> </div> </div>
<h2>States</h2>
<h3>Form</h3> <div class="example"> <h4>Loading</h4> <p>If a form is in loading state, it will automatically show a loading indicator:</p> <div class="ui loading form segment"> <div class="two fields"> <div class="field"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> <div class="field"> <label>Username</label> <input placeholder="Username" type="text"> </div> <div class="field"> <label>Password</label> <input type="password"> </div> <div class="inline field"> <div class="ui checkbox"> <input type="checkbox" id="terms" /> <label for="terms"></label> </div> <label>I agree to the terms and conditions</label> </div> <div class="ui blue submit button">Submit</div> </div> </div> <div class="example"> <h4>Error</h4> <p>If a form is in an error state, it will automatically show any error message blocks:</p> <div class="ui error form segment"> <div class="ui error block"> <div class="header">Action Forbidden</div> <p>You can only sign up for an account once with a given e-mail address.</p> </div> <div class="two fields"> <div class="field"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> <div class="field"> <label>Username</label> <input placeholder="Username" type="text"> </div> <div class="field"> <label>Password</label> <input type="password"> </div> <div class="inline field"> <div class="ui checkbox"> <input type="checkbox" id="terms" /> <label for="terms"></label> </div> <label>I agree to the terms and conditions</label> </div> <div class="ui blue submit button">Submit</div> </div> </div> <div class="example"> <h4>Warning</h4> <p>If a form is in warning state, it will automatically show any warning message block:</p> <div class="ui warning form segment"> <div class="ui warning block"> <div class="header">Could you check something!</div> <ul class="list"> <li>You forgot your <b>first name</b></li> <li>And also your <b>last name</b></li> </ul> </div> <div class="two error fields"> <div class="field"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> <div class="field"> <label>Username</label> <input placeholder="Username" type="text"> </div> <div class="field"> <label>Password</label> <input type="password"> </div> <div class="inline field"> <div class="ui checkbox"> <input type="checkbox" id="terms" /> <label for="terms"></label> </div> <label>I agree to the terms and conditions</label> </div> <div class="ui blue submit button">Submit</div> </div> </div> <h3>Form Fields</h3> <div class="example"> <h4>Error</h4> <p>Individual fields may contain an error state</p> <div class="ui error form segment"> <div class="two fields"> <div class="field error"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> </div> </div> <div class="example"> <h4>Disabled</h4> <p>Individual fields may be disabled or read only</p> <div class="ui error form segment"> <div class="two fields"> <div class="field"> <label>First Name</label> <input placeholder="Read Only" readonly="readonly" type="text"> </div> <div class="disabled field"> <label>Last Name</label> <input placeholder="Disabled" disabled="disabled" type="text"> </div> </div> </div> </div>
<h2>Variations</h2> <h3>Forms</h3>
<div class="example"> <h4>Fluid</h4> <p>A form can take the width of its container</p> <div class="ui fluid form segment"> <div class="two fields"> <div class="field"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> <div class="ui blue submit button">Submit</div> </div> </div> <div class="example"> <h4>Size</h4> <p>A form can also be small or large</p> <div class="ui small form segment"> <div class="two fields"> <div class="field"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> <div class="ui blue small submit button">Submit</div> </div> <br><br> <div class="ui large form segment"> <div class="two fields"> <div class="field"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> <div class="ui blue submit button">Submit</div> </div> </div> <div class="example"> <h4>Inverted</h4> <p>A form on a dark background may have to invert its color scheme</p> <div style="background-color: #333333; padding: 15px;"> <div class="ui inverted form"> <div class="ui info block"> <div class="header">We had some issues</div> <ul class="list"> <li>Please enter your first name</li> <li>Please enter your last name</li> </ul> </div> <div class="two fields"> <div class="error field"> <label>First Name</label> <input placeholder="First Name" type="text"> </div> <div class="field"> <label>Last Name</label> <input placeholder="Last Name" type="text"> </div> </div> <div class="ui blue submit button">Submit</div> </div> </div> </div> <h3>Fields</h3> <div class="example"> <h4>Inline</h4> <p>A field can have its label next to instead of above it.</p> <div class="ui form"> <div class="ui inline fields"> <div class="field"> <label>Last name</label> <input type="text" placeholder="Full Name"> </div> </div> </div> </div> <div class="example"> <h4>Date</h4> <p>A field can let users know they are for dates</p> <div class="ui form"> <div class="date field"> <label>Birthday</label> <input type="text" placeholder="Full Name"> </div> </div> </div> <h2>Groups</h2> <div class="example"> <h4>Field Groups</h4> <p>Fields can exist side by side to show relation</p> <div class="ui form"> <div class="ui three fields"> <div class="field"> <label>First name</label> <input type="text" placeholder="First Name"> </div> <div class="field"> <label>Middle name</label> <input type="text" placeholder="Middle Name"> </div> <div class="field"> <label>Last name</label> <input type="text" placeholder="Last Name"> </div> </div> </div> </div> </div> </body>
</html> </body>
</html>
|