Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
react-custom-elements
Advanced tools
npm install react-custom-elements
Button elements with props
import { Button } form 'react-custom-elements';
const App = () => {
return(
<>
<Button primary>defuult</Button>
<Button secondary>text</Button>
<Button outline></Button>
<Button dark></Button>
</>
)
}
You can use all events of button
For example click event
import { Button } form 'react-custom-elements';
const App = () => {
return(
<>
<Button
onClick={()=> alert('clicked ')}
primary>defuult</Button>
</>
)
}
import { Input } form 'react-custom-elements';
const App = () => {
return(
<>
<Input primary></Input>
<Input secondary></Input>
</>
)
}
You can use all input props with it
import { Input } form 'react-custom-elements';
const App = () => {
return(
<>
<Input onChange={(e) => console.log(e.target.value)} secondary></Input>
</>
)
}
Props | initial value |
width | 260px |
height | 20px |
...props | all props of input |
import { CheckBox } form 'react-custom-elements';
const App = () => {
return(
<>
<CheckBox ></CheckBox>
</>
)
}
get check value
import React, {useState} from 'react';
import { CheckBox } form 'react-custom-elements';
const App = () => {
const [val, setVal] = useState(false);
return(
<>
<CheckBox setClick={setVal}></CheckBox>
</>
)
}
Now checkbox value in val variable
Props | initial value |
w | 24px |
h | 24px |
color | #111 |
bg | #111 |
borderRadius | 999px |
import { Dropdown } form 'react-custom-elements';
const App = () => {
return(
<>
<Dropdown selections=['1', '2', '3']></Dropdown>
</>
)
}
get dropdown selected value
import React, {useState} from 'react';
import { Dropdown } form 'react-custom-elements';
const App = () => {
const [SelectedValue, setSelectedValue] = useState(false);
return(
<>
<Dropdown select={setSelectedValue}></Dropdown>
</>
)
}
in SelectedValue we have our selected value
Props | initial value | Type | Example |
selections | none | array | ['1', '2', '3'] |
FAQs
React custom elements
The npm package react-custom-elements receives a total of 6 weekly downloads. As such, react-custom-elements popularity was classified as not popular.
We found that react-custom-elements demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.