···1111This ui kit's main aim is to help you build webapps that look good very fast.
12121313It's not designed to be super customizable, but instead offers you a
1414-bunch of good-looking-by-default components.
1414+bunch of good-looking-by-default components that are as easy to use as possible.
15151616## Two colors
17171818-Still all apps looking the same is kinda boring, so there are is one easy and quick way to customize all components.
1818+Still all apps looking the same is kinda boring, so there is one easy and quick way to customize all components.
19192020The main idea is having two colors (in all tailwind shades from 50 up to 950):
2121···2929I'm a big fan of the philosophy of copying components (shadcn-style) for better customization,
3030but also I think the quickest way to build something is to just install the package and use it.
31313232-So the plan is to have both options (currently only installing as a package is available,
3333-but you can copy what you need from the [source code](https://github.com/flo-bit/ui-kit/tree/main/src/lib/components/base)
3434-though some imports might need to be adjusted).
3232+So the plan is to have both options (usually you start by just using the package and if you
3333+eventually need to customize a component you add it to your project),
3434+currently the recommended way to use it is installing as a package,
3535+but a cli tool is in the works and can already be tested with the base components by running:
3636+3737+```bash
3838+npx fuchs add [component-name]
3939+```
4040+4141+(Note: this still needs you to install `fuchs` as a package first).
35423643## Lots of components
37443838-While currently only the base and some other components are visible, there are lots of components in the pipeline.
3939-The aim is to have a component library that has lots of components that are useful for building
4040-webapps/websites/games, all in a consistent style/theme.
4545+Contrary to other component libraries that offer only some base components and expect you to built the rest,
4646+this library is aiming to have a component library that has lots of different components that are
4747+useful for building webapps/websites/games, all in a consistent style/theme.
41484242-See here for a few examples of work in progress components (some may be partially broken):
4949+Scroll down the sidebar or main page for examples of specialised components (section `Color`, `Extra` and `3D` components)
5050+5151+Also see here for a few examples of work in progress components (some may be partially broken):
43524453### graphs
4554···4756- [heatmap](/ui-kit/components/graphs/heatmap/)
4857- [line chart](/ui-kit/components/graphs/line-graph/)
49585050-### extras
5151-5252-- [swiper cards](/ui-kit/components/extras/swiper-cards/)
5353-5459### social
55605661- [github-corner](/ui-kit/components/social/github-corner/)
5762- [star rating](/ui-kit/components/social/star-rating/)
5863- [social media post](/ui-kit/components/social/post/)
59646060-### 3d
6161-6262-- [model-picker](/ui-kit/components/3d/model-picker/)
6565+If you have a suggestion for a new component, please open an issue on [github](https://github.com/flo-bit/ui-kit/issues).
63666467## Works without javascript when possible & is accessible
6568···92959396## Credits
94979595-This ui kit is largely based on [bits-ui](https://bits-ui.com/).
9898+The base components of this ui kit are largely based on [bits-ui](https://bits-ui.com/) and I've taken lots of inspiration
9999+from [shadcn-svelte](https://www.shadcn-svelte.com/).
···11<script lang="ts">
22 import AccordionExample from './Example.svelte';
33-44- import Api from '$docs/site-components/API.svelte';
33+ import AccordionProps from './Props.svelte';
54</script>
6576# Accordion
···1817</script>
19182019<Accordion type="single">
2121- <AccordionItem value="item-1" title="Is it accessible?">
2020+ <AccordionItem title="Is it accessible?">
2221 Yes. It adheres to the WAI-ARIA design pattern.
2322 </AccordionItem>
2424- <AccordionItem value="item-2" title="Are you sure?">
2323+ <AccordionItem title="Are you sure?">
2524 I mean, I hope so? It's based on the bits-ui accordion component, so if not it's not my fault 😅
2625 </AccordionItem>
2726</Accordion>
2827```
2828+2929+## API Reference
3030+3131+<AccordionProps />
3232+3333+## Credits
3434+3535+This component is based on the [bits-ui accordion component](https://bits-ui.com/docs/components/accordion).
···33</script>
4455<Accordion type="single">
66- <AccordionItem value="item-1" title="Is it accessible?">
66+ <AccordionItem title="Is it accessible?">
77 Yes. It adheres to the WAI-ARIA design pattern.
88 </AccordionItem>
99- <AccordionItem value="item-2" title="Are you sure?">
99+ <AccordionItem title="Are you sure?">
1010 I mean, I hope so? It's based on the <a
1111 href="https://bits-ui.com/docs/components/accordion"
1212 target="_blank">bits-ui accordion component</a
···11+<script>
22+ import Api from '$docs/site-components/API.svelte';
33+</script>
44+55+<Api
66+ props={{
77+ title: 'Accordion',
88+ props: {
99+ children: {
1010+ type: 'Snippet',
1111+ description:
1212+ 'The children content to render. Should be a list of AccordionItem components.',
1313+ required: true
1414+ },
1515+ type: {
1616+ type: { type: 'enum', definition: "'single' | 'multiple'" },
1717+ description:
1818+ "If set to 'multiple', the accordion will allow multiple items to be open at the same time. If set to single, the accordion will only allow a single item to be open.",
1919+ required: true
2020+ },
2121+ value: {
2222+ type: { type: 'union', definition: 'string | string[]' },
2323+ description:
2424+ 'The value of the accordion item that is currently open. If type is set to "multiple", this will be an array of strings. If type is set to "single", this will be a string.',
2525+ bindable: true
2626+ },
2727+ onValueChange: {
2828+ type: {
2929+ type: 'function',
3030+ definition: '(value: string) => void | (value: string[]) => void'
3131+ },
3232+ description: 'A function that is called when the value of the accordion item changes.'
3333+ },
3434+ disabled: {
3535+ type: 'boolean',
3636+ description: 'Whether the accordion is disabled.',
3737+ default: 'false'
3838+ },
3939+ ref: {
4040+ type: 'HTMLDivElement',
4141+ description:
4242+ 'The underlying DOM element being rendered. You can bind to this to get a reference to the element.',
4343+ bindable: true
4444+ }
4545+ }
4646+ }}
4747+/>
4848+4949+<Api
5050+ props={{
5151+ title: 'AccordionItem',
5252+ props: {
5353+ title: {
5454+ type: 'string',
5555+ description:
5656+ 'The title of the accordion item, displayed both when the item is closed or open.',
5757+ required: true
5858+ },
5959+ children: {
6060+ type: 'Snippet',
6161+ description:
6262+ 'The children content to render. The content is displayed when the item is open.',
6363+ required: true
6464+ },
6565+ value: {
6666+ type: 'string',
6767+ description:
6868+ 'The value of the accordion item. This is used to identify when the item is open or closed. If not provided, a unique ID will be generated for this value.'
6969+ },
7070+ disabled: {
7171+ type: 'boolean',
7272+ description: 'Whether the accordion item is disabled.',
7373+ default: 'false'
7474+ },
7575+ ref: {
7676+ type: 'HTMLDivElement',
7777+ description:
7878+ 'The underlying DOM element being rendered. You can bind to this to get a reference to the element.',
7979+ bindable: true
8080+ }
8181+ }
8282+ }}
8383+/>