Comments (4)
Implementation can be implemented with css clip path, because all browsers support css clip path with inline svg
from masked-view.
+1
i don't have the skill to help, but i also need this feature
from masked-view.
This works better for me:
import React from 'react';
import { View } from 'react-native';
function MaskedViewWeb({ maskElement, ...props }) {
return React.createElement(View, props, maskElement);
}
export default MaskedViewWeb;
from masked-view.
Hello, everyone, i just used css - inset-
important idea, you have 2 blocks,
first - back,
second - front,
they lie on top of each other, and when you just get value, that show part back, and hide front,
also important, they lie pixel by pixel, it for your text that your pixels don't brake
!!!!!!
it's using styled for web, i mean
import styled from 'styled-components',
not in
import styled from 'styled-components/native'
const inset = `inset(0 0 0 ${val}%)`;
const inlineStyles = {clipPath: inset, WebkitClipPath: inset};
<Wrapper>
<Back>
Upload {val}%
</Back>
<Front style={inlineStyles}>
Upload {val}%
</Front>
</Wrapper>
const Back = styled.div`
background: red;
color: white;
width: 100%;
height: 100%;
align-items: center;
display: flex;
justify-content: center;
`;
const Front = styled.div`
height: 50px;
position: absolute;
top: 0;
text-align: center;
width: 100%;
background: white;
color: red;
clip-path: inset(0 0 0 0);
transition: clip-path 0.3s ease-in;
align-items: center;
display: flex;
justify-content: center;
`;
from masked-view.
Related Issues (20)
- RN 0.68 and ViewPropTypes deprecation HOT 4
- Main module could not be resolved
- Add example directory HOT 3
- Could not determine the dependencies of task ':react-native-community_masked-view:verifyReleaseResources'. HOT 2
- Slow performance when using many masked views HOT 3
- maskElement color being ignored when view being masked has reduced opacity HOT 1
- Execution failed for task ':react-native-community_masked-view:generateDebugRFile' HOT 2
- Execution failed for JetifyTransform: C:\Users\Lenovo\.gradle\caches\modules-2\files-2.1\com.facebook.react\react-native\0.71.0-rc.0\7a7f5a0af6ebd8eb94f7e5f7495e9d9684b4f543\react-native-0.71.0-rc.0-debug.aar. > Java heap space HOT 2
- Release new version HOT 1
- JSX element class does not support attributes because it does not have a 'props' property. HOT 6
- When the maskelement is an image , the masked view is not rendered(Android) HOT 4
- Apply blur?
- how to add diagonal gradient color in text if we don't have image ?
- Android build error: package undefined does not exist HOT 5
- Could not get unknown property 'com' for project ':react-native-masked-view_masked-view'
- #AA00FF HOT 1
- Oddly shaped MaskedView with touchable mask area
- Cannot use pointerEvents property with MaskedView on Android
- [SOLVED] Creating a masked out camera view + conceptual explanation how masking works.
- 89-90 A.kahani21s HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from masked-view.