In addition to Preloader there is also determinate progressbar to indicate activity.
There are following components included:
Progressbar
Name | Type | Default | Description |
---|---|---|---|
colors | object | Object with Tailwind CSS colors classes | |
colors.bgIos | string | 'bg-primary' | |
colors.bgMaterial | string | 'bg-md-light-primary dark:bg-md-dark-primary' | |
component | string | 'span' | Component's HTML Element |
progress | number | 0 | Determinate progress (from 0 to 1) |
import React, { useState } from 'react';import {Page,Navbar,NavbarBackLink,Block,BlockTitle,Progressbar,Segmented,SegmentedButton,} from 'konsta/react';export default function ProgressbarPage() {const [progress, setProgress] = useState(0.1);return (<Page><Navbartitle="Progressbar"/><BlockTitle>Determinate Progress Bar</BlockTitle><Block strong insetMaterial outlineIos><div className="my-4"><Progressbar progress={progress} /></div><Segmented raised><SegmentedButtonactive={progress === 0.1}onClick={() => setProgress(0.1)}>10%</SegmentedButton><SegmentedButtonactive={progress === 0.3}onClick={() => setProgress(0.3)}>30%</SegmentedButton><SegmentedButtonactive={progress === 0.5}onClick={() => setProgress(0.5)}>50%</SegmentedButton><SegmentedButtonactive={progress === 1.0}onClick={() => setProgress(1.0)}>100%</SegmentedButton></Segmented></Block><BlockTitle>Colors</BlockTitle><Block strong insetMaterial outlineIos className="space-y-4"><Progressbar className="k-color-brand-red" progress={0.25} /><Progressbar className="k-color-brand-green" progress={0.5} /><Progressbar className="k-color-brand-yellow" progress={0.75} /><Progressbar className="k-color-brand-purple" progress={1} /></Block></Page>);}