![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@asphalt-react/actionlist
Advanced tools
A component to display a list of actions. It consists of 2 components
Actionlist provides accessibility features to operate on Actions. It also represents a bunch of provided Actions as a list. It supports 3 sizes: small (s), medium (m), large (l) where small
is the default size.
An Action can function as any HTML or React element. Each action has an option to include an icon before the caption.
💡 Checkout
@asphalt-react/iconpack
for SVG wrapped React components.
import { Actionlist, Action } from "@asphalt-react/actionlist"
import { Link } from '@reach/router'
function App () {
return (
<Actionlist>
<Action as="Link" asProps={{ to: "/document/edit" }}>
Edit
</Action>
<Action actionable asProps={{ onClick: (event) => {} }}>
Clone
</Action>
<Action>Share</Action>
<Action>Delete</Action>
</Actionlist>
)
}
export default App;
aria-*
attributes.role="menu"
and actions have role="menuitem"
attributes.<li>
in an unordered list <ul>
.aria-attributes
like aria-labelledby
, aria-label
to assist screen readers.List of actions to display inside Actionlist.
type | required | default |
---|---|---|
node | true | N/A |
An action item in an Actionlist. It renders an <a>
tag by default.
Add caption for each Action.
type | required | default |
---|---|---|
node | false | N/A |
Size of Action. Accepts "s", "m", "l" for small, medium & large.
type | required | default |
---|---|---|
enum | false | "s" |
Renders an icon or text before the Action's caption. Accepts SVG.
Checkout @asphalt-react/iconpack
for SVG icons
type | required | default |
---|---|---|
union | false | N/A |
Appends qualifier to the caption.
type | required | default |
---|---|---|
bool | false | false |
Applies danger styles to Action.
type | required | default |
---|---|---|
bool | false | false |
Action behaves like a button.
type | required | default |
---|---|---|
bool | false | false |
Use it to replace the default "anchor" tag with your router element. Accepts HTML element or a React component type.
type | required | default |
---|---|---|
elementType | false | N/A |
Accepts props & attributes for the link element. You can pass attributes like onKeyPress
, href
.
type | required | default |
---|---|---|
object | false | {} |
Renders a separator before the Action, except for first one.
type | required | default |
---|---|---|
bool | false | false |
FAQs
Actionlist
The npm package @asphalt-react/actionlist receives a total of 46 weekly downloads. As such, @asphalt-react/actionlist popularity was classified as not popular.
We found that @asphalt-react/actionlist demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.