3.1.0 • Published 10 months ago

@nativescript-community/ui-neumorphiclayout v3.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

npm npm

@nativescript-community/ui-neumorphiclayout

A plugin that adds support for neumorphism styling to NativeScript layout containers.

Installation

ns plugin add @nativescript-community/ui-neumorphiclayout
or
npm i @nativescript-community/ui-neumorphiclayout

Usage

Importing plugin at startup is all it takes to add support for neumorphism styling to your application. Even though this plugin overrides NativeScript background drawing step, it still offers support for background (color & gradient), border-color, border-width, and border-radius CSS properties.

NOTE: Scrollable views like ListView or ScrollView must NEVER be direct siblings of a view with neumorphism because of android clipChildren effect. Instead, add those views inside a layout container.

Plain NativeScript

TypeScript

import { Application } from '@nativescript/core';
import '@nativescript-community/ui-neumorphiclayout';

Application.run({ moduleName: 'app-root' });

XML

<Page xmlns="http://schemas.nativescript.org/tns.xsd" class="page">
    <Page.actionBar>
        <ActionBar title="Neumorphism" icon="" class="action-bar">
        </ActionBar>
    </Page.actionBar>
    <StackLayout class="px-20" backgroundColor="#e0e1e3">
        <StackLayout verticalAlignment="center" width="200" height="200" marginTop="30" neumorphism="flat" backgroundColor="#e0e1e3" lightShadowColor="#ffffff" darkShadowColor="#bebfc1" cornerRadius="100">
            <Label text="Tap me!" textAlignment="center" fontSize="24" color="#6d707d" fontWeight="bold"/>
        </StackLayout>
    </StackLayout>
</Page>

API

Properties

NameTypeDefaultDescription
neumorphismstringnullDetermines the view neumorphism styling. Possible types: flat, pressed, pressed-in-out.
lightShadowColorColor#ffffffDetermines the color that view will use to set light shadow color.
darkShadowColorColor#d9d9d9Determines the color that view will use to set dark shadow color.
shadowDistancenumber10Determines the offset of the view shadows. The value is subtracted from the offset of the first shadow and added to the offset of the second one.
shadowRadiusnumbershadowDistance*2Determines the radius for the view shadows.

About

This plugin adds support for neumorphism styling to NativeScript layout containers.

Its functionality is inspired by Neumorphism.io.

3.0.9

1 year ago

3.0.12

1 year ago

3.0.4

1 year ago

3.0.13

12 months ago

3.0.3

1 year ago

3.0.10

1 year ago

3.0.2

1 year ago

3.1.0

10 months ago

3.0.11

1 year ago

3.0.1

1 year ago

3.0.16

12 months ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.14

12 months ago

3.0.6

1 year ago

3.0.15

12 months ago

3.0.5

1 year ago

3.0.0

1 year ago

2.0.5

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.4

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago