System Mode

Accordion

An <Accordion> hides content behind a header. Typically found in forms, they hide complex content until the user interacts with the header.

Singular usage


An <Accordion> requires a title and content to show:

By default, <Accordion> components control their open state themselves, but can be controlled externally:

You can also render an uncontrolled accordion as open by default:

Open by default
You should see me on page load.

By default, the content of an <Accordion> isn't mounted until opened, after which, the content stays mounted:

This can be changed to either mount the content along with the rest of the <Accordion> or to mount the content each time the component is opened:

Group usage


<Accordion> components can be grouped together:

When grouped, the <Accordion.Group> component is responsible for keeping track of which component is open. As before, by default, the component keeps its own internal state, but can be controlled externally, as well as with a default initial state.

First child
One
Third child
Three! I'm open by default!

Controlled/uncontrolled <Accordion.Group> components can have multiple components open at the same time by default as well:

First child
One! I'm open by default!
Third child
Three! I'm also open by default.

You can configure an uncontrolled <Accordion.Group>component to only be able to have one child open at a time

Alert

TypeIconWith Description

Avatar

An avatar (<Avatar>) is a compact information display. The information is abbreviated with an option to hover for an unabbreviated view.

Variations


SizesExtraSmall
TU
Small (Default Size)
TU
Medium
TU
Large
TU
ExtraLarge
TU
ShapeSquare
TU
ColorMuted palette
TU
No Color
TU
Inactive
TU
TooltipCustom tooltip text
TU
Hide tooltip
TU

Group


TU
SP
EI

Badges

<Badge> is a short piece of information or status descriptor for UI elements.

Usage


Default Usage
content
Status Badge Variation
POTENTIALPULLING IMAGERUNNINGCOMPLETEDDELETING

<Breadcrumb>s should be used as a navigational aid in your app or site. They indicate the current page's location within a hierarchy and help the user understand where they are in relation to the rest of that hierarchy. They also afford one-click access to higher levels of that hierarchy.

Breadcrumbs are typically placed, in horizontal form, under the masthead or navigation of an experience, above the primary content area.

Best practices


Accessibility
  • By default, Breadcrumb uses arrow keys to cycle through each item.
  • Place Breadcrumbs at the top of a page, above a list of items, or above the main content of a page.

Usage


BreadcrumbBreadcrumb with actions

Buttons

<Button>s give people a way to trigger an action. They're typically found in forms, dialog panels, and dialogs. Some buttons are specialized for particular tasks, such as navigation, repeated actions, or presenting menus.

Best practices


Layout
  • For dialog boxes and panels, where people are moving through a sequence of screens, right-align buttons with the container.
  • For single-page forms and focused tasks, left-align buttons with the container.
  • Always place the primary button on the left, the secondary button just to the right of it.
  • Show only one primary button that inherits theme color at rest state. If there are more than two buttons with equal priority, all buttons should have neutral backgrounds.
  • Don't use a button to navigate to another place; use a link instead. The exception is in a wizard where "Back" and "Next" buttons may be used.
  • Don't place the default focus on a button that destroys data. Instead, place the default focus on the button that performs the "safe act" and retains the content (such as "Save") or cancels the action (such as "Cancel").
Content
  • Use sentence-style capitalization—only capitalize the first word.
  • Make sure it's clear what will happen when people interact with the button. Be concise; usually a single verb is best. Include a noun if there is any room for interpretation about what the verb means. For example, "Delete folder" or "Create account".
Accessibility
  • Always enable the user to navigate to focus on buttons using their keyboard.
  • Buttons need to have accessible naming.
  • Aria- and roles need to have consistent (non-generic) attributes.

Usage


Default Button variationsTransparent background, solid border

Primary Button variationsSolid background, no border

Text Button variationsTransparent background, no border

Dashed Button variationsTransparent background, dashed border

Full-width buttons
Shape variation
Circle (icon only, no children)Rounded corners
Status variations

Sizes

With iconWith Icon
As Dropdown trigger with icon
With icon and text displayed in a column

Cards

A Card (<Card>) contains additional metadata or actions. This offers people a richer view into a file than the typical grid view.

Best practices


Content considerations
  • Incorporate metadata that is relevant and useful in this particular view.
  • Don't use a document card in views where someone is likely to be performing bulk operations in files, or when the list may get very long. Specifically, if you're showing all the items inside an actual folder, a card may be overkill because the majority of the items in the folder may not have interesting metadata.
  • Don't use a document card if space is at a premium or you can't show relevant and timely commands or metadata. Cards are useful because they can expose on-item interactions like “Share” buttons or view counts.

Usage


Card default
Card group default

A card group (<Card.Group>) can be used to display a list or grid of cards.

Considerations
  • Ensure links are tab-able.
  • Ensure data is relevant and if not, remove it.
  • We need to revisit the density of each of the cards and content.
  • Implement quick actions inside of the card as to prevent the user from providing additional clicks.
Card variations

Small cards (default)

Card with actions
Disabled card
Clickable card

Medium cards

Card with actions
Disabled card
Clickable card
Card group variations

Wrapping group (default)

Non-wrapping group

Charts

Line Charts (<LineChart>) are a universal component to create charts for learning curve, metrics, cluster history, etc. We currently use the uPlot library.

Label options


A chart with multiple metrics, a title, a legend, an x-axis label, a y-axis label.

Sample
training.Line
validation.Line

Focus series


Highlight a specific metric in the chart.

Sample

Series with all x=0


When all points have x=0, the x-axis bounds should go from 0 to 1.

Series with all x=0

Series with set x axis range


The component accepts an xRange prop to set a minimum and maximum x value for each XAxisDomain.

Chart with set range [-1, 10]

Series with scientific notation


The component accepts yTickValues prop for y-axis tick values. The default setting uses scientific notation for very small or very large numbers:

Chart with scientific notation

Series with single time point


The component accepts an xRange for the time axis, and can show a legend.

Weekly chart with single time point
training.Line

States without data


Loading
Loading state
Loading chart data...

Empty
Empty state
No data to plot.

Chart Grid


A Chart Grid (<ChartGrid>) can be used to place multiple charts in a responsive grid. There is a sync for the plot window, cursor, and selection/zoom of an x-axis range. There will be a linear/log scale switch, and if multiple X-axis options are provided, an X-axis switch.

Scale
Linear
X-Axis
Batches
Sample1
training.Line
Sample2
validation.Line
validation.Alt-Line

Loading
Loading chart data...

Empty

No data available.

Checkboxes

Checkboxes (<Checkbox>) give people a way to select one or more items from a group, or switch between two mutually exclusive options (checked or unchecked, on or off).

Best practices


Layout
  • Use a single check box when there's only one selection to make or choice to confirm. Selecting a blank check box selects it. Selecting it again clears the check box.
  • Use multiple check boxes when one or more options can be selected from a group. Unlike radio buttons, selecting one check box will not clear another check box.
Content
  • Separate two groups of check boxes with headings rather than positioning them one after the other.
  • Use sentence-style capitalization—only capitalize the first word.
  • Don't use end punctuation (unless the check box label absolutely requires multiple sentences).
  • Use a sentence fragment for the label, rather than a full sentence.
  • Make it easy for people to understand what will happen if they select or clear a check box.

Usage


Basic checkboxesVariations

Mandatory checkbox - not implemented.

Mandatory checkbox with info sign - not implemented.

ClipboardButton

ClipboardButton (<ClipboardButton> provides a special button for the purpose of copying some text into the browser clipboard.
Note: This capability is only available on `https` and `localhost` hosts. `http` protocol is purposefully blocked for security reasons.

Usage



Default Clipboard ButtonDisabled Clipboard ButtonCustom Copied Message Clipboard Button

CodeEditor

The Code Editor (<CodeEditor>) shows Python and YAML files with syntax highlighting. If multiple files are sent, the component shows a file tree browser.

  • Use the readonly attribute to make code viewable but not editable.

Usage


Editable Python file
test.py
test.py
import math
print(math.pi)
for i in range(10):
print(i)

Read-only YAML file
test1.yaml
test1.yamlread-only
name: Unicode Test 日本😃
data:
url: https://example.tar.gz
hyperparameters:
learning_rate: 1.0
global_batch_size: 64
n_filters1: 32
n_filters2: 64
dropout1: 0.25
dropout2: 0.5
searcher:
name: single
metric: validation_loss
max_length:
batches: 937 #60,000 training images with batch size 64
smaller_is_better: true
entrypoint: model_def:MNistTrial
resources:
slots_per_trial: 2
Multiple files, one not finished loading.
one.yaml
two.yaml
unloaded.yaml
one.yamlread-only
hyperparameters:
learning_rate: 1.0
global_batch_size: 512
n_filters1: 32
n_filters2: 64
dropout1: 0.25
dropout2: 0.5
Read-only JSON file
test1.json
test1.jsonread-only
{
"a": [
1,
3,
4,
5,
[
3,
4,
5,
5
]
],
"b": [
{
"a": 2,
"b": 2
},
{
"d": "k"
}
],
"c": 1,
"d": "this is a long valueeeeeeeeeeeeeeeeee!",
"e": {
"e": 1
}
}

CodeSample

The CodeSample component contains a block of code (bash, Python, or other) which is displayed for the user to view or copy with a ClipboardButton. Multi-line text is allowed, but single-line text is not wrapped.

Usage


The code is passed in the text prop and is not editable by the user.

det checkpoint download 20cb2c1f-3390-44d2-93a6-f728c594da8c-f728c594da8c-f728c594da8c python3 -c "print('hello world')"

Collection

A Collection (<Collection>) is a two-dimensional grid system that can be used to lay out major page areas or small user interface elements. The gap between items in a collection can be small, medium, or large.

Gaps


Small Gap
Medium Gap (default)
Large Gap

Modes


Auto-Fit (default)
Auto-Fill
Scrollable Row

Color

We have a variety of colors that are available for use with the components in the UI Kit.

Status Colors


--theme-status-active
--theme-status-active-strong
--theme-status-active-weak
--theme-status-active-on
--theme-status-active-on-strong
--theme-status-active-on-weak
--theme-status-critical
--theme-status-critical-strong
--theme-status-critical-weak
--theme-status-critical-on
--theme-status-critical-on-strong
--theme-status-critical-on-weak
--theme-status-inactive
--theme-status-inactive-strong
--theme-status-inactive-weak
--theme-status-inactive-on
--theme-status-inactive-on-strong
--theme-status-inactive-on-weak
--theme-status-pending
--theme-status-pending-strong
--theme-status-pending-weak
--theme-status-pending-on
--theme-status-pending-on-strong
--theme-status-pending-on-weak
--theme-status-success
--theme-status-success-strong
--theme-status-success-weak
--theme-status-success-on
--theme-status-success-on-strong
--theme-status-success-on-weak
--theme-status-warning
--theme-status-warning-strong
--theme-status-warning-weak
--theme-status-warning-on
--theme-status-warning-on-strong
--theme-status-warning-on-weak
--theme-status-potential

Background Colors


--theme-background
--theme-background-strong
--theme-background-weak
--theme-background-on
--theme-background-on-strong
--theme-background-on-weak
--theme-background-border
--theme-background-border-strong
--theme-background-border-weak

Stage Colors


--theme-stage
--theme-stage-strong
--theme-stage-weak
--theme-stage-border
--theme-stage-border-strong
--theme-stage-border-weak
--theme-stage-on
--theme-stage-on-strong
--theme-stage-on-weak

Surface Colors


--theme-surface
--theme-surface-strong
--theme-surface-weak
--theme-surface-border
--theme-surface-border-strong
--theme-surface-border-weak
--theme-surface-on
--theme-surface-on-strong
--theme-surface-on-weak

Float Colors


--theme-float
--theme-float-strong
--theme-float-weak
--theme-float-border
--theme-float-border-strong
--theme-float-border-weak
--theme-float-on
--theme-float-on-strong
--theme-float-on-weak

Overlay Colors


--theme-overlay
--theme-overlay-strong
--theme-overlay-weak

Brand Colors


--theme-brand
--theme-brand-strong
--theme-brand-weak

Interactive Colors


--theme-ix
--theme-ix-strong
--theme-ix-weak
--theme-ix-active
--theme-ix-inactive
--theme-ix-border
--theme-ix-border-strong
--theme-ix-border-weak
--theme-ix-border-active
--theme-ix-border-inactive
--theme-ix-on
--theme-ix-on-strong
--theme-ix-on-weak
--theme-ix-on-active
--theme-ix-on-inactive

Column and Row

Column


A <Column> wraps child components to be displayed in a vertical column.


The content within a Column can be aligned according to an align value.

Left-aligned column
Center-aligned column
Right-aligned column

A Column can have a vertical gap.

Column with gap set to 0:

Row content
Row content

Column with gap set to 8 (default):

Row content
Row content

Column with gap set to 16:

Row content
Row content

A Column can have a width, which is only applied when wrapped in a Row.

Row with 3 Fill Width (default) columns:

Fill Width
Fill Width
Fill Width

Row with 3 Hug Width columns:

Hug Width
Hug Width
Hug Width

Row with 3 Fixed pixel width columns:

Fixed Pixel Width
Fixed Pixel Width
Fixed Pixel Width

Row with 3 columns of each width type:

Fill Width
Hug Width
Fixed Pixel Width

A column can be hidden at mobile resolution

Always displayed
Hidden in mobile

Row


A <Row> wraps child components to be displayed in a horizontal row.


A Row can have a horizontal gap.

Row with gap set to 0:

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.
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.
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.

Row with gap set to 8 (default):

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.
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.
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.

Row with gap set to 16:

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.
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.
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 Row can have its child components wrap.

Column 1
Column 2
Column 3
Column 4
Column 5
Column 6

A Row can have a fixed-pixel height.

Row with fixed-pixel height of 100px:

Column 1
Column 2
Column 3
Column 4
Column 5
Column 6

Rows can have its content alignment set with an align value

Top-aligned

Center-aligned (default)

Bottom-aligned


Rows can have its content justification set with a justifyContent value. Any valid value for the CSS property justify-content will be applied.

Space-between

Start

End


Rows can have a width value

Fill width

Row text

Fixed width

Row text

Nesting


<Column>s and <Row>s can nest arbitrarily

Base Row, Column 1, Row 1, Column 1
Base Row, Column 1, Row 1, Column 2
Base Row, Column 2, Row 1, Column 1
Base Row, Column 2, Row 1, Column 2
Base Row, Column 2, Row 2, Column 1
Base Row, Column 2, Row 2, Column 2

DataGrid

DataGrid is used to display tabular data in a grid, and is implemented with the Glide Data Grid library.


Features and notes:
  • Infinite scroll is disabled by default. To enable, use the infiniteScroll prop.
  • Context Menus are optionally supported by passing a render function to the renderContextMenuComponent prop.
    • The onContextMenuComplete prop is used to handle context menu actions.
    • DataGrid optionally accepts generic types for the actions (strings) that can be done in a context menu (ContextAction) and the data passed to onContextMenuComplete when an action is completed (ContextActionData).
  • Header Menus are optionally supported by passing an array of MenuItems to the getHeaderMenuItems prop.
    • These menus use hew Dropdowns, which is where the MenuItem type comes from.
  • Columns are defined as an array of ColumnDefs. See also "Default column helpers" below. The columns prop should include widths for each column, and the order of this array determines the column order.
    • Updating column order and width is handled via the onColumnResize and onColumnsOrderChangeprops.
    • Pinned columns can be handled with the pinnedColumnsCount and onPinnedColumnsCountChange props.
    • staticColumns is for columns that will *always* be static, such as a checkbox column for row selection.
  • The imperativeRef prop provides an imperative handle, including a scrollToTop helper and access to the current grid ref.
  • Sorting and filtering should be handled outside this component, by changing the data value.
    • The sorts prop is only used to make sure the header displays the correct sort direction arrow.
  • Selection requires some elements to be handled outside of the component:
    • A checkbox column should be included in the columns array. A defaultSelectionColumn helper is provided. See also "Default column helpers" below.
    • The selection column id should be included in the staticColumns prop's array value.
    • selection and onSelectionChange props are used to manage selection state in the parent component.
Prerequisites

This component requires a "portal" div added to the app html (<div id="portal" style="position: fixed; left: 0; top: 0; z-index: 9999;" />) -- also see Glide Data Grid documentation.

Custom renderers

DataGrid uses "custom renderers" for displaying content within cells. These custom renderers have methods for drawing custom HTML Canvas graphics, so that cell content need not be limited to the default renderers/cell types offered by Glide Data Grid.

These are the available renderers:

  • checkboxCell
  • linkCell
  • loadingCell
  • progressCell
  • sparklineCell
  • stateCell
  • tagsCell
  • textCell
  • userAvatarCell

To use one of these renderers for a column's cells, the rendererfunction in the column definition should return a GridCell with the appropriate properties/values:

  • kind should be GridCellKind.Custom
  • data should include a kind property with the name of the renderer in kebab case:{kind: 'text-cell'} (DataGrid/custom-renderers exports string constants for this purpose). This kind values matches the cell with the correct custom renderer.
  • Each custom renderer may also use additional properties on the dataproperty to receive arguments. The specific properties each custom renderer expects can be reviewed by looking at the type passed to `CustomRenderer` in each custom renderer in`DataGrid/custom-renderers/cells/`.

The column definitions provided in DataGrid/columns.ts use custom renderers and can serve as an example. See "Default column helpers" section below for more information.

Default column helpers

DataGrid/columns.ts includes helpers for commonly used columns:

  • Useful for creating dynamic/generic columns based on a dataPath:
    • defaultTextColumn
    • defaultDateColumn
    • defaultNumberColumn
      • also supports heatmap feature with HeatmapProps
  • defaultSelectionColumn to support checkbox selection functionality
    • string for the id of the Selection column (MULTISELECT)
    • also uses headerIcons defined in DataGrid/icons.tsx

as well as the following useful exports:

  • ColumnDef type
  • DEFAULT_COLUMN_WIDTH
  • MIN_COLUMN_WIDTH
Example

Example DataGrid showing infinite scroll, column reordering, column resizing, and row selection:

Page: 0, Loaded row count: 8
NameScoreLast LoginStateArray
falseAlice99Sat Jan 01 2011 00:00:00 GMT+0000 (Coordinated Universal Time)error-
falseBob98Thu Feb 02 2012 00:00:00 GMT+0000 (Coordinated Universal Time)paused[1,2,3,[2,3,4]]
falseCharlie97Sun Mar 03 2013 00:00:00 GMT+0000 (Coordinated Universal Time)stopped[[[[[1,2]]]]]
falseDavid96Fri Apr 04 2014 00:00:00 GMT+0000 (Coordinated Universal Time)success["test","sd",1,3]
falseEve95Tue May 05 2015 00:00:00 GMT+0000 (Coordinated Universal Time)error[{"fd":123}]
falseFrank94Mon Jun 06 2016 00:00:00 GMT+0000 (Coordinated Universal Time)paused[]

DatePicker

DatePicker is a form element for the user to select a specific time, date, or month from a calendar UI. When using onChange, the returned value is a Dayjs object. The component accepts a subset of the props for the Antd.DatePicker, with the style prop replaced by our usage (width).

The picker prop can be set to select a month. Alternatively the showTime prop adds precision to the second.

Usage


DatePickers with labels:Date-time picker
Choose a date and time
Clearable day picker
Choose a date

Un-clearable month picker, without a label

Divider

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.With child elementLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.

Drawer

An <Drawer> is a full-height overlaid sidebar which moves into the viewport from the left or right side.

Left side


Drawer appears from the left side in an animation. Similar to a Modal, it can be closed only by clicking a Close button (at top right) or Escape key.

If the drawer body has extra content, it is scrollable without hiding the header.

Right side


Drawer appears from the right side.

When a drawer has stateful content, that state is persisted when closed and re-opened.

A (<Dropdown>) is used to display a component when triggered by a child element (usually a button). This component can be a menu (a list of actions/options defined via the menu prop), or can be any arbitrary component, defined via the content prop, with default styling applied.

Usage


Dropdown variations
Dropdown menu variations

Form

<Form> and <Form.Item> components are used for submitting user input. When these components wrap a user input field (such as <Input> or <Select>), they can show a standard label, indicate that the field is required, apply input validation, or display an input validation error.

Usage


Form-specific Input variations



Form-specific TextArea variations



Form-specific Password variations



Form-specific InputNumber variations



Form-specific Select variations

Glossary

A Glossary <Glossary> component displays a series of terms alongside their definitions or values.

Usage


Align values left (default)
Key
Value
Multiple values
Value 1
Value 2
Value 3
Component value
Arbitrary component
Value shouldn't overflow
Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam,quisnostrudexercitationullamcolaborisnisiutaliquipexeacommodoconsequat.Duisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeufugiatnullapariatur.Excepteursintoccaecatcupidatatnonproident,suntinculpaquiofficiadeseruntmollitanimidestlaborum.
Align values right
Key
Value
Multiple values
Value 1
Value 2
Value 3
Component value
Arbitrary component
Don't align text inside component value
Arbitrary component
Value shouldn't overflow
Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam,quisnostrudexercitationullamcolaborisnisiutaliquipexeacommodoconsequat.Duisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeufugiatnullapariatur.Excepteursintoccaecatcupidatatnonproident,suntinculpaquiofficiadeseruntmollitanimidestlaborum.

Icons

An <Icon> component displays an icon from a custom font along with an optional tooltip.

Usage


Icon defaultIcon variations

Icon with tooltip

Icon sizes

Icon colors

All icons

add

|

archive

|

arrow-down

|

arrow-left

|

arrow-right

|

arrow-up

|

cancelled

|

checkmark

|

checkpoint

|

clipboard

|

close

|

cloud

|

cluster

|

collapse

|

columns

|

command

|

critical

|

dai-logo

|

dashboard

|

debug

|

docs

|

document

|

download

|

error

|

expand

|

experiment

|

external

|

eye-close

|

eye-open

|

filter

|

fork

|

four-squares

|

fullscreen

|

grid

|

group

|

heat

|

heatmap

|

home

|

info

|

jupyter-lab

|

learning

|

list

|

lock

|

logs

|

model

|

notebook

|

options

|

overflow-horizontal

|

overflow-vertical

|

panel

|

panel-on

|

parcoords

|

pause

|

pencil

|

pin

|

play

|

popout

|

power

|

queue

|

reset

|

row-large

|

row-medium

|

row-small

|

row-xl

|

scatter-plot

|

scroll

|

search

|

searcher-adaptive

|

searcher-grid

|

searcher-random

|

settings

|

shell

|

spinner

|

star

|

stop

|

tasks

|

tensor-board

|

tensorboard

|

trace

|

undo

|

user

|

warning

|

webhooks

|

workspaces

|

exclamation-circle

|

holder

|

minus-circle

|

project

|

active

|

queued

|

spin-bowtie

|

spin-half

|

spin-shadow

InlineForm

The <InlineForm> allows people to have a simple form with just one input to interact with.

Usage


If using the Input.Password component, is important to pass the isPassword prop.


Controlled

Lorem ipsum dolor sit amet, consectetur adipiscing...

*********

off

1234

Uncontrolled
initial value

Lorem ipsum dolor sit amet, consectetur adipiscing...


off

1234

Input

Text fields (<Input>) give people a way to enter and edit text. They're used in forms, modal dialogs, tables, and other surfaces where text input is required.

Best practices


Layout
  • Use a multiline text field when long entries are expected.
  • Don't place a text field in the middle of a sentence, because the sentence structure might not make sense in all languages. For example, "Remind me in [textfield] weeks" should instead read, "Remind me in this many weeks: [textfield]".
  • Format the text field for the expected entry.

Usage


Input <Input>Default InputDisabled Input
TextArea <Input.TextArea>Default TextAreaDisabled TextArea
Password <Input.Password>Default PasswordDisabled Password
Also see Form for form-specific variations

InputNumber

A spin button (<InputNumber>) allows someone to incrementally adjust a value in small steps. It's mainly used for numeric values, but other values are supported too.

Best practices


Layout
  • Place labels to the left of the spin button control. For example, "Length of ruler (cm)".
  • Spin button width should adjust to fit the number values.
Content
  • Use a spin button when you need to incrementally change a value.
  • Use a spin button when values are tied to a unit of measure.
  • Don't use a spin button for binary settings.
  • Don't use a spin button for a range of three values or less.

Usage


Default InputNumber
Disabled InputNumber

Also see Form for form-specific variations

InputSearch

A search box (<InputSearch>) provides an input field for searching content within a site or app to find specific items.

Best practices


Layout
  • Don't build a custom search control based on the default text box or any other control.
  • Use a search box without a parent container when it's not restricted to a certain width to accommodate other content. This search box will span the entire width of the space it's in.
Content
  • Use placeholder text in the search box to describe what people can search for. For example, "Search", "Search files", or "Search contacts list".
  • Although search entry points tend to be similarly visualized, they can provide access to results that range from broad to narrow. By effectively communicating the scope of a search, you can ensure that people's expectations are met by the capabilities of the search you're performing, which will reduce the possibility of frustration. The search entry point should be placed near the content being searched.

Usage


Default SearchboxVariations
In-table Searchbox

Not implemented


Search box with scopes

Not implemented

InputSelect

<InputSelect> is a text-type input component that also allows users to select from a dropdown list of suggestions.

Usage


DefaultCustom filter

Default filter uses case-insensitive string includes. The customFilter prop allows different filtering logic to be applied. Case-sensitive example:

InputShortcut

An input box (<InputShortcut>) for keyboard shortcuts.

Usage


Default Input for ShortcutControlled Input for Shortcut

List

Items in a list must have a title and icon, and can optionally have a subtitle, additional columns, or actions (displayed on hover).

With subtitle

Subtitle Text • Subtitle Link

With subtitle and columns

Subtitle Text • Subtitle Link
Column 1 Text • Column 1 Link
Column 2 Text • Column 2 Link

With actions

Subtitle Text • Subtitle Link
Column 1 Text
Column 2 Text
Columns

List columns are evenly spaced, left-aligned, and have dynamic width. Customizing alignment and width should be handled by styling the components that are passed to the columns prop as column content.

Fixed width columns

Subtitle Text • Subtitle Link
Fixed Width Column
Fixed Width Column

Right-aligned column content

Subtitle Text • Subtitle Link
Column 1 Text
Compact

Lists can be compact, with no subtitle or additional columns. Vertical spacing is reduced accordingly.

Compact Row

Compact Row with actions

Elevation

Lists will respect elevation and use the appropriate color values.

With subtitle

Subtitle Text • Subtitle Link

With subtitle and columns

Subtitle Text • Subtitle Link
Column 1 Text • Column 1 Link
Column 2 Text • Column 2 Link

With actions

Subtitle Text • Subtitle Link
Column 1 Text
Column 2 Text

LogViewer

A Logview (<LogViewer>) prints events that have been configured to be triggered and return them to the user in a running stream.

Best practices


Content considerations
  • Prioritize accessibility and readability of the log entry as details can always be generated afterwards.
  • Prioritize IntelliSense type of readability improvements as it helps scannability of the text.
  • Provide the user with ways of searching & filtering down logs.

Usage


LogViewer default
<[info]>
[2022-06-03 03:48:07]
Determined master 0.19.7-dev0 (built with go1.18.7)
<[info]>
[2022-07-03 03:48:07]
connecting to database determined-master-database-tytmqsutj5d1.cluster-csrkoc1nkoog.us-west-2.rds.amazonaws.com:5432
<[info]>
[2022-08-03 03:48:07]
running DB migrations from file:///usr/share/determined/master/static/migrations; this might take a while...
<[info]>
[2022-09-03 03:48:07]
no migrations to apply; version: 20221026124235
<[error]>
[2022-10-03 03:48:07]
failed to aggregate resource allocation: failed to add aggregate allocation: ERROR: range lower bound must be less than or equal to range upper bound (SQLSTATE 22000) actor-local-addr="allocation-aggregator" actor-system="master" go-type="allocationAggregator"
<[warning]>
[2022-11-03 03:48:07]
received update on unknown agent actor-local-addr="aux-pool" actor-system="master" agent-id="i-018fadb36ddbfe97a" go-type="ResourcePool" resource-pool="aux-pool"
LogViewer with no results

No logs to show.

LogViewerSelect component

A <LogViewerSelect> adds a row of filters (Input and Dropdowns) above the logs. The example here is for layout / style purposes, and does not functionally filter the logs.

<[info]>
[2022-06-03 03:48:07]
Determined master 0.19.7-dev0 (built with go1.18.7)
<[info]>
[2022-07-03 03:48:07]
connecting to database determined-master-database-tytmqsutj5d1.cluster-csrkoc1nkoog.us-west-2.rds.amazonaws.com:5432
<[info]>
[2022-08-03 03:48:07]
running DB migrations from file:///usr/share/determined/master/static/migrations; this might take a while...
<[info]>
[2022-09-03 03:48:07]
no migrations to apply; version: 20221026124235
<[error]>
[2022-10-03 03:48:07]
failed to aggregate resource allocation: failed to add aggregate allocation: ERROR: range lower bound must be less than or equal to range upper bound (SQLSTATE 22000) actor-local-addr="allocation-aggregator" actor-system="master" go-type="allocationAggregator"
<[warning]>
[2022-11-03 03:48:07]
received update on unknown agent actor-local-addr="aux-pool" actor-system="master" agent-id="i-018fadb36ddbfe97a" go-type="ResourcePool" resource-pool="aux-pool"
Considerations
  • Ensure that we don't overload the users with information --> we need to know what events we're listening to.
  • Ensure the capability of searching/filtering log entries.

Message

A <Message> displays persistent information related to the application state. Requires at least one of description or title. Optionally displays an action button and/or an icon.

Usage


Message title

Message description, with a link to more info

Modals

Usage



Sizes

Links and Icons

With form submission

With custom footer

With form validation

Variations

Nameplate

A (<Nameplate>) displays an icon, a name, and an optional alias. The icon is displayed on the left, and the text fields are displayed on the right. If an alias is provided, it is displayed above the name in larger font. A 'compact' option reduces the size of the name for use in a smaller form or modal.

Usage


  • With name and alias
  • TU
    Test User
    testUser123
  • Compact format
  • TU
    Test User
    testUser123
  • No alias
  • testGroup123
  • Compact, no alias
  • testGroup123

    Pagination

    <Pagination> is the process of splitting the contents of a website, or section of contents from a website, into discrete pages. This user interface design pattern is used so users are not overwhelmed by a mass of data on one page. Page breaks are automatically set.

    Best practices


    Content considerations
    • Use ordinal numerals or letters of the alphabet.
    • Indentify the current page in addition to the pages in immediate context/surrounding.

    Usage


    Pagination defaultConsiderations
    • Always give the user the option to navigate to the first & last page -- this helps with sorts.
    • Provide the user with 2 pages before/after when navigating 'island' page-counts.
    • Provide the user with the first 4 or last 4 pages of the page-range.
    • Ensure the FocusTrap is set to the whole pagination component so that user doesn't tabs in/out accidentally.

    Pivot

    The Pivot control (<Tabs>) and related tabs pattern are used for navigating frequently accessed, distinct content categories. Pivots allow for navigation between two or more content views and relies on text headers to articulate the different sections of content.

    Tapping on a pivot item header navigates to that header's section content.

    Tabs are a visual variant of Pivot that use a combination of icons and text or just icons to articulate section content.

    Best practices


    Content considerations
    • Be concise on the navigation labels, ideally one or two words rather than a phrase.
    • Use on content-heavy pages that require a significant amount of scrolling to access the various sections.

    Usage


    Primary Pivot
    Overview



    Secondary Pivot
    Overview

    The active tab and body have elevation applied.

    Overview

    Progress

    The Progress control (<Progress>) displays multiple colorful areas adding up to 100% progress.

    Usage


    Each progress bar part has a required CSS color and a percent value (from 0.0 to 1.0).

    Single progress bar section up to 50%

  • Adding the flat prop displays the progress bar with square corners and no drop shadow.

    Flat variant
  • Exterior components


    A title prop is displayed centered above the progress bar:

    Progress bar with title
    Shareholder Votes

  • Each progress bar part can have an optional label value. With the prop showTooltips, each bar part will have an individual tooltip.

    Progress bar with tooltip labels

  • With the showLegend prop, labels are displayed in a legend below the progress bar. Labels are exactly as sent (i.e. the percentages below are set in the label field).

    Progress bar with legend
  • -Apples (50.0%)
  • -Oranges (25.3%)
  • RadioGroup

    The (<RadioGroup>) serves as a collection of options to choose from.

    It can be represented as radio buttons or simple buttons.

    Usage


    Without a default value

    Button style

    Radio style

    Row style


    With a default value

    Button style

    Radio style

    Row style

    ResponsiveGroup

    A responsive group (<ResponsiveGroup>) is a container that can responsively show and hide children as its size changes. The user can set the maximum number of visible children. The gap between items can be small, medium, or large.

    Usage


    Total number of elements: 2


    maxVisible 3 (default)

    Number of hidden elements: 0

    maxVisible 6

    Number of hidden elements: 0


    Small gap
    Medium gap (default)
    Large gap

    RichTextEditor

    A <RichTextEditor> is used for creating rich text documents. It can be single page documents or multi pages documents. Each page of document consists of a title and a sheet of document.

    Usage


    Single page document
    Add content...

    Multi pages documents

    No documents for this project

    Section

    A Section component serves the purpose to encapsulate any type of content.

    Usage


    Section without title

    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo voluptatem porro exercitationem, labore, suscipit atque ullam...


    Section with title

    Title of the section

    Section with title divider

    Title of the section

    Multiple sections

    Title of the section 1
    Title of the section 2

    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo voluptatem porro exercitationem, labore, suscipit atque ullam...

    Title of the section 3

    Select

    A Select (<Select>) combines a text field and a dropdown giving people a way to select an option from a list or enter their own choice.

    Best practices


    Layout
    • Use a select when there are multiple choices that can be collapsed under one title, when the list of items is long, or when space is constrained.
    Content
    • Use single words or shortened statements as options.
    • Don't use punctuation at the end of options.
    Accessibility
    • Select dropdowns render in their own layer by default to ensure they are not clipped by containers with overflow: hidden or overflow: scroll. This causes extra difficulty for people who use screen readers, so we recommend rendering the ComboBox options dropdown inline unless they are in overflow containers.
    Truncation
    • By default, the Select truncates option text instead of wrapping to a new line. Because this can lose meaningful information, it is recommended to adjust styles to wrap the option text.

    Usage


    Default Select
    VariationsLoading Select
    Select with default value
    Select with label
    Select Label
    Select without placeholder
    Disabled Select
    Select without search
    Non-searchable Select
    Multiple Select with tags
    Multiple Select with tags disabled
    Select with tags and custom search
    Select with sorted search
    Clearable Select
    Responsive Select with large width defined
    Also see Form for form-specific variations

    Spacing

    The spacing scale used in Hew has a base value of 2px and is used for paddings, margins, and gaps.

    Usage


    None: 0px

    CSS variable:
    var(--spacing-none)

    Xs2: 2px

    CSS variable:
    var(--spacing-xs-2)

    Xs: 4px

    CSS variable:
    var(--spacing-xs)

    Sm: 6px

    CSS variable:
    var(--spacing-sm)

    Md: 8px

    CSS variable:
    var(--spacing-md)

    Lg: 12px

    CSS variable:
    var(--spacing-lg)

    Xl: 16px

    CSS variable:
    var(--spacing-xl)

    Xl2: 20px

    CSS variable:
    var(--spacing-xl-2)

    Xl3: 24px

    CSS variable:
    var(--spacing-xl-3)

    Xl4: 32px

    CSS variable:
    var(--spacing-xl-4)

    Xl5: 40px

    CSS variable:
    var(--spacing-xl-5)

    Xl6: 48px

    CSS variable:
    var(--spacing-xl-6)

    Xl7: 64px

    CSS variable:
    var(--spacing-xl-7)

    Spinner

    A <Spinner> indicates a loading state of a page or section.

    Usage


    Spinner default
    Spinner with children
    Spinner with conditional rendering
    Loading
    Loadable spinner

    This text has been loaded!


    VariationsCentered Spinner
    Spinner with tip
    Tip
    Spinner sizes
    tiny
    small
    medium
    large
    big
    great
    huge
    enormous
    giant
    jumbo
    mega

    SplitPane

    The SplitPane displays two resiszable sections of content. Additionally, it provides the ability to hide either pane.

    Usage


    Default Split Pane

    Left Pane

    This message is rendered in the left pane
    Sample
    training.Line
    validation.Line

    SplitPane with initial width

    Left Pane

    This message is rendered in the left pane
    Sample
    training.Line
    validation.Line

    SplitPane with specified minimum pane widths

    Left Pane

    This message is rendered in the left pane
    Sample
    training.Line
    validation.Line

    SplitPane with left pane hidden
    Toggle Left Pane

    Left Pane

    This message is rendered in the left pane
    Sample
    training.Line
    validation.Line

    SplitPane with right pane hidden
    Toggle Right Pane

    Left Pane

    This message is rendered in the left pane
    Sample
    training.Line
    validation.Line

    Surface

    A surface (<Surface>) is a container with an elevation and an optional hover state. By default a surface will be one elevation level higher than the surface it sits on, though this can be overridden.

    Usage


    Default surfaces
    Surfaces with hover state
    Nested surfaces increase elevation

    Tags

    The editable tags list (<Tags>) supports "add", "edit" and "remove" actions on individual tags.

    Best practices


    Content
    • Don't use tags of the same content within one list.
    • Tags are ordered alphabetically.
    • Individual tags cannot be empty.

    Usage


    Tags default
    TODOworking Add Tag
    Tags ghost
    TODOworking Add Tag
    Tags disabled
    TODOworking
    Tags compact
    Add Tagtag1tag2tag3tag4tag5TODO+1 more
    Tags with long text
    very very very long text, very very very long t... Add Tag

    Theme

    A <UIProvider> is also included in the UI kit, it is responsible for providing styling to children components. It requires a theme prop that is a Themeconfiguration with the custom theme options shown below. Additionally, it takes an optional themeIsDark prop to switch the supplied theme between light and dark mode.

    There is also a useTheme hook that can be used from within the UI kit. Additionally, default themes are provided.

    Default Themes


    Several default themes are provided within the UI Kit via DefaultTheme the options are:

    • Light
    • Dark
    • HPELight
    • HPEDark

    useTheme


    Returns properties related to the current Theme


    themeSettings

    Includes the css className used to provide the styling for the theme, and the current values for themeIsDark and current theme


    getThemeVar

    Enables retrieving a value for a specified theme option.

    Theme Options


    The UIProvider takes a Theme prop with the following properties:


    background

    backgroundBorder

    backgroundBorderStrong

    backgroundBorderWeak

    backgroundOn

    backgroundOnStrong

    backgroundOnWeak

    backgroundStrong

    backgroundWeak

    brand

    brandStrong

    brandWeak

    colorScheme

    float

    floatBorder

    floatBorderStrong

    floatBorderWeak

    floatOn

    floatOnStrong

    floatOnWeak

    floatStrong

    floatWeak

    fontFamily

    fontFamilyCode

    density

    fontFamilyVar

    borderRadius

    ix

    borderRadiusStrong

    ixActive

    borderRadiusWeak

    ixBorder

    elevation

    ixBorderActive

    elevationStrong

    stage

    elevationWeak

    stageBorder

    ixBorderInactive

    stageBorderStrong

    ixBorderStrong

    stageBorderWeak

    ixBorderWeak

    strong

    ixInactive

    weak

    ixOn

    stageOn

    ixOnActive

    stageOnStrong

    ixOnInactive

    stageOnWeak

    ixOnStrong

    stageStrong

    ixOnWeak

    stageWeak

    ixStrong

    surface

    ixWeak

    surfaceBorder

    overlay

    surfaceBorderStrong

    overlayStrong

    surfaceOn

    overlayWeak

    surfaceOnStrong

    statusActive

    surfaceStrong

    statusActiveOn

    surfaceWeak

    statusActiveOnStrong

    statusActiveOnWeak

    surfaceOnWeak

    statusActiveStrong

    statusActiveWeak

    surfaceBorderWeak

    statusCritical

    statusCriticalOn

    statusCriticalOnStrong

    statusCriticalOnWeak

    statusCriticalStrong

    statusCriticalWeak

    statusError

    statusInactive

    statusInactiveOn

    statusInactiveOnStrong

    statusInactiveOnWeak

    statusInactiveStrong

    statusInactiveWeak

    statusPending

    statusPendingOn

    statusPendingOnStrong

    statusPendingOnWeak

    statusPendingStrong

    statusPendingWeak

    statusPotential

    statusSuccess

    statusSuccessOn

    statusSuccessOnStrong

    statusSuccessOnWeak

    statusSuccessStrong

    targetFocus

    statusSuccessWeak

    strokeWidth

    statusWarning

    strokeWidthStrong

    statusWarningOn

    strokeWidthWeak

    statusWarningOnStrong

    statusWarningOnWeak

    statusWarningStrong

    statusWarningWeak

    Usage


    UIProviderVariationsEach variation displays a custom Theme with the following theme options set to the specified color:
    • brand
    • backgroundOnStrong
    • statusSuccess
    • stageBorder

    Variation


    Color

    --theme-status-active

    Spinner



    Icon with color success



    Drawer


    Toast


    Variation


    Color

    --theme-status-critical

    Spinner



    Icon with color success



    Drawer


    Toast


    Variation


    Color

    --theme-status-pending-weak

    Spinner



    Icon with color success



    Drawer


    Toast


    Variation


    Color

    --theme-status-success

    Spinner



    Icon with color success



    Drawer


    Toast


    Variation


    Color

    --theme-status-warning

    Spinner



    Icon with color success



    Drawer


    Toast

    Toast

    A <Toast> component is used to display a notification message at the viewport. Typically it's a notification providing a feedback based on the user interaction.

    Usage


    Default toast
    Variations

    Toggle

    A <Toggle> component represents switching between two states. This component is controlled by its parent and may optionally include a label.

    Usage


    Toggle default
    Toggle variations

    Checked

    With label

    Label

    Disabled

    Tooltips

    A (<Tooltip>) is used to display a string value, and is triggered by interaction (either by click or hover) with a child element (usually a Button).

    Usage


    Tooltip triggers
    Variations

    Without arrow

    Tooltip on badge

    Badge

    Placement

    Tree

    Default Tree

    parent 1
    defaultExpandAll
    parent 1
    parent 1-0
    leaf
    leaf
    parent 1-1
    sss

    Typography

    Usage


    Title

    Large Title

    Default Title

    Small Title

    Extra-Small Title

    Body
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ut suscipit itaque debitis amet, eligendi possimus assumenda eos, iusto ea labore, officia aspernatur optio. In necessitatibus porro ut vero commodi neque. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus, omnis quo dolorem magnam dolores necessitatibus iure illo incidunt maiores voluptas odit eligendi dignissimos facilis vel veniam id. Obcaecati, cum eos. (Large)

    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ut suscipit itaque debitis amet, eligendi possimus assumenda eos, iusto ea labore, officia aspernatur optio. In necessitatibus porro ut vero commodi neque. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus, omnis quo dolorem magnam dolores necessitatibus iure illo incidunt maiores voluptas odit eligendi dignissimos facilis vel veniam id. Obcaecati, cum eos. (Default)

    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ut suscipit itaque debitis amet, eligendi possimus assumenda eos, iusto ea labore, officia aspernatur optio. In necessitatibus porro ut vero commodi neque. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus, omnis quo dolorem magnam dolores necessitatibus iure illo incidunt maiores voluptas odit eligendi dignissimos facilis vel veniam id. Obcaecati, cum eos. (Small)

    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ut suscipit itaque debitis amet, eligendi possimus assumenda eos, iusto ea labore, officia aspernatur optio. In necessitatibus porro ut vero commodi neque. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus, omnis quo dolorem magnam dolores necessitatibus iure illo incidunt maiores voluptas odit eligendi dignissimos facilis vel veniam id. Obcaecati, cum eos. (Inactive)

    LabelLarge LabelDefault LabelSmall LabelStrong LabelInactive Label
    Code
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ut suscipit itaque debitis amet, eligendi possimus assumenda eos, iusto ea labore, officia aspernatur optio. In necessitatibus porro ut vero commodi neque. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus, omnis quo dolorem magnam dolores necessitatibus iure illo incidunt maiores voluptas odit eligendi dignissimos facilis vel veniam id. Obcaecati, cum eos. (Default)

    Truncation


    Truncated to 2 rows, no tooltip:
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ut suscipit itaque debitis amet, eligendi possimus assumenda eos, iusto ea labore, officia aspernatur optio. In necessitatibus porro ut vero commodi neque. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus, omnis quo dolorem magnam dolores necessitatibus iure illo incidunt maiores voluptas odit eligendi dignissimos facilis vel veniam id. Obcaecati, cum eos.
    Truncated to 2 rows, with a tooltip containing full text:
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ut suscipit itaque debitis amet, eligendi possimus assumenda eos, iusto ea labore, officia aspernatur optio. In necessitatibus porro ut vero commodi neque. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus, omnis quo dolorem magnam dolores necessitatibus iure illo incidunt maiores voluptas odit eligendi dignissimos facilis vel veniam id. Obcaecati, cum eos.
    Truncated to 2 rows, with custom tooltip:
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ut suscipit itaque debitis amet, eligendi possimus assumenda eos, iusto ea labore, officia aspernatur optio. In necessitatibus porro ut vero commodi neque. Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus, omnis quo dolorem magnam dolores necessitatibus iure illo incidunt maiores voluptas odit eligendi dignissimos facilis vel veniam id. Obcaecati, cum eos.

    Views

    Media queries

    Media queries are provided via Sass mixins, for styling that should only apply to mobile or desktop view. They can be imported into an scss file with @use 'hew/src/kit/scss/media-queries.scss'. Then, use @include media-queries.mobile { } or @include media-queries.desktop { } as the media query.


    Hook

    The `useMobile` hook is used when React components need to behave differently in mobile view.

    The following text changes based on window width, using the `useMobile` hook: Window has desktop width