Skip to content

Control

<ns-control>

Overview

A control button allows users to manipulate the UI or perform an action.

✨ This is an auto-generated AI summary of the ns-control's documentation. It may not be accurate. ✨

ns-control allows users to take actions or make choices with a single interaction. These buttons can have text visible or hidden if the icon is enough to convey meaning.

Examples

Guidance

Standard

Labelled diagram of ns-control

Key

KeyField typeGuidelines
ALabelKeep the text short, relevant, and actionable. It should not exceed 24 characters.
BIconUse to support and highlight the type of control.

Implementation

Specification

Attributes

icon
Property
icon
Description
The icon to display in the control button. Defaults to 'plus'.
Type
string
Options
chevron chevron-left chevron-right chevron-up chevron-down plus minus cross search
Options
Refer to our icons.
Default
plus
text-position
Property
textPosition
Description
The position of the text relative to the control.
Type
string
Options
start end
Default
end
hide-text
Property
hideText
Description
The toggle to hide the text content.
Type
boolean
Default
false
type
Property
type
Type
string
Default
standard

Slots

SlotPermitted tagsDescription
Anonymous slotThe anonymous slot for text content; this must be present even if `hide-text` is set to true (required). as users of assistive technology still need context.

Events

NameDescription
clickDispatched when the control button is clicked.

Last updated: