Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@rei/cdr-accordion
Advanced tools
For the most up-to-date information, see REI Cedar documentation.
Accordions are built from two components, CdrAccordion and CdrAccordionItem, which are meant to be used together.
name | type | default |
---|---|---|
compact | boolean | false |
Sets the compact style of CdrAccordionItem child components
name | type | default |
---|---|---|
borderAligned | boolean | false |
Sets the border-aligned style of CdrAccordionItem child components
name | type | default |
---|---|---|
showAll | boolean | false |
Sets all child CdrAccordionItem components to display open by default
name | type | default |
---|---|---|
id | string | n/a |
Requires unique ID for each component reference
name | type | Default |
---|---|---|
label | string | n/a |
Sets the readable text on the CdrAccordionItem button or trigger. Required |
name | type | Default |
---|---|---|
show | boolean | false |
Sets a single CdrAccordionItem to display open by default. The 'showAll' prop takes precedence, when true |
name |
---|
default |
Slot for CdrAccordionItem(s)
name |
---|
default |
Slot for CdrAccordionItem content
name |
---|
accordion-item-toggle |
$emit event fired on CdrAccordionItem toggle
Resources are available within the CdrAccordion package;
@rei/cdr-accordion
cdr-accordion.css
To incorporate the required assets for a component, use the following steps:
Install the CdrAccordion package using npm
in your terminal:
Terminal
npm i -s @rei/cdr-accordion
main.js
// import your required css
import "@rei/cdr-accordion/dist/cdr-accordion.css";
local.vue
<template>
<cdr-accordion>
<cdr-accordion-item
id="default-example"
label="This is the label text"
>
This is the accordion content.
</cdr-accordion-item>
</cdr-accordion>
</template>
<script>
import { CdrAccordion, CdrAccordionItem } from "@rei/cdr-accordion";
export default {
...
components: {
CdrAccordion,
CdrAccordionItem
}
}
</script>
Use cdr-accordion
to pass styling options to cdr-accordion-item
.
<template>
<cdr-accordion
:compact="true"
>
<cdr-accordion-item
id="item-1"
label="Label text"
>
Accordion content here
</cdr-accordion-item>
</cdr-accordion>
</template>
Set show-all
to true
on cdr-accordion
, and each cdr-accordion-item
will display in an open state.
<template>
<cdr-accordion
:show-all="true"
>
<cdr-accordion-item
id="item-1"
label="Label text"
>
Accordion content here
...
The CdrAccordionItem component can also be controlled individually. If show-all
is false
at the CdrAccordion level, set show
to true
to display an individual accordion item in an open state. Note that CdrAccordion settings will take precedence over CdrAccordionItem settings.
<template>
<cdr-accordion>
<cdr-accordion-item
id="item-1"
label="Label text"
:show="true"
>
Accordion content here
...
Any options set at the cdr-accordion
level can be set on any parent component of cdr-accordion-item
by using Vue's provide/inject functionality. This is useful, for instance, if cdr-accordion-item
ever needs to be used as a part of another group component.
<template>
...
<cdr-accordion-item
id="item-1"
label="Label text"
>
Accordion content here
</cdr-accordion-item>
...
</template>
<script>
export default {
...
provide() {
return {
borderAligned: true,
showAll: true
};
}
}
</script>
To ensure that usage of this component complies with accessability guidelines:
This component has compliance with WCAG accessibility guidelines:
aria-controls
, aria-expanded
, and aria-hidden
FAQs
REI Cedar Style Framework - Vue Component for Accordion
The npm package @rei/cdr-accordion receives a total of 33 weekly downloads. As such, @rei/cdr-accordion popularity was classified as not popular.
We found that @rei/cdr-accordion demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.