New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@guardian/src-button

Package Overview
Dependencies
Maintainers
22
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guardian/src-button

📣 For more context and visual guides relating to button usage, visit the [Source Design System website](https://zeroheight.com/2a1e5182b/p/435225)

  • 0.13.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-50%
Maintainers
22
Weekly downloads
 
Created
Source

Buttons

📣 For more context and visual guides relating to button usage, visit the Source Design System website

Install

$ yarn add @guardian/src-button @guardian/src-foundations

Use

import { LinkButton, Button } from "@guardian/src-button"
import { SvgCheckmark, SvgArrowRightStraight } from "@guardian/src-svgs"

const Form = () => (
    <form>
        <LinkButton
            priority="primary"
            size="default"
            showIcon={true}
            href="/read-more"
        >
            Read more
        </LinkButton>
        <Button
            priority="primary"
            size="default"
            icon={<SvgCheckmark />}
            iconSide="left"
            onClick={() => {
                alert("Thanks for clicking")
            }}
        >
            Click me
        </Button>
    </form>
)

LinkButton Props

priority

"primary" | "secondary" = "primary"

Informs users of how important an action is

size

"default" | "small" = "default"

Reflects the prominance of the action

showIcon

boolean = false

Whether to show the arrow icon in this button

Button Props

priority

"primary" | "secondary" | "tertiary" = "primary"

Informs users of how important an action is

size

"default" | "small" = "default"

Reflects the prominance of the action

icon

JSX.Element

An icon that appears inside the button, alongside text

iconSide

"left" | "right" = "left"

The side of the button on which the icon appears

Supported themes

Standard

  • default
  • brand
  • brandAlt

Custom

  • readerRevenue
  • readerRevenueAlt

FAQs

Package last updated on 14 Feb 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc