![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/card
Advanced tools
A Card is container to display related pieces of information in a single unit. Cards also provide summary of the information and a linked entry point to further details of that content. Few uses of Card is to show movie titles on an OTT platform, product on an e-commerce website, feed of posts or articles on a website.
Card expands to occupy all available horizontal within its container by default, you can change it to fit the content as well. Card comes in three sizes small (s), medium (m) & large (l).
import { Card } from "@asphalt-react/card"
function App() {
return (
<Card>
<div>Content</div>
</Card>
)
}
Card have two variants -
Elevated - Card appears with shadow around it, which makes it visually distinct from the container surface and has more emphasis.
Outlined - Card appears with border around it, has less emphasis that the elevated variant.
Card can also appears without shadow and border to have more subdued look and minimal emphasis.
If values for none of them is set, then the Card will appear in the elevated variant.
primary
secondary
tertiary
success
info
warning
danger
brand
inverse
Node for card content.
type | required | default |
---|---|---|
node | true | N/A |
Controls size of card. Possible values are "s", "m" & "l" for small, medium & large respectively.
type | required | default |
---|---|---|
enum | false | "m" |
Adds outline around card.
type | required | default |
---|---|---|
bool | false | null |
Elevates the card from the container surface.
type | required | default |
---|---|---|
bool | false | null |
Adds padding inside card.
type | required | default |
---|---|---|
bool | false | true |
Adjusts the width of the card as per its content.
type | required | default |
---|---|---|
bool | false | false |
Applies primary intent.
type | required | default |
---|---|---|
bool | false | false |
Applies secondary intent.
type | required | default |
---|---|---|
bool | false | false |
Applies tertiary intent.
type | required | default |
---|---|---|
bool | false | false |
Applies brand intent.
type | required | default |
---|---|---|
bool | false | false |
Applies inverse intent.
type | required | default |
---|---|---|
bool | false | false |
Applies danger intent.
type | required | default |
---|---|---|
bool | false | false |
Applies warning intent.
type | required | default |
---|---|---|
bool | false | false |
Applies success intent.
type | required | default |
---|---|---|
bool | false | false |
Applies info intent.
type | required | default |
---|---|---|
bool | false | false |
FAQs
Card
We found that @asphalt-react/card 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.