|
14 | 14 |
|
15 | 15 | <Showcase showcase-name="ProgressCircular/ProgressCircularSizes" style="min-height:320px"> |
16 | 16 |
|
17 | | -::vue-only |
18 | | -<<<../../../preview/nuxt/pages/showcases/ProgressCircular/ProgressCircularSizes.vue |
19 | | -:: |
20 | | -::react-only |
21 | | -<<<../../../preview/next/pages/showcases/ProgressCircular/ProgressCircularSizes.tsx |
22 | | -:: |
23 | | -::qwik-only |
24 | 17 | <<<../../../website/src/routes/showcases/ProgressCircular/ProgressCircularSizes/index.tsx |
25 | | -:: |
26 | 18 |
|
27 | 19 | </Showcase> |
28 | 20 |
|
29 | 21 | ### Customizing colors |
30 | 22 |
|
31 | | -By default, `SfProgressCircular` uses `primary-700` as the shape color (customizable by setting text color) and `neutral-300` for the background ring. You can change these values in your [Tailwind configuration](https://tailwindcss.com/docs/configuration#theme) or override them for a single-element using [`important modifier`](https://tailwindcss.com/docs/configuration#important-modifier). |
| 23 | +By default, `SfProgressCircular` uses `primary-700` as the shape color (customizable by setting text color) and `neutral-300` for the background ring. |
32 | 24 |
|
| 25 | +<!-- |
| 26 | +You can change these values in your [Tailwind configuration](https://tailwindcss.com/docs/configuration#theme) or override them for a single-element using [`important modifier`](https://tailwindcss.com/docs/configuration#important-modifier). |
| 27 | + --> |
| 28 | + |
| 29 | +<!-- |
33 | 30 | ::tip |
34 | 31 | Learn more about [overriding default styles](/customization/overriding-default-styles) in Storefront UI. |
35 | 32 | :: |
| 33 | + --> |
36 | 34 |
|
37 | 35 | <Showcase showcase-name="ProgressCircular/ProgressCircularColors"> |
38 | 36 |
|
39 | | -::vue-only |
40 | | -<<<../../../preview/nuxt/pages/showcases/ProgressCircular/ProgressCircularColors.vue |
41 | | -:: |
42 | | -::react-only |
43 | | -<<<../../../preview/next/pages/showcases/ProgressCircular/ProgressCircularColors.tsx |
44 | | -:: |
45 | | -::qwik-only |
46 | 37 | <<<../../../website/src/routes/showcases/ProgressCircular/ProgressCircularColors/index.tsx |
47 | | -:: |
48 | 38 |
|
49 | 39 | </Showcase> |
50 | 40 |
|
51 | 41 | ### With floating label |
52 | 42 |
|
53 | | -::vue-only |
54 | | -You can add text to the center of the Progress Circle by providing content to the component via the `default` slot. |
55 | | -:: |
56 | | -::react-only |
57 | | -You can add text to the center of the Progress Circle by providing content to the component via the `children`. |
58 | | -:: |
59 | | -::qwik-only |
60 | 43 | You can add text to the center of the Progress Circle by providing content to the component via the `Slot`. |
61 | | -:: |
62 | 44 |
|
63 | 45 | ::warning |
64 | 46 | `SfProgressCircular` is built using an `svg`, so your content must be SVG-compatible. |
65 | 47 | :: |
66 | 48 |
|
67 | 49 | <Showcase showcase-name="ProgressCircular/ProgressCircularFloatingLabel"> |
68 | 50 |
|
69 | | -::vue-only |
70 | | -<<<../../../preview/nuxt/pages/showcases/ProgressCircular/ProgressCircularFloatingLabel.vue |
71 | | -:: |
72 | | -::react-only |
73 | | -<<<../../../preview/next/pages/showcases/ProgressCircular/ProgressCircularFloatingLabel.tsx |
74 | | -:: |
75 | | -::qwik-only |
76 | 51 | <<<../../../website/src/routes/showcases/ProgressCircular/ProgressCircularFloatingLabel/index.tsx |
77 | | -:: |
78 | 52 |
|
79 | 53 | </Showcase> |
80 | 54 |
|
| 55 | +<!-- |
81 | 56 | ## Accessibility notes |
82 | 57 |
|
83 | 58 | This component sets the `role="progressbar"` to [allow screen readers treat it as an indicator of progress status](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role). |
| 59 | + --> |
84 | 60 |
|
85 | 61 | ## Playground |
86 | 62 |
|
87 | | -<Generate /> |
| 63 | +<Generate class="playground" /> |
88 | 64 |
|
89 | 65 | #tab-2 |
90 | 66 |
|
91 | 67 | ## Props |
92 | 68 |
|
93 | | -::vue-only |
94 | | -| Prop name | Type | Default value | Possible values | |
95 | | -|-----------------------|----------------------------|---------------|----------------------------------------| |
96 | | -| `value` | `number` | `0` | | |
97 | | -| `size` | `SfProgressSize` | `'base'` | `'xs'`,`'sm'`,`'base'`,`'lg'`,`'xl'`,`'2xl'`,`'3xl'`,`'4xl'` | |
98 | | -| `ariaLabel` | `string` | `'Progress element'` | |
99 | | -:: |
100 | | -::react-only |
101 | | -| Prop name | Type | Default value | Possible values | |
102 | | -|-----------------------|----------------------------|---------------|----------------------------------------| |
103 | | -| `value` | `number` | `0` | | |
104 | | -| `size` | `SfProgressSize` | `'base'` | `'xs'`,`'sm'`,`'base'`,`'lg'`,`'xl'`,`'2xl'`,`'3xl'`,`'4xl'` | |
105 | | -| `ariaLabel` | `string` | `'Progress element'` | |
106 | | -| `className` | `string` | | | |
107 | | -| `children` | `ReactNode` | | Default slotted content | |
108 | | -:: |
109 | | -::qwik-only |
110 | | -| Prop name | Type | Default value | Possible values | |
111 | | -|-----------------------|----------------------------|---------------|----------------------------------------| |
112 | | -| `value` | `number` | `0` | | |
113 | | -| `size` | `SfProgressSize` | `'base'` | `'xs'`,`'sm'`,`'base'`,`'lg'`,`'xl'`,`'2xl'`,`'3xl'`,`'4xl'` | |
114 | | -| `ariaLabel` | `string` | `'Progress element'` | |
115 | | -| `className` | `string` | | | |
116 | | -| `children` | `ReactNode` | | Default slotted content | |
117 | | -:: |
118 | | - |
119 | | -::vue-only |
| 69 | +| Prop name | Type | Default value | Possible values | |
| 70 | +| ------------ | ---------------- | -------------------- | ------------------------------------------------------------ | |
| 71 | +| `class?` | `string` | | | |
| 72 | +| `value?` | `number` | `0` | | |
| 73 | +| `size?` | `SfProgressSize` | `'base'` | `'xs'`,`'sm'`,`'base'`,`'lg'`,`'xl'`,`'2xl'`,`'3xl'`,`'4xl'` | |
| 74 | +| `ariaLabel?` | `string` | `'Progress element'` | |
120 | 75 |
|
121 | 76 | ## Slots |
122 | 77 |
|
123 | | -| Slot name | Description | |
124 | | -| --------- | ------------------------------- | |
125 | | -| `default` | adds content within svg element | |
126 | | - |
127 | | -:: |
128 | | - |
129 | | -#tab-3 |
130 | | -::vue-only |
131 | | -<<<../../../../packages/sfui/frameworks/vue/components/SfProgressCircular/SfProgressCircular.vue |
132 | | -:: |
133 | | -::react-only |
134 | | -<<<../../../../packages/sfui/frameworks/react/components/SfProgressCircular/SfProgressCircular.tsx |
135 | | -:: |
136 | | - |
137 | | -:: |
| 78 | +| Slot name | Description | |
| 79 | +| --------- | --------------- | |
| 80 | +| `default` | Slotted content | |
0 commit comments