Skip to main content

Cell

A navigation element to display a page of categorized content.

github
View source code
import { Cell } from '@uhg-abyss/mobile';
() => {
return (
<Cell
eyebrow="eyebrow"
heading="Cell Heading"
subheading="Subheading"
paragraph="Paragraph content here"
/>
);
};

Leading Content

The leadingContent prop defines the cell's content on the left-hand side. This may contain the IconBrand component, a utility icon (IconSymbol), or an Avatar.

Main Content

The eyebrow prop defines the cell's eyebrow. This prop can either be text or a custom component such as Badge.

The heading prop defines the cell's heading.

The subheading prop defines the cell's subheading.

The paragraph prop defines the cell's paragraph.

The trailingIcon prop places an icon at the end of the heading. This will not show unless there is also a defined heading prop. When this icon is present, only the icon is pressable, not the entire cell.

A link can be displayed below the paragraph using the link prop. A link may also be passed to the value prop to be displayed on the right side of the cell.

Trailing Content

The value prop defines the value component on the right side of the cell. This is generally used to display a numerical value but can also display the Link component. If the value prop exists, the cell cannot contain an onPress function.

The indicator prop defines the indicator component on the right side of the cell. Unlike value, this prop can co-exist with an onPress function. Either a string or a custom Component can be passed here.

When a link prop is present inside the cell, the cell itself is not pressable. The link element handles its own tap interaction independently. The indicator prop can still co-exist with link, but onPress will not fire on the cell row.

The navIcon prop defines the icon that appears on the far right side of the cell. This icon will only exist when an onPress function exists.

isDisabled

isDisabled is a prop available for type radio, checkbox, and toggle.

When isDisabled is present in CellGroup, the entire group is disabled and cannot be modified. However, if isDisabled is present in Cell, only that cell is disabled and cannot be modified.

Cell Props

NameTypeDefaultRequiredDescription
eyebrow
string | number | React.JSX.Element | undefined
--
The eyebrow of the cell. Can also be a Badge
heading
string | undefined
--
The heading of the cell
indicator
string | React.ReactNode | undefined
--
The element placed on the right of the cell
isDisabled
boolean | undefined
false
-
Disabled the cell
leadingContent
React.ReactNode | undefined
--
The leading content may contain the IconBrand component, a utility icon, or an Avatar
link
React.JSX.Element | undefined
--
The link of the cell
navIcon
React.ReactNode | undefined
''chevron_right' IconSymbol'
-
The navigation icon placed on the right of the cell, uses onPress event.
onChange
(value: boolean) => void | undefined
--
Callback fired when the cell value is changed. Only applies to the toggle cell type.
onPress
Abyss.GestureResponderEventHandler
--
The onPress event of the cell
onPressIn
Abyss.GestureResponderEventHandler
--
The onPressIn event of the cell
onPressOut
Abyss.GestureResponderEventHandler
--
The onPressOut event of the cell
paragraph
string | undefined
--
The paragraph of the cell
selectAll
boolean | undefined
--
The Select All checkbox cell
subheading
string | undefined
--
The subheading of the cell
trailingIcon
React.ReactNode | undefined
--
The icon placed next to the heading text
type
'default' | 'radio' | 'toggle' | 'checkbox' | undefined
'default'
-
The type of cell
value
any | undefined
--
The value of the cell defining defaults for toggle, radio, and checkbox.

It can also be used to define value shown on the right side of an un-pressable cell

Cell Classes

Class NameDescription
abyss-cell-rootCell root
abyss-cell-leading-contentThe leading content. Can include IconBrand component, a utility icon, or an Avatar
abyss-cell-content-wrapperThe content wrapper of the cell
abyss-cell-eyebrowCell eyebrow
abyss-cell-headingCell heading
abyss-cell-subheadingCell subheading
abyss-cell-paragraphCell paragraph
abyss-cell-valueCell value
abyss-cell-radio-buttonRadio component
abyss-cell-checkbox-buttonCheckbox component
abyss-cell-toggle-buttonToggleSwitch component
abyss-cell-indicatorCell indicator
abyss-cell-nav-icononPress icon to the far right of cell
abyss-cell-trailing-iconThe icon placed at the end of the heading
abyss-cell-icon-buttonThe icon button at the end of the heading

It is the responsibility of consuming teams to make sure all components within Cell are accessible.
When possible, please test on physical devices for accessibility accuracy.

Cell Tokens

Token NameValue
cell.color.surface.container.rest
#FFFFFF
cell.color.surface.container.active
#F3F3F3
cell.color.border.content
#CBCCCD
cell.color.text.label
#323334
cell.color.text.indicator
#007000
cell.color.text.value-text
#323334
cell.color.text.heading
#002677
cell.color.text.paragraph
#4B4D4F
cell.color.text.subheading
#323334
cell.color.text.eyebrow
#4B4D4F
cell.color.icon.leading.utility
#002677
cell.color.icon.trailing.utility
#4B4D4F
cell.color.icon.trailing.interactive
#196ECF
cell.border-width.bottom.content
0.5
cell.sizing.icon.all.leading
24
cell.sizing.icon.all.trailing
24
cell.spacing.padding.horizontal.container
16
cell.spacing.padding.left.container
16
cell.spacing.padding.right.content
16
cell.spacing.padding.vertical.content
16
cell.spacing.gap.horizontal.content
16
cell.spacing.gap.horizontal.trailing-text
8
cell.spacing.gap.vertical.main-content
2

Cell Classes

V2V1Status
cell-checkbox-buttoncell-checkbox-buttonUnchanged
cell-content-wrappercell-content-wrapperUnchanged
cell-eyebrowcell-eyebrowUnchanged
cell-headingcell-titleRenamed
cell-icon-button-Added
-cell-icon-rightRemoved
-cell-indicatorRemoved
-cell-info-buttonRemoved
-cell-info-iconRemoved
cell-leading-content-Added
-cell-left-wrapperRemoved
cell-nav-icon-Added
cell-paragraphcell-descriptionRenamed
cell-radio-buttoncell-radio-buttonUnchanged
-cell-right-wrapperRemoved
cell-rootcell-rootUnchanged
cell-subheadingcell-subtitleRenamed
cell-toggle-buttoncell-toggle-buttonUnchanged
cell-trailing-icon-Added
-cell-valueRemoved

Cell Props

V2V1Status
eyebroweyebrowUnchanged
-footerRemoved
headingtitleRenamed
-highlightRemoved
-iconBackgroundColorRemoved
indicatorindicatorUnchanged
isDisabledisDisabledUnchanged
leadingContenticonRenamed
link-Added
navIcon-Added
onChangeonChangeUnchanged
onPressonPressUnchanged
onPressInonPressInUnchanged
onPressOutonPressOutUnchanged
paragraphdescriptionRenamed
-pressIconRemoved
selectAllselectAllUnchanged
subheadingsubtitleRenamed
-titleColorRemoved
-titleWeightRemoved
trailingIcon-Added
typetypeUnchanged
valuevalueUnchanged
Table of Contents