reactnative-visual
  • @dormakaba/digital-reactnative-visual
  • Getting started
  • Changelog
  • Components
    • Avatar
    • Button
    • Card
    • Checkbox / Radio
    • Icons
    • IconButton
    • Image Cropper
    • Page, Row, Col
    • List, ListItem
    • Modal
    • Notification
    • QR Code Reader
    • Select
    • Snack
    • Swipeable
    • Textfield
    • Typography: H1, P, Label, Hint, Text
  • Page Templates
    • Animated Login View
    • Login Area View
    • Animated Panel List
    • Animated Avatar View
  • Misc
    • Colors
    • VisualProvider
  • Show Cases
    • exivo
Powered by GitBook
On this page
  • Preview
  • Code sample
  • Props
  1. Page Templates

Animated Panel List

Used to add a top panel to a list for filtering, ... which gets out of the way when scrolling.

PreviousLogin Area ViewNextAnimated Avatar View

Last updated 6 years ago

Preview

Code sample

import { AnimatedPanelList } from '@dormakaba/digital-reactnative-visual';

 <AnimatedPanelList
    withSections
    navbarHeight={110}
    keyExtractor={(item, index) => item._id}
    data={getData(persons)}
    panel={
      <View style={{ flex: 1, justifyContent: 'flex-start', backgroundColor: colors.backgroundGray, padding: 10, paddingTop: 0 }}>
        <Textfield icon="icon-search" placeholder="search" noBorder />
        <Button primary block containerStyle={{ marginTop: 10 }}>Add Person</Button>
      </View>
    }
    renderItem={({ item }) => {
      return (
        <List.Item
          onPress={action('clicked-item')}
          success={item.firstname.charAt(0) === "J"}
          warning={item.firstname.charAt(0) === "L"}
          title={`${item.firstname} ${item.lastname}`}
          text="lorem ipsum dolores opsi quantum oretasi."
          icon="icon-badge"
          rightIcon="icon-profile"
        />
      );
    }}
  /> 

Props

Name

Type

Description

data

array

renderItem

function

render function based on react-native list

renderSectionHeader

function

override default section header rendering

renderSeparator

node

override default rendering of separator line

panel

node

The content of the panel to show/hide on scroll

navbarHeight

integer

height of the panel (needed to calculate animations upfront)

withSections

boolean

toggles rendering of section headers

keyExtractor

function

used to get key to set per list item

...

Array of items to render or array of sections. Learn more about react-native .

props of react-native

SectionList
SectionList