Create a close icon that can be combined with different components.
Usage
To apply this component, add the gls-close
attribute to an <a>
or <button>
element.
<button type="button" gls-close></button>
<a href="" gls-close></a>
Large modifier
Add the .gls-close-large
class for a larger close button.
<button class="gls-close-large" type="button" gls-close></button>
Close in alerts
This is an example of how this component is used with an alert box from the Alert component.
<div gls-alert>
<button class="gls-alert-close" type="button" gls-close></button>
</div>
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.
<div gls-alert> <button class="gls-alert-close" type="button" gls-close></button> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</p> </div>
Close in drops
This is an example of how this component is used with the Drop component.
<div gls-drop>
<button class="gls-drop-close" type="button" gls-close></button>
</div>
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.
<div class="gls-inline"> <button class="gls-button gls-button-default" type="button">Click</button> <div gls-drop="mode: click"> <div class="gls-card gls-card-body gls-card-default"> <button class="gls-drop-close" type="button" gls-close></button> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</p> </div> </div> </div>
Close in modals
This is an example of how this component is used with the Modal component.
<div id="modal" gls-modal>
<div class="gls-modal-dialog gls-modal-body">
<button class="gls-modal-close-default" type="button" gls-close></button>
</div>
</div>
-
Open modal
Headline
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<a class="gls-button gls-button-default" href="#modal" gls-toggle>Open modal</a> <div id="modal" gls-modal> <div class="gls-modal-dialog gls-modal-body"> <button class="gls-modal-close-default" type="button" gls-close></button> <h2 class="gls-modal-title">Headline</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <p class="gls-text-right"> <button class="gls-button gls-button-default gls-modal-close" type="button">Cancel</button> <button class="gls-button gls-button-primary" type="button">Save</button> </p> </div> </div>