📲
HC Mobile App UI Docs
  • Introduction
  • Foundations
    • Colors
    • Icons
    • Layout Primitives
    • Theming
  • Typography
    • Heading
    • Text
    • Custom Fonts
  • Components
    • Accordion
    • Avatar
    • Bottom Sheet
    • Button
    • Button Group
    • Card List
    • Card List Item
    • Checkbox
    • Chip
    • Date Picker
    • Divider
    • Expandable Card
    • Floater
    • Horizontal List
    • Icon
    • Icon Toggle
    • Link
    • List Header
    • Lower Prompt
    • Nestable List
    • Pill Toggle
    • Radio
    • Select Picker
    • Selectable List
    • Text Input
    • Tiles
  • Utilities
    • Device Utilities
    • Layout Utilities
  • Resources
    • Issues
    • Changelog
    • GitHub
Powered by GitBook
On this page
  1. Components

Nestable List

PreviousLower PromptNextPill Toggle

Last updated 3 years ago

CtrlK
  • Installation
  • Example
  • Props

Installation

import { NestableList, NestableListProps } from 'hc-mobile-app-ui';

Example

Props

List Props

Name
Type
Description

items

Array<ItemProps> (See Below)

List items to be shown.

parentPadding

number

Horizontal padding for parent item.

childPadding

number

Horizontal padding for child item.

Item Props

Name
Type
Description

id

string | number

A unique ID for this item.

children

Array<ChildItemProps> (See Below)

List of children.

disabled

boolean

If true, disables the item. Defaults to false.

Child Item Props

Name
Type
Description

id

string | number

A unique ID for this item.

onPress

function

Function to be called when this item is pressed.

label

string

Label for the item.

Parent Item Props

Name
Type
Description

onPress

function

Function to be called when this item is pressed.

label

string

Label for the item.

onPress

function

Function to be called when this item is pressed.

label

string

Label for the item.