1.0.17 • Published 2 years ago

@paprika/raw-button v1.0.17

Weekly downloads
14,015
License
MIT
Repository
github
Last release
2 years ago

@paprika/raw-button

Description

Raw button component, for performing an action on the page you’re viewing.

Installation

yarn add @paprika/raw-button

or with npm:

npm install @paprika/raw-button

Props

RawButton

PropTyperequireddefaultDescription
a11yTextstringfalsenullDescriptive a11y text for assistive technologies. By default, text from children node will be used.
canPropagateboolfalsetrueIf click events are allowed to propagate up the DOM tree.
childrennodetrue-Body content of the button.
hasInsetFocusStyleboolfalsefalseIf the visual focus ring should be displayed with an inset style.
isActiveboolfalsenullIf the button is in an "active" or "selected" state.
isDisabledboolfalsefalseIf the button is disabled.
onClickfuncfalse() => {}Callback to be executed when the button is clicked or activated by keyboard. Typically required.
rolestringfalse"button"Value for role attribute to override the default of "button".
tabIndexnumberfalsenullValue for tabindex attribute to override the default of 0.

RawButton

The <RawButton> component is a fully accessible button, rendered with almost no styling as a generic <span> element. It is intended for use any time click actions are needed for a UI element that is not visually represented as a skeuomorphic button.

For accessibility, the role="button", tabIndex="0", and aria-disabled="false" attributes are added by default, but can be overridden. An aria-label can be included via the a11yText prop, a visual focus ring is applied, and keyboard listeners are included that will fire the onClick function when the user activates the component with an enter or space keypress.

Usage

import RawButton from "@paprika/raw-button";

<RawButton onClick={clickHandler}>Visible click target</RawButton>;

Links

1.0.17

2 years ago

1.0.16

2 years ago

1.0.17-next.0

2 years ago

1.0.16-next.0

2 years ago

1.0.15

3 years ago

1.0.15-next.0

3 years ago

1.0.13-next.0

3 years ago

1.0.14-next.0

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12-next.1

3 years ago

1.0.12-next.0

3 years ago

1.0.12

3 years ago

1.0.11-next.0

3 years ago

1.0.11

3 years ago

1.0.10-next.0

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.8-next.0

4 years ago

1.0.9-next.0

4 years ago

1.0.7

4 years ago

1.0.7-next.0

4 years ago

1.0.6

4 years ago

1.0.6-next.0

4 years ago

1.0.5

4 years ago

1.0.5-next.0

4 years ago

1.0.4

4 years ago

1.0.4-next.0

4 years ago

1.0.3

4 years ago

1.0.3-alpha.0

4 years ago

1.0.2

5 years ago

1.0.2-alpha.1

5 years ago

1.0.2-alpha.0

5 years ago

1.0.1

5 years ago

1.0.1-alpha.0

5 years ago

1.0.0

5 years ago

0.2.21

5 years ago

0.2.21-alpha.1

5 years ago

0.2.21-alpha.0

5 years ago

0.2.20

5 years ago

0.2.19

5 years ago

0.2.18

5 years ago

0.2.17

5 years ago

0.2.16

5 years ago

0.2.15

5 years ago

0.2.14

5 years ago

0.2.13

5 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago