
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@snowcoders/react-unstyled-button
Advanced tools
React HTMLButton with all default browser styling removed
npm install --save @snowcoders/react-unstyled-button
import { UnstyledButton } from "@snowcoders/react-unstyled-button";
import "@snowcoders/react-unstyled-button/styles.css";
render() {
<UnstyledButton
onClick={this.onClick}
>
Button text
</UnstyledButton>
}
Custom styling can be applied via specificity
// green-button.css
.sci-react-unstyled-button.green-button {
// Box-Sizing
padding: 14px 40px;
border-radius: 100px;
border-width: 0px;
border-style: solid;
// Colors
border-color: #16da00;
background-color: green;
color: white;
// Sizes
font-size: 16px;
font-family: "Open Sans", X-LocaleSpecific, sans-serif;
&:hover {
background-color: darkgreen;
}
}
// green-button.js
import { UnstyledButton } from "@snowcoders/react-unstyled-button";
import "@snowcoders/react-unstyled-button/styles.css";
import "./green-button.css";
render() {
<UnstyledButton
className="green-button"
onClick={this.onClick}
>
Button text
</UnstyledButton>
}
This component is part of a larger components library, react-ui-base. The goal is to keep all the core logic and base css styles in a single location, that way building out new UI component libraries cheaper and faster (and less buggy).
We highly recommend visiting the react-ui-base repository to understand how to customize the css along with see examples.
You can also view all the components on our demo site https://snowcoders.github.io/react-ui-base/
This component takes the normal HTML Button element and removes all browser styling from it.
FAQs
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.