r
r
react-juce
Search…
Button
A basic React component for rendering a button with web-like behavior and event interactions.

Example

1
import React, { Component } from "react";
2
import { View, Button, Text } from "react-juce";
3
4
function App(props) {
5
return (
6
<View {...styles.outer}>
7
<Button
8
{...styles.button}
9
onClick={(e) => console.log('Click')}
10
onMouseEnter={(e) => console.log('Mouse Enter!)}
11
onMouseLeave={(e) => console.log('Mouse Leave!)}>
12
<Text>Click me!</Text>
13
</Button>
14
</View>
15
);
16
}
17
18
const styles = {
19
outer: {
20
width: "100%",
21
height: "100%",
22
backgroundColor: "#17191f",
23
justifyContent: "center",
24
alignItems: "center",
25
},
26
button: {
27
borderColor: "#66cffd",
28
padding: 20,
29
},
30
};
Copied!

Props

Button inherits support for all of the core View properties described in View.

onClick

A callback property which will be invoked in response to a mouse click. The callback should accept a single SyntheticMouseEvent argument.
Type
Required
Supported
function
No
Partial: Standard

Styles

Button supports all of the default style properties described in Style Properties.
Last modified 7mo ago
Copy link