layercake
layercake copied to clipboard
HIgher level components
I wonder what the place is for a collection of higher level components such as BarChart
that would be the same as the current examples on the website but importable. You could still allow for similar customization by exposing chart components as props. Let's say that example has layer components like AxisX
, AxisY
and Bar
. The workflow would be:
- Import
BarChart
to get something going quickly without pasting a lot of code - As you get into customization, add your own
Bar
orAxisX
component in your project and replace it like so
import Bar from './Bar.svelte';
import CustomAxisX from './AxisX.svelte';
<BarChart
{Bar}
AxisX={CustomAxisX}
/>
This may be a companion library and out of scope for this, though.
I think I'll do this as a separate library called something like layercake-charts