Three-column layout with animation support for tablet displays

Overview

react-native-three-column-layout

thumb

This is a component that provides three-column layout with animation support for tablet displays.

Example

Check out an example project here

Installation

npm install react-native-three-column-layout

Usage

import ThreeColumnLayout from 'react-native-three-column-layout'

return (
  <ThreeColumnLayout
    renderLeftView={() => <View style={[styles.box, styles.leftColumn]} />}
    renderMiddleView={() => <View style={[styles.box, styles.middleColumn]} />}
    renderRightView={() => <View style={[styles.box, styles.rightColumn]} />}
  />
)

const styles = StyleSheet.create({
  box: {
    flex: 1,
  },
  leftColumn: { backgroundColor: 'red' },
  middleColumn: { backgroundColor: 'yellow' },
  rightColumn: { backgroundColor: 'blue' },
})

Props

type RenderView = (callbacks: ThreeColumnLayoutProps) => React.ReactNode
type Props = {
  renderLeftView: RenderView
  renderMiddleView: RenderView
  renderRightView: RenderView
  leftViewVisible?: boolean
  middleViewVisible?: boolean
  leftViewWidth?: number
  middleViewWidth?: number
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

You might also like...
The Beautiful Image component that supports fadeIn animation and shows placeholderSource if the main source can't be loaded. More will be implemented.
The Beautiful Image component that supports fadeIn animation and shows placeholderSource if the main source can't be loaded. More will be implemented.

react-native-beautiful-image The Image component that supports fadeIn animation and shows placeholderSource if the main source can't be loaded. More w

Simple react native state tween animation module.

react-native-tween-animation A simple react native state tween animation module. Usage var animation = new RNTAnimation({ // Start state start: {

⛹️‍♀️⛹️‍♂️ Like animation LoadingIndicator with frame by frame view in React-Native
⛹️‍♀️⛹️‍♂️ Like animation LoadingIndicator with frame by frame view in React-Native

react-native-frame-loading This package offers Loading indicator with frame by frame view or image Install yarn add react-native-frame-loading # or n

Provides a function like transform-origin in css, anchor point in iOS, pivot point in Android. It makes3D transform animation better in React-Native.
Provides a function like transform-origin in css, anchor point in iOS, pivot point in Android. It makes3D transform animation better in React-Native.

react-native-anchor-point Provide a simple, tricky but powerful function, withAnchorPoint , like Anchor Point in iOS, Pivot Point in Android, transfor

Wave UI animation created with ReactNative

Wave UI animation created with ReactNative

A new RN CLI app that includes base components like Text, Animation, Refreshing, Text Input, etc.
A new RN CLI app that includes base components like Text, Animation, Refreshing, Text Input, etc.

A new RN CLI app that includes base components like Text, Animation, Refreshing, Text Input, etc.

Smooth Liquid Swipe Animation to transition between different components.
Smooth Liquid Swipe Animation to transition between different components.

React Native Liquid Swipe Telas com transições baseadas no efeito de Liquid Swipe ✨ Tecnologias Esse projeto foi desenvolvido com as seguintes tecnolo

🐼  The React Native (+ Web) animation library, powered by Reanimated 2.
🐼 The React Native (+ Web) animation library, powered by Reanimated 2.

The universal React Native animation library, powered by Reanimated 2. MotiView from={{ opacity: 0 }} animate={{ opacity: 1 }} / Documentation & Exa

Collapsible-react-component - Collapses and expands content with an animation for react

Collapsible react component Collapses and expands content with an animation. Ins

Comments
  • refactor: improve code with inline ternary conditional

    refactor: improve code with inline ternary conditional

    First of all, many thanks @craftzdog for sharing this with the community! 🙏

    When I was looking at the code I saw some potential improvement and thought about opening a PR. If you need any additional information just ask for it 😄

    Context

    I see some cases when the developer could want to maintain the full if-else instead of using the ternary conditional. But for this specific case, I see a potential benefit in removing the extra code and using the ternary conditional.

    Testing

    The example was changed a little bit adding some buttons and controlling the state of leftViewVisible and middleViewVisible. The code ran locally in a simulator and it seems to be running well with no loss of FPS in animation or eventual "buggy" behavior. Here is the recording that was made:

    https://user-images.githubusercontent.com/7551787/200087501-c34e1f85-6724-44c2-a67d-4e4632ef5be9.mov

    opened by caiangums 1
Owner
Takuya Matsuyama
Digital crafts(man|dog) ╥━━━━━━━━╭━━╮━━┳ ╢╭╮╭━━━━━┫┃▋▋━▅┣ ╢┃╰┫┈┈┈┈┈┃┃┈┈╰┫┣ ╢╰━┫┈┈┈┈┈╰╯╰┳━╯┣ ╢┊┊┃┏┳┳━━┓┏┳┫┊┊┣ ╨━━┗┛┗┛━━┗┛┗┛━━┻
Takuya Matsuyama
A react native modals library. Swipeable. Highly customizable. Support multi modals & Support custom animation. For IOS & Android.

React Native Modals React Native Modals Library for iOS & Android. How to thank me ? Just click on ⭐️ button ?? Try it with Exponent BREAKING CHANGE A

Jack Lam 2.1k Dec 25, 2022
:raised_hands: A pure JS react-native component to render a masonry~ish layout for images with support for dynamic columns, progressive image loading, device rotation, on-press handlers, and headers/captions.

react-native-masonry ?? An easy to use, pure JS react-native component to render a masonry~ish layout for remote images react-native-masonry is built

Brandon Him 1.3k Jan 6, 2023
Easy React Native Layout & Grid for the Dumb

React Native Easy Grid ?? This is NOT-JUST-ANOTHER-GRID-LAYOUT library! We are trying to simplify flexbox with easier approach. Installation npm insta

GeekyAnts 2.1k Dec 24, 2022
Auto Responsive Layout Library For React

autoresponsive-react-native Auto responsive grid layout library for ReactNative. Examples Live demo & docs: xudafeng.github.io/autoresponsive-react of

达峰的夏天 260 Jul 29, 2022
Semantic layout components for React Native

react-native-layout Semantic JSX layout components for react-native This library contains multiple easy-to-use react-native layout components which br

Christoph Jerolimov 56 Oct 20, 2021
React-native-customizable-toast: yet another toast library based on reanimated 2 layout animations

react-native-customizable-toast yet another toast library based on reanimated 2 layout animations Features Imperative API Fully Customizable Custom to

kubilay 97 Dec 21, 2022
Simple layout wrappers for your screens

React Native Screen Layouts This is a very rudimentary, initial implementation of these screen templates. Please create issues or reply to me where ev

Seanmclem 6 Nov 15, 2021
A simple search box with animation, inspired from ios search bar. Lightweight, fast, flexible.

React Native Search Box A simple search box with animation, inspired from ios search bar. Lightweight, fast, flexible, customizable. Support both iOS/

React Native Vietnam 462 Oct 9, 2022
Segmented View for React Native (with animation)

react-native-segmented-view Segmented View for React Native (with animation) Demo Example <SegmentedView titles={["First", "Second", "Third"]}

Leland Richardson 185 Oct 9, 2022
React Native: Native Download Button: with pretty cool animation

ReactNative: Native Download Button (Android/iOS) If this project has helped you out, please support us with a star ?? This library is ReactNative br

Pranav Raj Singh Chauhan 121 Oct 9, 2022