2015-09-11 14:41:01 +05:30
- page_title "UI Development Kit", "Help"
2015-04-26 12:48:37 +05:30
- lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fermentum nisi sapien, non consequat lectus aliquam ultrices. Suspendisse sodales est euismod nunc condimentum, a consectetur diam ornare."
.gitlab-ui-dev-kit
%h1 GitLab UI development kit
%p.light
Use page inspector in your browser to check element classes and structure
of examples below.
%hr
%ul
%li
= link_to 'Blocks', '#blocks'
%li
= link_to 'Lists', '#lists'
%li
= link_to 'Tables', '#tables'
2015-10-24 18:46:33 +05:30
%li
= link_to 'Nav', '#nav'
2015-04-26 12:48:37 +05:30
%li
= link_to 'Buttons', '#buttons'
2016-06-02 11:05:42 +05:30
%li
= link_to 'Dropdowns', '#dropdowns'
2015-04-26 12:48:37 +05:30
%li
= link_to 'Panels', '#panels'
%li
= link_to 'Alerts', '#alerts'
%li
= link_to 'Forms', '#forms'
%li
= link_to 'Files', '#file'
%li
= link_to 'Markdown', '#markdown'
%h2#blocks Blocks
2016-06-02 11:05:42 +05:30
.lead
Content block separated with botton border
%code .content-block
2015-10-24 18:46:33 +05:30
2016-06-02 11:05:42 +05:30
.example
.content-block
%h4 Normal block inside content
= lorem
2015-10-24 18:46:33 +05:30
2016-06-02 11:05:42 +05:30
.content-block
%h4 Second block
= lorem
2015-04-26 12:48:37 +05:30
2016-06-02 11:05:42 +05:30
.lead
Gray content block with side padding using
%code .row-content-block
2015-04-26 12:48:37 +05:30
2016-06-02 11:05:42 +05:30
.example
.row-content-block
%h4 Normal block inside content
= lorem
.row-content-block.second-block
%h4 Second block
2015-12-23 02:04:40 +05:30
= lorem
2016-06-02 11:05:42 +05:30
.lead
Cover block for profile page with avatar, name and description
%code .cover-block
.example
.cover-block
.avatar-holder
2018-03-27 19:54:05 +05:30
= image_tag avatar_icon_for_email('admin@example.com', 90), class: "avatar s90", alt: ''
2016-06-02 11:05:42 +05:30
.cover-title
John Smith
2019-09-04 21:01:54 +05:30
.cover-desc.cgray
2016-06-02 11:05:42 +05:30
= lorem
.cover-controls
2018-11-08 19:23:39 +05:30
= link_to '#', class: 'btn btn-default' do
2016-06-02 11:05:42 +05:30
= icon('pencil')
2018-11-08 19:23:39 +05:30
= link_to '#', class: 'btn btn-default' do
2016-06-02 11:05:42 +05:30
= icon('rss')
2015-12-23 02:04:40 +05:30
2015-04-26 12:48:37 +05:30
%h2#lists Lists
2016-06-02 11:05:42 +05:30
.lead
Simple list using
2015-10-24 18:46:33 +05:30
%code .content-list
2016-06-02 11:05:42 +05:30
.example
%ul.content-list
%li
One item
%li
One item
%li
One item
2015-04-26 12:48:37 +05:30
2016-06-02 11:05:42 +05:30
.lead
List with avatar, title and description using
%code .content-list
2015-04-26 12:48:37 +05:30
2016-06-02 11:05:42 +05:30
.example
%ul.content-list
%li
= image_tag 'no_avatar.png', class: 'avatar s40'
.title Title
.description Description
%li
= image_tag 'no_avatar.png', class: 'avatar s40'
.title Title
.description Description
%li
= image_tag 'no_avatar.png', class: 'avatar s40'
.title Title
.description Description
.lead
List with hover effect
2018-11-08 19:23:39 +05:30
%code .hover-list
2016-06-02 11:05:42 +05:30
.example
2018-11-08 19:23:39 +05:30
%ul.hover-list
2015-04-26 12:48:37 +05:30
%li
One item
%li
One item
%li
One item
2016-06-02 11:05:42 +05:30
.lead
List inside panel
.example
2018-11-08 19:23:39 +05:30
.card
.card-header Your list
%ul.content-list
2016-06-02 11:05:42 +05:30
%li
One item
%li
One item
%li
One item
2015-04-26 12:48:37 +05:30
%h2#tables Tables
.example
%table.table
%thead
%tr
%th #
%th First Name
%th Last Name
%th Username
%tbody
%tr
%td 1
%td Mark
%td Otto
%td @mdo
%tr
%td 2
%td Jacob
%td Thornton
%td @fat
%tr
%td 3
%td Larry
%td the Bird
%td @twitter
2015-10-24 18:46:33 +05:30
%h2#navs Navigation
2016-06-02 11:05:42 +05:30
.lead
Holder for top page navigation. Includes navigation, search field, sorting and button
2016-04-02 18:10:28 +05:30
%code .top-area
.example
.top-area
2018-11-08 19:23:39 +05:30
%ul.nav-links.nav.nav-tabs
2016-04-02 18:10:28 +05:30
%li.active
%a Open
%li
%a Closed
.nav-controls
= text_field_tag 'sample', nil, class: 'form-control'
.dropdown
2017-08-17 22:00:37 +05:30
%button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
2016-04-02 18:10:28 +05:30
%span Sort by name
2016-06-02 11:05:42 +05:30
= icon('chevron-down')
2016-04-02 18:10:28 +05:30
%ul.dropdown-menu
%li
2018-03-17 18:26:18 +05:30
= link_to 'Sort by date', '#'
2016-04-02 18:10:28 +05:30
2018-12-05 23:21:45 +05:30
= link_to 'New issue', '#', class: 'btn btn-success btn-inverted'
2016-04-02 18:10:28 +05:30
2016-06-02 11:05:42 +05:30
.lead
Only nav links without button and search
2016-01-19 16:12:03 +05:30
%code .nav-links
2015-10-24 18:46:33 +05:30
.example
2016-01-19 16:12:03 +05:30
%ul.nav-links
2015-10-24 18:46:33 +05:30
%li.active
%a Open
%li
%a Closed
2015-04-26 12:48:37 +05:30
%h2#buttons Buttons
.example
2018-11-08 19:23:39 +05:30
%button.btn.btn-default{ :type => "button" } Secondary
2017-08-17 22:00:37 +05:30
%button.btn.btn-primary{ :type => "button" } Primary
%button.btn.btn-success{ :type => "button" } Success
%button.btn.btn-info{ :type => "button" } Info
%button.btn.btn-warning{ :type => "button" } Warning
%button.btn.btn-danger{ :type => "button" } Danger
%button.btn.btn-link{ :type => "button" } Link
2015-04-26 12:48:37 +05:30
2016-06-02 11:05:42 +05:30
%h2#dropdowns Dropdowns
.example
.clearfix
2018-11-08 19:23:39 +05:30
.dropdown.inline.float-left
2017-08-17 22:00:37 +05:30
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
2016-06-02 11:05:42 +05:30
Dropdown
= icon('chevron-down')
%ul.dropdown-menu
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2018-11-08 19:23:39 +05:30
.dropdown.inline.float-right
2017-08-17 22:00:37 +05:30
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
2016-06-02 11:05:42 +05:30
Dropdown
= icon('chevron-down')
2018-11-08 19:23:39 +05:30
%ul.dropdown-menu.dropdown-menu-right
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
.example
%div
.dropdown.inline
2017-08-17 22:00:37 +05:30
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
2016-06-02 11:05:42 +05:30
Dropdown
= icon('chevron-down')
%ul.dropdown-menu.dropdown-menu-selectable
%li
2017-08-17 22:00:37 +05:30
%a.is-active{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
.example
%div
.dropdown.inline
2017-08-17 22:00:37 +05:30
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
2016-06-02 11:05:42 +05:30
Dropdown
= icon('chevron-down')
.dropdown-menu.dropdown-select.dropdown-menu-selectable
.dropdown-title
2017-08-17 22:00:37 +05:30
%span Dropdown title
%button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
2016-06-02 11:05:42 +05:30
= icon('times')
.dropdown-input
2017-08-17 22:00:37 +05:30
%input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
2016-06-02 11:05:42 +05:30
= icon('search')
.dropdown-content
%ul
%li
2017-08-17 22:00:37 +05:30
%a.is-active{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li.divider
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
.dropdown-footer
%strong Tip:
2020-03-13 15:44:24 +05:30
If an author is not a member of this project, you can still filter by their name while using the search field.
2016-06-02 11:05:42 +05:30
.dropdown.inline
2017-08-17 22:00:37 +05:30
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
2016-06-02 11:05:42 +05:30
Dropdown loading
= icon('chevron-down')
.dropdown-menu.dropdown-select.dropdown-menu-selectable.is-loading
.dropdown-title
2017-08-17 22:00:37 +05:30
%span Dropdown title
%button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
2016-06-02 11:05:42 +05:30
= icon('times')
.dropdown-input
2017-08-17 22:00:37 +05:30
%input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
2016-06-02 11:05:42 +05:30
= icon('search')
.dropdown-content
%ul
%li
2017-08-17 22:00:37 +05:30
%a.is-active{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li.divider
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
%a{ href: "#" }
Dropdown option
2016-06-02 11:05:42 +05:30
.dropdown-footer
%strong Tip:
2020-03-13 15:44:24 +05:30
If an author is not a member of this project, you can still filter by their name while using the search field.
2016-06-02 11:05:42 +05:30
.dropdown-loading
= icon('spinner spin')
.example
%div
.dropdown.inline
2017-08-17 22:00:37 +05:30
%button.dropdown-menu-toggle{ type: 'button', data: {toggle: 'dropdown' } }
2016-06-02 11:05:42 +05:30
Dropdown user
= icon('chevron-down')
.dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-user
.dropdown-title
2017-08-17 22:00:37 +05:30
%span Dropdown title
%button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
2016-06-02 11:05:42 +05:30
= icon('times')
.dropdown-input
2017-08-17 22:00:37 +05:30
%input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
2016-06-02 11:05:42 +05:30
= icon('search')
.dropdown-content
%ul
%li
2017-08-17 22:00:37 +05:30
%a.dropdown-menu-user-link.is-active{ href: "#" }
2016-06-02 11:05:42 +05:30
= link_to_member_avatar(@user, size: 30)
%strong.dropdown-menu-user-full-name
= @user.name
.dropdown-menu-user-username
= @user.to_reference
.example
%div
.dropdown.inline
2017-08-17 22:00:37 +05:30
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
2016-06-02 11:05:42 +05:30
Dropdown page 2
= icon('chevron-down')
.dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-user.dropdown-menu-paging.is-page-two
.dropdown-page-one
.dropdown-title
2017-08-17 22:00:37 +05:30
%button.dropdown-title-button.dropdown-menu-back{ aria: { label: "Go back" } }
2016-06-02 11:05:42 +05:30
= icon('arrow-left')
2017-08-17 22:00:37 +05:30
%span Dropdown title
%button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
2016-06-02 11:05:42 +05:30
= icon('times')
.dropdown-input
2017-08-17 22:00:37 +05:30
%input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
2016-06-02 11:05:42 +05:30
= icon('search')
.dropdown-content
%ul
%li
2017-08-17 22:00:37 +05:30
%a.dropdown-menu-user-link.is-active{ href: "#" }
2016-06-02 11:05:42 +05:30
= link_to_member_avatar(@user, size: 30)
%strong.dropdown-menu-user-full-name
= @user.name
.dropdown-menu-user-username
= @user.to_reference
.dropdown-page-two
.dropdown-title
2017-08-17 22:00:37 +05:30
%button.dropdown-title-button.dropdown-menu-back{ aria: { label: "Go back" } }
2016-06-02 11:05:42 +05:30
= icon('arrow-left')
%span Create label
2017-08-17 22:00:37 +05:30
%button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
2016-06-02 11:05:42 +05:30
= icon('times')
.dropdown-input
2017-08-17 22:00:37 +05:30
%input.dropdown-input-field{ type: "search", placeholder: "Name new label" }
2016-06-02 11:05:42 +05:30
.dropdown-content
%button.btn.btn-primary
Create
.example
%div
.dropdown.inline
2017-08-17 22:00:37 +05:30
%button#js-project-dropdown.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
2016-06-02 11:05:42 +05:30
Projects
= icon('chevron-down')
.dropdown-menu.dropdown-select.dropdown-menu-selectable
.dropdown-title
%span Go to project
2017-08-17 22:00:37 +05:30
%button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
2016-06-02 11:05:42 +05:30
= icon('times')
.dropdown-input
2017-08-17 22:00:37 +05:30
%input.dropdown-input-field{ type: "search", placeholder: "Filter results" }
2016-06-02 11:05:42 +05:30
= icon('search')
.dropdown-content
.dropdown-loading
= icon('spinner spin')
.example
%div
= dropdown_tag("Projects", options: { title: "Go to project", filter: true, placeholder: "Filter projects" })
2015-04-26 12:48:37 +05:30
%h2#panels Panels
.row
.col-md-6
2018-11-08 19:23:39 +05:30
.card.bg-success
.card-header Success
.card-body
2015-04-26 12:48:37 +05:30
= lorem
2018-11-08 19:23:39 +05:30
.card.bg-primary
.card-header Primary
.card-body
2015-04-26 12:48:37 +05:30
= lorem
2018-11-08 19:23:39 +05:30
.card.bg-info
.card-header Info
.card-body
2015-04-26 12:48:37 +05:30
= lorem
.col-md-6
2018-11-08 19:23:39 +05:30
.card.bg-warning
.card-header Warning
.card-body
2015-04-26 12:48:37 +05:30
= lorem
2018-11-08 19:23:39 +05:30
.card.bg-danger
.card-header Danger
.card-body
2015-04-26 12:48:37 +05:30
= lorem
2017-08-17 22:00:37 +05:30
%h2#alerts Alerts
2015-04-26 12:48:37 +05:30
.row
.col-md-6
.alert.alert-success
= lorem
.alert.alert-info
= lorem
.col-md-6
.alert.alert-warning
= lorem
.alert.alert-danger
= lorem
%h2#forms Forms
2016-06-02 11:05:42 +05:30
.lead
Horizontal form when label rendered inline with input
2015-04-26 12:48:37 +05:30
%code form.horizontal-form
2016-06-02 11:05:42 +05:30
.example
2018-11-08 19:23:39 +05:30
%form
.form-group.row
%label.col-sm-2.col-form-label{ :for => "inputEmail3" } Email
2016-06-02 11:05:42 +05:30
.col-sm-10
2017-08-17 22:00:37 +05:30
%input#inputEmail3.form-control{ :placeholder => "Email", :type => "email" }/
2018-11-08 19:23:39 +05:30
.form-group.row
%label.col-sm-2.col-form-label{ :for => "inputPassword3" } Password
2016-06-02 11:05:42 +05:30
.col-sm-10
2017-08-17 22:00:37 +05:30
%input#inputPassword3.form-control{ :placeholder => "Password", :type => "password" }/
2018-11-08 19:23:39 +05:30
.form-group.row
.offset-sm-2.col-sm-10
.form-check
%input.form-check-input{ :type => "checkbox" }/
%label.form-check-label
2016-06-02 11:05:42 +05:30
Remember me
2018-11-08 19:23:39 +05:30
.form-group.row
.offset-sm-2.col-sm-10
2017-08-17 22:00:37 +05:30
%button.btn.btn-default{ :type => "submit" } Sign in
2016-06-02 11:05:42 +05:30
.lead
Form when label rendered above input
2015-04-26 12:48:37 +05:30
%code form
2016-06-02 11:05:42 +05:30
.example
%form
.form-group
2017-08-17 22:00:37 +05:30
%label{ :for => "exampleInputEmail1" } Email address
%input#exampleInputEmail1.form-control{ :placeholder => "Enter email", :type => "email" }/
2016-06-02 11:05:42 +05:30
.form-group
2017-08-17 22:00:37 +05:30
%label{ :for => "exampleInputPassword1" } Password
%input#exampleInputPassword1.form-control{ :placeholder => "Password", :type => "password" }/
2018-11-08 19:23:39 +05:30
.form-check
%input.form-check-input{ :type => "checkbox" }/
%label.form-check-label
2016-06-02 11:05:42 +05:30
Remember me
2017-08-17 22:00:37 +05:30
%button.btn.btn-default{ :type => "submit" } Sign in
2015-04-26 12:48:37 +05:30
%h2#file File
2015-12-23 02:04:40 +05:30
%h4
2015-04-26 12:48:37 +05:30
%code .file-holder
2017-09-10 17:25:29 +05:30
- blob = Snippet.new(content: "Wow\nSuch\nFile").blob
2015-04-26 12:48:37 +05:30
.example
.file-holder
2017-08-17 22:00:37 +05:30
.js-file-title.file-title
2015-04-26 12:48:37 +05:30
Awesome file
.file-actions
.btn-group
%a.btn Edit
2015-12-23 02:04:40 +05:30
%a.btn.btn-danger Remove
2019-12-21 20:55:43 +05:30
= render 'shared/file_highlight', blob: blob
2015-04-26 12:48:37 +05:30
%h2#markdown Markdown
2015-12-23 02:04:40 +05:30
%h4
2019-07-07 11:18:12 +05:30
%code .md
2015-04-26 12:48:37 +05:30
Markdown rendering has a bit different css and presented in next UI elements:
%ul
%li comment
%li issue, merge request description
%li wiki page
%li help page
2016-09-29 09:46:39 +05:30
You can check how markdown rendered at #{link_to 'Markdown help page', help_page_path("user/markdown")}.