Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@rmwc/card
Advanced tools
Cards contain content and actions about a single subject.
<Card style={{ width: '21rem' }}>
<CardPrimaryAction>
<CardMedia
sixteenByNine
style={{
backgroundImage: 'url(images/backgrounds/mb-bg-fb-16.png)'
}}
/>
<div style={{ padding: '0 1rem 1rem 1rem' }}>
<Typography use="headline6" tag="h2">
Our Changing Planet
</Typography>
<Typography
use="subtitle2"
tag="h3"
theme="textSecondaryOnBackground"
style={{ marginTop: '-1rem' }}
>
by Kurt Wagner
</Typography>
<Typography
use="body1"
tag="div"
theme="textSecondaryOnBackground"
>
Visit ten places on our planet that are undergoing the biggest
changes today.
</Typography>
</div>
</CardPrimaryAction>
<CardActions>
<CardActionButtons>
<CardActionButton>Read</CardActionButton>
<CardActionButton>Bookmark</CardActionButton>
</CardActionButtons>
<CardActionIcons>
<CardActionIcon onIcon="favorite" icon="favorite_border" />
<CardActionIcon icon="share" />
<CardActionIcon icon="more_vert" />
</CardActionIcons>
</CardActions>
</Card>
<Card outlined style={{ width: '21rem' }}>
<Typography
use="subtitle1"
tag="div"
style={{ padding: '0.5rem 1rem' }}
theme="textSecondaryOnBackground"
>
Headlines
</Typography>
<ListDivider />
<CardPrimaryAction>
<div style={{ padding: '1rem' }}>
<Typography use="headline5" tag="div">
Copper on the rise
</Typography>
<Typography use="body1" tag="p" theme="textSecondaryOnBackground">
Copper price soars amid global market optimism and increased
demand.
</Typography>
</div>
</CardPrimaryAction>
<ListDivider />
<CardPrimaryAction>
<div style={{ padding: '1rem' }}>
<Typography use="headline5" tag="div">
U.S. tech startups rebound
</Typography>
<Typography use="body1" tag="p" theme="textSecondaryOnBackground">
Favorable business conditions have allowed startups to secure
more fundraising deals compared to last year.
</Typography>
</div>
</CardPrimaryAction>
<ListDivider />
<CardPrimaryAction>
<div style={{ padding: '1rem' }}>
<Typography use="headline5" tag="div">
Asia's clean energy ambitions
</Typography>
<Typography use="body1" tag="p" theme="textSecondaryOnBackground">
China plans to invest billions of dollars for the development of
over 300 clean energy projects in Southeast Asia.
</Typography>
</div>
</CardPrimaryAction>
<ListDivider />
<CardActions fullBleed>
<CardActionButton
label="All Business Headlines"
trailingIcon="arrow_forward"
/>
</CardActions>
</Card>
<Card style={{ width: '12.5rem' }}>
<CardPrimaryAction>
<CardMedia
square
style={{
backgroundImage: 'url(images/backgrounds/mb-bg-fb-06.png)'
}}
>
<CardMediaContent>
<Typography
use="subtitle2"
tag="div"
theme="textPrimaryOnDark"
style={{
padding: '0.5rem 1rem',
backgroundImage:
'linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 100%)',
bottom: '0',
left: '0',
right: '0',
position: 'absolute'
}}
>
Vacation Photos
</Typography>
</CardMediaContent>
</CardMedia>
</CardPrimaryAction>
<CardActions>
<CardActionIcons>
<CardActionIcon onIcon="favorite" icon="favorite_border" />
<CardActionIcon icon="bookmark_border" />
<CardActionIcon icon="share" />
</CardActionIcons>
</CardActions>
</Card>
A Card Component
Name | Type | Description |
---|---|---|
outlined | undefined | false | true | Removes the shadow and displays a hairline outline instead |
The main clickable area for the primary content of the card
Media area that displays a custom background-image with background-size: cover
Name | Type | Description |
---|---|---|
sixteenByNine | undefined | false | true | Automatically scales the media area’s height according to its width, maintaining a 16:9 aspect ratio |
square | undefined | false | true | Automatically scales the media area’s height to equal its width |
An absolutely-positioned box the same size as the media area, for displaying a title or icon on top of the background-image
Row containing action buttons and/or icons
Name | Type | Description |
---|---|---|
fullBleed | undefined | false | true | Removes the action area’s padding and causes its only child (an mdc-card__action element) to consume 100% of the action area’s width |
A group of action buttons, displayed on the left side of the card (in LTR), adjacent to CardActionIcons
A group of supplemental action icons, displayed on the right side of the card (in LTR), adjacent to CardActionButtons
A card action Icon
Name | Type | Description |
---|---|---|
checked | undefined | false | true | Controls the on / off state of the a toggleable button. |
disabled | undefined | false | true | Makes the button disabled |
foundationRef | React.Ref<MDCIconButtonToggleFoundation> | Advanced: A reference to the MDCFoundation. Only for Toggleable buttons. |
icon | RMWC.IconPropT | Icon for the button |
label | undefined | string | Apply an aria label. |
onChange | undefined | (evt: IconButtonOnChangeEventT) => void | An onChange callback that receives a custom event. evt.detail = { isOn: boolean } |
onIcon | RMWC.IconPropT | If specified, renders a toggle with this icon as the on state. |
ripple | RipplePropT | Adds a ripple effect to the component |
A card action Button
Name | Type | Description |
---|---|---|
children | React.ReactNode | Content specified as children. |
danger | undefined | false | true | Used to indicate a dangerous action. |
dense | undefined | false | true | Make the Button dense. |
disabled | undefined | false | true | Make the button disabled |
icon | RMWC.IconPropT | An Icon for the Button |
label | React.ReactNode | any | Content specified as a label prop. |
outlined | undefined | false | true | Make the button outlined. |
raised | undefined | false | true | Make the Button raised. |
ripple | RipplePropT | Adds a ripple effect to the component |
trailingIcon | RMWC.IconPropT | A trailing icon for the Button |
unelevated | undefined | false | true | Make the button unelevated. |
FAQs
RMWC Card component
The npm package @rmwc/card receives a total of 2,943 weekly downloads. As such, @rmwc/card popularity was classified as popular.
We found that @rmwc/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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.