@hixme-ui/card-drawer

hixme-ui CardDrawer component

Usage no npm install needed!

<script type="module">
  import hixmeUiCardDrawer from 'https://cdn.skypack.dev/@hixme-ui/card-drawer';
</script>

README

Card Drawer

npm i --save @hixme-ui/card-drawer

View it live

CardDrawer is an accordion component implemented with Card and react-collapsible.

Usage

import CardDrawer from '@hixme-ui/card-drawer'

// Using react-collapsible
<CardDrawer collapsible cardHeader='Drawer title'>
  <p>Drawer content</p>
</CardDrawer>

// Always open, static CardDrawer
<CardDrawer open cardHeader='Drawer title'>
  <p>Drawer content</p>
</CardDrawer>

// You can also supply the content to the cardContent prop
<CardDrawer
  collapsible
  cardHeader='Drawer title'
  cardContent={
    <p>Drawer content</p>
  }
/>

Props

Name Type Default
cardContent node null
cardHeader string null
children node N/A
collapsible boolean false
disabled boolean false
hideArrow boolean false