@mitcsutt/kiln-ui 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/assets/fonts/archivo-latin-ext-wdth-italic.woff2 +0 -0
- package/dist/assets/fonts/archivo-latin-ext-wdth-normal.woff2 +0 -0
- package/dist/assets/fonts/archivo-latin-wdth-italic.woff2 +0 -0
- package/dist/assets/fonts/archivo-latin-wdth-normal.woff2 +0 -0
- package/dist/assets/fonts/atkinson-hyperlegible-mono-latin-ext-wght-italic.woff2 +0 -0
- package/dist/assets/fonts/atkinson-hyperlegible-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/assets/fonts/atkinson-hyperlegible-mono-latin-wght-italic.woff2 +0 -0
- package/dist/assets/fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2 +0 -0
- package/dist/assets/fonts/b612-latin-400-italic.woff2 +0 -0
- package/dist/assets/fonts/b612-latin-400-normal.woff2 +0 -0
- package/dist/assets/fonts/b612-latin-700-italic.woff2 +0 -0
- package/dist/assets/fonts/b612-latin-700-normal.woff2 +0 -0
- package/dist/assets/fonts/b612-mono-latin-400-italic.woff2 +0 -0
- package/dist/assets/fonts/b612-mono-latin-400-normal.woff2 +0 -0
- package/dist/assets/fonts/b612-mono-latin-700-italic.woff2 +0 -0
- package/dist/assets/fonts/b612-mono-latin-700-normal.woff2 +0 -0
- package/dist/assets/fonts/golos-text-latin-ext-wght-normal.woff2 +0 -0
- package/dist/assets/fonts/golos-text-latin-wght-normal.woff2 +0 -0
- package/dist/assets/fonts/licenses/archivo.txt +93 -0
- package/dist/assets/fonts/licenses/atkinson-hyperlegible-mono.txt +93 -0
- package/dist/assets/fonts/licenses/b612-mono.txt +93 -0
- package/dist/assets/fonts/licenses/b612.txt +93 -0
- package/dist/assets/fonts/licenses/golos-text.txt +93 -0
- package/dist/assets/fonts/licenses/shantell-sans.txt +93 -0
- package/dist/assets/fonts/shantell-sans-latin-ext-full-italic.woff2 +0 -0
- package/dist/assets/fonts/shantell-sans-latin-ext-full-normal.woff2 +0 -0
- package/dist/assets/fonts/shantell-sans-latin-full-italic.woff2 +0 -0
- package/dist/assets/fonts/shantell-sans-latin-full-normal.woff2 +0 -0
- package/dist/components/actions/Button/Button.d.ts +8 -0
- package/dist/components/actions/Button/Button.js.map +1 -1
- package/dist/components/actions/ChipGroup/ChipGroup.d.ts +9 -0
- package/dist/components/actions/ChipGroup/ChipGroup.js.map +1 -1
- package/dist/components/actions/IconButton/IconButton.d.ts +8 -0
- package/dist/components/actions/IconButton/IconButton.js.map +1 -1
- package/dist/components/actions/ModeToggle/ModeToggle.d.ts +8 -0
- package/dist/components/actions/ModeToggle/ModeToggle.js.map +1 -1
- package/dist/components/actions/SegmentedControl/SegmentedControl.d.ts +9 -0
- package/dist/components/actions/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/actions/ToggleChip/ToggleChip.d.ts +9 -0
- package/dist/components/actions/ToggleChip/ToggleChip.js.map +1 -1
- package/dist/components/display/Avatar/Avatar.d.ts +11 -1
- package/dist/components/display/Avatar/Avatar.js.map +1 -1
- package/dist/components/display/AvatarGroup/AvatarGroup.d.ts +7 -0
- package/dist/components/display/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/components/display/Badge/Badge.d.ts +7 -0
- package/dist/components/display/Badge/Badge.js.map +1 -1
- package/dist/components/display/Card/Card.js.map +1 -1
- package/dist/components/display/CodeBlock/CodeBlock.d.ts +9 -0
- package/dist/components/display/CodeBlock/CodeBlock.js.map +1 -1
- package/dist/components/display/DataList/DataList.js.map +1 -1
- package/dist/components/display/Delta/Delta.d.ts +9 -0
- package/dist/components/display/Delta/Delta.js.map +1 -1
- package/dist/components/display/EmptyState/EmptyState.d.ts +8 -0
- package/dist/components/display/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/display/List/List.js.map +1 -1
- package/dist/components/display/Marquee/Marquee.d.ts +8 -0
- package/dist/components/display/Marquee/Marquee.js.map +1 -1
- package/dist/components/display/Media/Media.d.ts +7 -0
- package/dist/components/display/Media/Media.js.map +1 -1
- package/dist/components/display/Meter/Meter.d.ts +9 -0
- package/dist/components/display/Meter/Meter.js.map +1 -1
- package/dist/components/display/Progress/Progress.d.ts +8 -0
- package/dist/components/display/Progress/Progress.js.map +1 -1
- package/dist/components/display/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/display/Stamp/Stamp.d.ts +8 -0
- package/dist/components/display/Stamp/Stamp.js.map +1 -1
- package/dist/components/display/Stat/Stat.d.ts +8 -0
- package/dist/components/display/Stat/Stat.js.map +1 -1
- package/dist/components/display/Table/Table.js.map +1 -1
- package/dist/components/display/Tag/Tag.d.ts +7 -0
- package/dist/components/display/Tag/Tag.js.map +1 -1
- package/dist/components/feedback/Alert/Alert.d.ts +10 -0
- package/dist/components/feedback/Alert/Alert.js.map +1 -1
- package/dist/components/feedback/LiveIndicator/LiveIndicator.d.ts +7 -0
- package/dist/components/feedback/LiveIndicator/LiveIndicator.js.map +1 -1
- package/dist/components/feedback/RelativeTime/RelativeTime.d.ts +8 -0
- package/dist/components/feedback/RelativeTime/RelativeTime.js.map +1 -1
- package/dist/components/feedback/Spinner/Spinner.d.ts +10 -1
- package/dist/components/feedback/Spinner/Spinner.js.map +1 -1
- package/dist/components/feedback/StatusDot/StatusDot.d.ts +10 -1
- package/dist/components/feedback/StatusDot/StatusDot.js.map +1 -1
- package/dist/components/inputs/AmountField/AmountField.d.ts +7 -0
- package/dist/components/inputs/AmountField/AmountField.js.map +1 -1
- package/dist/components/inputs/AmountInput/AmountInput.d.ts +8 -0
- package/dist/components/inputs/AmountInput/AmountInput.js.map +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +8 -0
- package/dist/components/inputs/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/inputs/CheckboxField/CheckboxField.d.ts +7 -0
- package/dist/components/inputs/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +8 -0
- package/dist/components/inputs/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/inputs/CheckboxGroupField/CheckboxGroupField.d.ts +7 -0
- package/dist/components/inputs/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/inputs/ChipGroupField/ChipGroupField.d.ts +7 -0
- package/dist/components/inputs/ChipGroupField/ChipGroupField.js.map +1 -1
- package/dist/components/inputs/ChoiceCards/ChoiceCards.d.ts +9 -0
- package/dist/components/inputs/ChoiceCards/ChoiceCards.js.map +1 -1
- package/dist/components/inputs/ChoiceCardsField/ChoiceCardsField.d.ts +7 -0
- package/dist/components/inputs/ChoiceCardsField/ChoiceCardsField.js.map +1 -1
- package/dist/components/inputs/ColorField/ColorField.d.ts +6 -0
- package/dist/components/inputs/ColorField/ColorField.js.map +1 -1
- package/dist/components/inputs/ColorInput/ColorInput.d.ts +8 -0
- package/dist/components/inputs/ColorInput/ColorInput.js.map +1 -1
- package/dist/components/inputs/Combobox/Combobox.d.ts +9 -0
- package/dist/components/inputs/Combobox/Combobox.js.map +1 -1
- package/dist/components/inputs/ComboboxField/ComboboxField.d.ts +7 -0
- package/dist/components/inputs/ComboboxField/ComboboxField.js.map +1 -1
- package/dist/components/inputs/DateRangeField/DateRangeField.d.ts +7 -0
- package/dist/components/inputs/DateRangeField/DateRangeField.js.map +1 -1
- package/dist/components/inputs/Field/Field.d.ts +26 -0
- package/dist/components/inputs/Field/Field.js.map +1 -1
- package/dist/components/inputs/Fieldset/Fieldset.d.ts +8 -0
- package/dist/components/inputs/Fieldset/Fieldset.js.map +1 -1
- package/dist/components/inputs/FileDrop/FileDrop.d.ts +10 -0
- package/dist/components/inputs/FileDrop/FileDrop.js.map +1 -1
- package/dist/components/inputs/FileField/FileField.d.ts +7 -0
- package/dist/components/inputs/FileField/FileField.js.map +1 -1
- package/dist/components/inputs/Input/Input.d.ts +9 -0
- package/dist/components/inputs/Input/Input.js.map +1 -1
- package/dist/components/inputs/NumberField/NumberField.d.ts +7 -0
- package/dist/components/inputs/NumberField/NumberField.js.map +1 -1
- package/dist/components/inputs/NumberInput/NumberInput.d.ts +8 -0
- package/dist/components/inputs/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/inputs/OneTimeCodeField/OneTimeCodeField.d.ts +7 -0
- package/dist/components/inputs/OneTimeCodeField/OneTimeCodeField.js.map +1 -1
- package/dist/components/inputs/OneTimeCodeInput/OneTimeCodeInput.d.ts +8 -0
- package/dist/components/inputs/OneTimeCodeInput/OneTimeCodeInput.js.map +1 -1
- package/dist/components/inputs/PasswordField/PasswordField.d.ts +7 -0
- package/dist/components/inputs/PasswordField/PasswordField.js.map +1 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.d.ts +10 -0
- package/dist/components/inputs/PasswordInput/PasswordInput.js.map +1 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +9 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/inputs/RadioGroupField/RadioGroupField.d.ts +8 -0
- package/dist/components/inputs/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/inputs/RangeSlider/RangeSlider.d.ts +8 -0
- package/dist/components/inputs/RangeSlider/RangeSlider.js.map +1 -1
- package/dist/components/inputs/RangeSliderField/RangeSliderField.d.ts +7 -0
- package/dist/components/inputs/RangeSliderField/RangeSliderField.js.map +1 -1
- package/dist/components/inputs/Rating/Rating.d.ts +8 -0
- package/dist/components/inputs/Rating/Rating.js.map +1 -1
- package/dist/components/inputs/RatingField/RatingField.d.ts +7 -0
- package/dist/components/inputs/RatingField/RatingField.js.map +1 -1
- package/dist/components/inputs/SegmentedField/SegmentedField.d.ts +7 -0
- package/dist/components/inputs/SegmentedField/SegmentedField.js.map +1 -1
- package/dist/components/inputs/Select/Select.d.ts +9 -0
- package/dist/components/inputs/Select/Select.js.map +1 -1
- package/dist/components/inputs/SelectField/SelectField.d.ts +7 -0
- package/dist/components/inputs/SelectField/SelectField.js.map +1 -1
- package/dist/components/inputs/Slider/Slider.d.ts +8 -0
- package/dist/components/inputs/Slider/Slider.js.map +1 -1
- package/dist/components/inputs/SliderField/SliderField.d.ts +7 -0
- package/dist/components/inputs/SliderField/SliderField.js.map +1 -1
- package/dist/components/inputs/Switch/Switch.d.ts +8 -0
- package/dist/components/inputs/Switch/Switch.js.map +1 -1
- package/dist/components/inputs/SwitchField/SwitchField.d.ts +8 -0
- package/dist/components/inputs/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/inputs/TagsField/TagsField.d.ts +6 -0
- package/dist/components/inputs/TagsField/TagsField.js.map +1 -1
- package/dist/components/inputs/TagsInput/TagsInput.d.ts +8 -0
- package/dist/components/inputs/TagsInput/TagsInput.js.map +1 -1
- package/dist/components/inputs/TextField/TextField.d.ts +8 -0
- package/dist/components/inputs/TextField/TextField.js.map +1 -1
- package/dist/components/inputs/Textarea/Textarea.d.ts +8 -0
- package/dist/components/inputs/Textarea/Textarea.js.map +1 -1
- package/dist/components/inputs/TextareaField/TextareaField.d.ts +7 -0
- package/dist/components/inputs/TextareaField/TextareaField.js.map +1 -1
- package/dist/components/layout/ActionBar/ActionBar.d.ts +7 -0
- package/dist/components/layout/ActionBar/ActionBar.js.map +1 -1
- package/dist/components/layout/AppShell/AppShell.js.map +1 -1
- package/dist/components/layout/AspectRatio/AspectRatio.d.ts +8 -0
- package/dist/components/layout/AspectRatio/AspectRatio.js.map +1 -1
- package/dist/components/layout/Box/Box.d.ts +8 -0
- package/dist/components/layout/Box/Box.js.map +1 -1
- package/dist/components/layout/Container/Container.d.ts +17 -0
- package/dist/components/layout/Container/Container.js.map +1 -1
- package/dist/components/layout/Divider/Divider.d.ts +7 -0
- package/dist/components/layout/Divider/Divider.js.map +1 -1
- package/dist/components/layout/Grid/Grid.d.ts +9 -0
- package/dist/components/layout/Grid/Grid.js.map +1 -1
- package/dist/components/layout/Inline/Inline.d.ts +8 -0
- package/dist/components/layout/Inline/Inline.js.map +1 -1
- package/dist/components/layout/Section/Section.d.ts +15 -0
- package/dist/components/layout/Section/Section.js.map +1 -1
- package/dist/components/layout/Split/Split.d.ts +9 -0
- package/dist/components/layout/Split/Split.js.map +1 -1
- package/dist/components/layout/Stack/Stack.d.ts +12 -0
- package/dist/components/layout/Stack/Stack.js.map +1 -1
- package/dist/components/layout/VisuallyHidden/VisuallyHidden.d.ts +7 -0
- package/dist/components/layout/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/components/navigation/Accordion/Accordion.d.ts +7 -0
- package/dist/components/navigation/Accordion/Accordion.js.map +1 -1
- package/dist/components/navigation/BottomNav/BottomNav.d.ts +9 -0
- package/dist/components/navigation/BottomNav/BottomNav.js.map +1 -1
- package/dist/components/navigation/NavLinks/NavLinks.d.ts +9 -0
- package/dist/components/navigation/NavLinks/NavLinks.js.map +1 -1
- package/dist/components/navigation/Stepper/Stepper.d.ts +7 -0
- package/dist/components/navigation/Stepper/Stepper.js.map +1 -1
- package/dist/components/navigation/Tabs/Tabs.d.ts +8 -0
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/components/overlays/Dialog/Dialog.d.ts +13 -0
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/components/overlays/DropdownMenu/DropdownMenu.d.ts +8 -0
- package/dist/components/overlays/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/overlays/Popover/Popover.d.ts +7 -0
- package/dist/components/overlays/Popover/Popover.js.map +1 -1
- package/dist/components/overlays/Sheet/Sheet.d.ts +8 -0
- package/dist/components/overlays/Sheet/Sheet.js.map +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +8 -0
- package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/typography/Amount/Amount.d.ts +8 -0
- package/dist/components/typography/Amount/Amount.js.map +1 -1
- package/dist/components/typography/Code/Code.d.ts +8 -0
- package/dist/components/typography/Code/Code.js.map +1 -1
- package/dist/components/typography/Heading/Heading.d.ts +8 -0
- package/dist/components/typography/Heading/Heading.js.map +1 -1
- package/dist/components/typography/Kbd/Kbd.d.ts +6 -0
- package/dist/components/typography/Kbd/Kbd.js.map +1 -1
- package/dist/components/typography/Link/Link.d.ts +9 -0
- package/dist/components/typography/Link/Link.js.map +1 -1
- package/dist/components/typography/Numeral/Numeral.d.ts +8 -0
- package/dist/components/typography/Numeral/Numeral.js.map +1 -1
- package/dist/components/typography/Prose/Prose.d.ts +9 -0
- package/dist/components/typography/Prose/Prose.js.map +1 -1
- package/dist/components/typography/Quote/Quote.d.ts +7 -0
- package/dist/components/typography/Quote/Quote.js.map +1 -1
- package/dist/components/typography/SectionHeader/SectionHeader.d.ts +8 -0
- package/dist/components/typography/SectionHeader/SectionHeader.js.map +1 -1
- package/dist/components/typography/Text/Text.d.ts +8 -0
- package/dist/components/typography/Text/Text.js.map +1 -1
- package/dist/icons/Icon.d.ts +1 -1
- package/dist/icons/Icon.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/ThemeProvider.d.ts +4 -4
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/themes.d.ts +1 -1
- package/dist/theme/themes.js +15 -3
- package/dist/theme/themes.js.map +1 -1
- package/dist/themes/fiesta.css +1 -1
- package/dist/themes/flightdeck.css +1 -0
- package/dist/themes/ledger.css +1 -1
- package/dist/themes/monograph.css +1 -1
- package/dist/themes/riso.css +1 -0
- package/package.json +4 -2
- package/skills/custom-theme/SKILL.md +45 -43
- package/skills/custom-theme/references/colour.md +1 -1
- package/skills/custom-theme/references/motion.md +2 -2
- package/skills/custom-theme/references/tokens.md +42 -42
- package/skills/custom-theme/references/type.md +13 -10
- package/skills/design-rules/SKILL.md +31 -3
- package/skills/layout-composition/SKILL.md +27 -88
- package/skills/layout-composition/references/action-bar.md +3 -3
- package/skills/layout-composition/references/app-shell.md +10 -3
- package/skills/layout-composition/references/aspect-ratio.md +2 -0
- package/skills/layout-composition/references/box.md +6 -6
- package/skills/layout-composition/references/container.md +14 -12
- package/skills/layout-composition/references/divider.md +4 -4
- package/skills/layout-composition/references/section.md +69 -0
- package/skills/layout-composition/references/visually-hidden.md +3 -3
- package/skills/setup-and-theming/SKILL.md +10 -6
- package/skills/setup-and-theming/references/fiesta.md +3 -1
- package/skills/setup-and-theming/references/flightdeck.md +39 -0
- package/skills/setup-and-theming/references/ledger.md +7 -7
- package/skills/setup-and-theming/references/monograph.md +4 -0
- package/skills/setup-and-theming/references/paper.md +7 -7
- package/skills/setup-and-theming/references/riso.md +32 -0
|
@@ -8,6 +8,18 @@ Source: https://kiln.mitchellsutton.com/docs/ui/layout/container
|
|
|
8
8
|
|
|
9
9
|
`Container` sets a maximum width and centres its content. The gutter sits _outside_ the width, so `width="text"` is a true reading measure at any screen size.
|
|
10
10
|
|
|
11
|
+
| `width` | Max width | For |
|
|
12
|
+
| --------- | --------- | ----------------------------------- |
|
|
13
|
+
| `narrow` | 32rem | sign-in, short forms, confirmations |
|
|
14
|
+
| `text` | 42rem | articles and long reading |
|
|
15
|
+
| `content` | 68rem | most pages (the default) |
|
|
16
|
+
| `wide` | 84rem | dashboards and wide tables |
|
|
17
|
+
| `full` | 100% | edge to edge, inside the gutter |
|
|
18
|
+
|
|
19
|
+
Pass `gutter={false}` when the parent already pads its content.
|
|
20
|
+
|
|
21
|
+
The `narrow`, `text` and `content` widths, one above the other.
|
|
22
|
+
|
|
11
23
|
```tsx
|
|
12
24
|
import { Container, Stack, Text } from '@mitcsutt/kiln-ui'
|
|
13
25
|
|
|
@@ -26,25 +38,15 @@ export function Usage() {
|
|
|
26
38
|
}
|
|
27
39
|
```
|
|
28
40
|
|
|
29
|
-
| `width` | Max width | For |
|
|
30
|
-
| --------- | --------- | ----------------------------------- |
|
|
31
|
-
| `narrow` | 32rem | sign-in, short forms, confirmations |
|
|
32
|
-
| `text` | 42rem | articles and long reading |
|
|
33
|
-
| `content` | 68rem | most pages (the default) |
|
|
34
|
-
| `wide` | 84rem | dashboards and wide tables |
|
|
35
|
-
| `full` | 100% | edge to edge, inside the gutter |
|
|
36
|
-
|
|
37
|
-
Pass `gutter={false}` when the parent already pads its content.
|
|
38
|
-
|
|
39
41
|
## API
|
|
40
42
|
|
|
41
43
|
`ContainerProps`:
|
|
42
44
|
|
|
43
45
|
| Prop | Type | Default | Description |
|
|
44
46
|
| --- | --- | --- | --- |
|
|
45
|
-
| `width` | `'content' \| 'narrow' \| 'text' \| 'wide' \| 'full'` |
|
|
47
|
+
| `width` | `'content' \| 'narrow' \| 'text' \| 'wide' \| 'full'` | `content` | Maximum content width: `narrow` 32rem · `text` 42rem (prose measure) · `content` 68rem (default) · `wide` 84rem · `full` (no maximum). |
|
|
46
48
|
| `gutter` | `boolean` | `true` | Keep the fluid page gutter on either side. Default `true`. |
|
|
47
|
-
| `as` | `'div' \| 'section' \| 'article' \| 'header' \| 'footer' \| 'main' \| 'nav'` |
|
|
49
|
+
| `as` | `'div' \| 'section' \| 'article' \| 'header' \| 'footer' \| 'main' \| 'nav'` | `div` | |
|
|
48
50
|
| `hideBelow` | `'sm' \| 'md' \| 'lg' \| 'xl'` | | Hide below this breakpoint (e.g. `md` → hidden on phones, shown from 48em). |
|
|
49
51
|
| `hideAbove` | `'sm' \| 'md' \| 'lg' \| 'xl'` | | Hide from this breakpoint up (e.g. `md` → shown on phones only). |
|
|
50
52
|
|
|
@@ -8,6 +8,8 @@ Source: https://kiln.mitchellsutton.com/docs/ui/layout/divider
|
|
|
8
8
|
|
|
9
9
|
`Divider` separates groups. For a rule between every item of a list, use `Stack dividers` instead, which spaces the rules for you.
|
|
10
10
|
|
|
11
|
+
A labelled divider names the group that follows. `spacing` adds space above and below from the space scale, `strong` uses the stronger line colour, and `decorative` hides the rule from assistive technology when it carries no meaning (it's a `separator` otherwise).
|
|
12
|
+
|
|
11
13
|
```tsx
|
|
12
14
|
import { Divider, Inline, Stack, Text } from '@mitcsutt/kiln-ui'
|
|
13
15
|
|
|
@@ -30,8 +32,6 @@ export function Usage() {
|
|
|
30
32
|
}
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
A labelled divider names the group that follows. `spacing` adds space above and below from the space scale, `strong` uses the stronger line colour, and `decorative` hides the rule from assistive technology when it carries no meaning (it's a `separator` otherwise).
|
|
34
|
-
|
|
35
35
|
## API
|
|
36
36
|
|
|
37
37
|
`DividerProps`:
|
|
@@ -39,11 +39,11 @@ A labelled divider names the group that follows. `spacing` adds space above and
|
|
|
39
39
|
| Prop | Type | Default | Description |
|
|
40
40
|
| --- | --- | --- | --- |
|
|
41
41
|
| `orientation` | `'horizontal' \| 'vertical'` | `horizontal` | Default `horizontal`. A vertical rule stretches to its flex/grid row. |
|
|
42
|
-
| `strong` | `boolean` |
|
|
42
|
+
| `strong` | `boolean` | `false` | Heavier rule in `--color-line-strong` at `--border-width-strong`. |
|
|
43
43
|
| `label` | `ReactNode` | | Text set into a horizontal rule, e.g. "Earlier this week". It also names the separator. |
|
|
44
44
|
| `labelPosition` | `'start' \| 'center'` | `start` | Where the label sits. Default `start` (left-aligned by default); `center` for a lone break. |
|
|
45
45
|
| `spacing` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 11 \| 12` | | Margin on both sides of the rule (block axis if horizontal, inline if vertical). |
|
|
46
|
-
| `decorative` | `boolean` |
|
|
46
|
+
| `decorative` | `boolean` | `false` | Purely visual: hide it from assistive tech. Use when the rule only repeats a boundary that headings or landmarks already convey. |
|
|
47
47
|
| `hideBelow` | `'sm' \| 'md' \| 'lg' \| 'xl'` | | Hide below this breakpoint (e.g. `md` → hidden on phones, shown from 48em). |
|
|
48
48
|
| `hideAbove` | `'sm' \| 'md' \| 'lg' \| 'xl'` | | Hide from this breakpoint up (e.g. `md` → shown on phones only). |
|
|
49
49
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<!-- Generated from the Kiln docs by apps/docs/src/skills. Edit the docs pages, then run `pnpm generate:skills`. -->
|
|
2
|
+
|
|
3
|
+
# Section
|
|
4
|
+
|
|
5
|
+
> A full-bleed band of vertical space, with an optional surface and rules. Put a Container inside it for width.
|
|
6
|
+
|
|
7
|
+
Source: https://kiln.mitchellsutton.com/docs/ui/layout/section
|
|
8
|
+
|
|
9
|
+
`Section` is how a page gets its rhythm: each band pads itself top and bottom with a step from the space scale, and can paint a surface across the full width. Width is the `Container`'s job, so a section is almost always `Section` then `Container`.
|
|
10
|
+
|
|
11
|
+
Vary `space` between neighbours. The scale is non-linear for this reason: a page of `space={8}` everywhere has no rhythm at all.
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button, Container, Heading, Section, Stack, Text } from '@mitcsutt/kiln-ui'
|
|
15
|
+
|
|
16
|
+
export function Usage() {
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<Section space={7}>
|
|
20
|
+
<Container width="text">
|
|
21
|
+
<Stack gap={3}>
|
|
22
|
+
<Heading level={3} size="2xl">
|
|
23
|
+
Ride the coast for less
|
|
24
|
+
</Heading>
|
|
25
|
+
<Text tone="muted">An annual pass covers every ferry and bus in the bay.</Text>
|
|
26
|
+
</Stack>
|
|
27
|
+
</Container>
|
|
28
|
+
</Section>
|
|
29
|
+
<Section space={6} surface="inverse" divider="top">
|
|
30
|
+
<Container width="text">
|
|
31
|
+
<Stack gap={4} align="start">
|
|
32
|
+
<Text>Commuting every day? The pass pays for itself in five weeks.</Text>
|
|
33
|
+
<Button>Buy an annual pass</Button>
|
|
34
|
+
</Stack>
|
|
35
|
+
</Container>
|
|
36
|
+
</Section>
|
|
37
|
+
</>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Surfaces and bands
|
|
43
|
+
|
|
44
|
+
`surface` is `canvas`, `surface`, `sunken`, `inverse` or `accent`. On `inverse` and `accent`, the colour roles flip for everything inside, so text, links, focus rings and buttons stay legible with no extra props. `divider` adds a rule at the `top`, `bottom` or `both`.
|
|
45
|
+
|
|
46
|
+
## API
|
|
47
|
+
|
|
48
|
+
`SectionProps`:
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Description |
|
|
51
|
+
| --- | --- | --- | --- |
|
|
52
|
+
| `space` | `Responsive<Space>` | `8` | Block padding (top and bottom), as a step on the space scale. Responsive. Vary it: adjacent sections should not share the same step. Default `8`. |
|
|
53
|
+
| `surface` | `'accent' \| 'surface' \| 'canvas' \| 'sunken' \| 'inverse'` | | Full-bleed band colour. Omit to stay transparent on the canvas. `inverse` and `accent` re-point the ink, line and focus colours so children stay legible. |
|
|
54
|
+
| `divider` | `'top' \| 'bottom' \| 'both'` | | A hairline across the full bleed at the top, bottom or both edges. |
|
|
55
|
+
| `as` | `'div' \| 'section' \| 'article' \| 'aside' \| 'header' \| 'footer'` | `section` | |
|
|
56
|
+
| `hideBelow` | `'sm' \| 'md' \| 'lg' \| 'xl'` | | Hide below this breakpoint (e.g. `md` → hidden on phones, shown from 48em). |
|
|
57
|
+
| `hideAbove` | `'sm' \| 'md' \| 'lg' \| 'xl'` | | Hide from this breakpoint up (e.g. `md` → shown on phones only). |
|
|
58
|
+
|
|
59
|
+
Also accepts every prop of `HTMLAttributes<HTMLElement>`.
|
|
60
|
+
|
|
61
|
+
### Component tokens
|
|
62
|
+
|
|
63
|
+
Set these in a theme, or on one element, to change this component without touching the rest.
|
|
64
|
+
|
|
65
|
+
| Token | Default and use |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `--section-fill` | / --section-on (read-only) the band's fill and ink on inverse/accent |
|
|
68
|
+
| `--section-space-default` | block padding when `space` is unset (default var(--space-8)) |
|
|
69
|
+
| `--section-divider-color` | hairline colour for `divider` (default var(--color-line)) |
|
|
@@ -8,6 +8,8 @@ Source: https://kiln.mitchellsutton.com/docs/ui/layout/visually-hidden
|
|
|
8
8
|
|
|
9
9
|
`VisuallyHidden` keeps text in the accessibility tree while hiding it from view: the rest of a sentence a glyph implies, a heading the layout already makes obvious, a table caption.
|
|
10
10
|
|
|
11
|
+
Screen readers announce the rating above as "4.2 out of 5, from 318 passenger reviews". `as` renders it as another element, such as a heading (`as="h2"`). `focusable` makes a hidden link appear when it receives focus, which is how a skip link works.
|
|
12
|
+
|
|
11
13
|
```tsx
|
|
12
14
|
import { Inline, Text, VisuallyHidden } from '@mitcsutt/kiln-ui'
|
|
13
15
|
|
|
@@ -26,15 +28,13 @@ export function Usage() {
|
|
|
26
28
|
}
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
Screen readers announce the rating above as "4.2 out of 5, from 318 passenger reviews". `as` renders it as another element, such as a heading (`as="h2"`). `focusable` makes a hidden link appear when it receives focus, which is how a skip link works.
|
|
30
|
-
|
|
31
31
|
## API
|
|
32
32
|
|
|
33
33
|
`VisuallyHiddenProps`:
|
|
34
34
|
|
|
35
35
|
| Prop | Type | Default | Description |
|
|
36
36
|
| --- | --- | --- | --- |
|
|
37
|
-
| `focusable` | `boolean` |
|
|
37
|
+
| `focusable` | `boolean` | `false` | Reveal the content while it (or something inside it) has keyboard focus — for skip links and other keyboard-only affordances. |
|
|
38
38
|
| `as` | `'div' \| 'span' \| 'label' \| 'a' \| 'h1' \| 'h2' \| 'h3'` | `span` | Default `span`. |
|
|
39
39
|
| `href` | `string` | | Only for `as="a"`. |
|
|
40
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-and-theming
|
|
3
|
-
description: "Use when installing @mitcsutt/kiln-ui in a React app: loading its stylesheet, wrapping the app in ThemeProvider, choosing Paper or a preset theme (Monograph, Ledger, Fiesta) and a colour mode, setting the theme before first paint with themeScript under SSR or the Next.js App Router, and passing router links through asChild."
|
|
3
|
+
description: "Use when installing @mitcsutt/kiln-ui in a React app: loading its stylesheet, wrapping the app in ThemeProvider, choosing Paper or a preset theme (Monograph, Ledger, Fiesta, Flightdeck, Riso) and a colour mode, setting the theme before first paint with themeScript under SSR or the Next.js App Router, and passing router links through asChild."
|
|
4
4
|
metadata:
|
|
5
5
|
purpose: Install kiln-ui, load its CSS, and apply a built-in theme and colour mode correctly on the client and the server.
|
|
6
6
|
type: lifecycle
|
|
@@ -11,6 +11,8 @@ sources:
|
|
|
11
11
|
- mitcsutt/kiln:apps/docs/content/docs/ui/themes/monograph.mdx
|
|
12
12
|
- mitcsutt/kiln:apps/docs/content/docs/ui/themes/ledger.mdx
|
|
13
13
|
- mitcsutt/kiln:apps/docs/content/docs/ui/themes/fiesta.mdx
|
|
14
|
+
- mitcsutt/kiln:apps/docs/content/docs/ui/themes/flightdeck.mdx
|
|
15
|
+
- mitcsutt/kiln:apps/docs/content/docs/ui/themes/riso.mdx
|
|
14
16
|
---
|
|
15
17
|
|
|
16
18
|
<!-- Generated from the Kiln docs by apps/docs/src/skills. Edit the docs pages, then run `pnpm generate:skills`. -->
|
|
@@ -54,14 +56,14 @@ With no `theme`, you get **Paper**, the neutral default. `ThemeProvider` writes
|
|
|
54
56
|
|
|
55
57
|
```tsx
|
|
56
58
|
import '@mitcsutt/kiln-ui/styles.css'
|
|
57
|
-
import '@mitcsutt/kiln-ui/themes/
|
|
59
|
+
import '@mitcsutt/kiln-ui/themes/flightdeck.css'
|
|
58
60
|
|
|
59
|
-
;<ThemeProvider theme="
|
|
61
|
+
;<ThemeProvider theme="flightdeck" defaultMode="dark">
|
|
60
62
|
…
|
|
61
63
|
</ThemeProvider>
|
|
62
64
|
```
|
|
63
65
|
|
|
64
|
-
Presets are separate files, so an app pays only for the ones it imports. [Themes](references/paper.md) shows all
|
|
66
|
+
Presets are separate files, so an app pays only for the ones it imports. [Themes](references/paper.md) shows all six, and [Theming](https://kiln.mitchellsutton.com/docs/ui/foundations/theming) shows how to write your own.
|
|
65
67
|
|
|
66
68
|
## Compose a screen
|
|
67
69
|
|
|
@@ -229,7 +231,9 @@ Merges class names, filtering falsy values.
|
|
|
229
231
|
|
|
230
232
|
Read a reference when its description matches the task:
|
|
231
233
|
|
|
232
|
-
- [Paper](references/paper.md): The neutral default.
|
|
234
|
+
- [Paper](references/paper.md): The neutral default. An office that prints for everyone, with white sheets on grey stock, blue-black ink as the accent and Golos Text for type.
|
|
233
235
|
- [Monograph](references/monograph.md): A scholarly monograph read under a desk lamp at night. Blue slate, one ember accent, a big serif display. Dark-first.
|
|
234
|
-
- [Ledger](references/ledger.md): An accountant's
|
|
236
|
+
- [Ledger](references/ledger.md): An accountant's columnar pad. A white sheet ruled in green, banknote-green actions, accounting red, and figures set condensed instead of in a monospace.
|
|
235
237
|
- [Fiesta](references/fiesta.md): A screen-printed festival poster. Flat spot inks, hard offsets, condensed signage numerals and springy motion.
|
|
238
|
+
- [Flightdeck](references/flightdeck.md): A glass-cockpit flight display. Cyan for what you set, a reverse-video box for what you select, and green, amber and red for status, set in B612. Dark-first.
|
|
239
|
+
- [Riso](references/riso.md): A two-drum risograph zine. Fluorescent pink and blue on white stock, screen tints instead of borders, and Shantell Sans.
|
|
@@ -8,6 +8,8 @@ Source: https://kiln.mitchellsutton.com/docs/ui/themes/fiesta
|
|
|
8
8
|
|
|
9
9
|
_A screen-printed festival poster and sticker album._ Screen printing can't do gradients, so neither does Fiesta: flat spot inks on apricot poster stock, everything keylined in aubergine, and a hard misregistered offset where other themes have a soft shadow.
|
|
10
10
|
|
|
11
|
+
Fiesta predates Kiln's [second-order design rules](https://kiln.mitchellsutton.com/docs/ui/foundations/design-rules#second-order-tells) and ships unchanged for compatibility, so it isn't the model for a new theme.
|
|
12
|
+
|
|
11
13
|
|
|
12
14
|
## Use it
|
|
13
15
|
|
|
@@ -21,7 +23,7 @@ import { ThemeProvider } from '@mitcsutt/kiln-ui'
|
|
|
21
23
|
</ThemeProvider>
|
|
22
24
|
```
|
|
23
25
|
|
|
24
|
-
Fiesta's
|
|
26
|
+
Fiesta's faces (Big Shoulders, Bricolage Grotesque and Martian Mono for code) are declared in its own stylesheet, so they cost nothing unless you import it. It's light-first (the daytime show); dark mode is the floodlit night show.
|
|
25
27
|
|
|
26
28
|
## The idea, applied
|
|
27
29
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Generated from the Kiln docs by apps/docs/src/skills. Edit the docs pages, then run `pnpm generate:skills`. -->
|
|
2
|
+
|
|
3
|
+
# Flightdeck
|
|
4
|
+
|
|
5
|
+
> A glass-cockpit flight display. Cyan for what you set, a reverse-video box for what you select, and green, amber and red for status, set in B612. Dark-first.
|
|
6
|
+
|
|
7
|
+
Source: https://kiln.mitchellsutton.com/docs/ui/themes/flightdeck
|
|
8
|
+
|
|
9
|
+
_A glass-cockpit flight display._ Flightdeck follows the colour convention of electronic flight instruments, where each colour has one fixed meaning, and sets everything in the typefaces designed for Airbus cockpit displays.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Use it
|
|
13
|
+
|
|
14
|
+
Flightdeck is a preset, so import its stylesheet. It's dark-first, so pair it with `defaultMode="dark"`, and give `themeScript` the same:
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import '@mitcsutt/kiln-ui/styles.css'
|
|
18
|
+
import '@mitcsutt/kiln-ui/themes/flightdeck.css'
|
|
19
|
+
import { ThemeProvider, themeScript } from '@mitcsutt/kiln-ui'
|
|
20
|
+
|
|
21
|
+
;<html lang="en">
|
|
22
|
+
<head>
|
|
23
|
+
<script dangerouslySetInnerHTML={{ __html: themeScript('flightdeck', 'dark') }} />
|
|
24
|
+
</head>
|
|
25
|
+
<body>
|
|
26
|
+
<ThemeProvider theme="flightdeck" defaultMode="dark">
|
|
27
|
+
…
|
|
28
|
+
</ThemeProvider>
|
|
29
|
+
</body>
|
|
30
|
+
</html>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## The idea, applied
|
|
34
|
+
|
|
35
|
+
- **Colour.** The cockpit convention, mapped onto Kiln's roles. Cyan is the accent: what the pilot sets and acts on. What you selected is a neutral reverse-video box, like the selected line of a flight-management display. Green, amber and red are the positive, caution and critical tones, and info is steel blue. Neutrals are dark blue-grey display glass, never black. Light mode is the day mode of an electronic flight bag: pale cool grey with the cyan darkened to pass contrast.
|
|
36
|
+
- **Type.** B612 for text, display and figures (its digits are already equal width), and B612 Mono for code. B612 ships static regular and bold weights and a Latin subset only, so Latin Extended text falls back to a system face. There are no uppercase transforms.
|
|
37
|
+
- **Shape.** Square instrument bezels: small radii on actions, fields and surfaces. Chips are pills, like annunciator capsules.
|
|
38
|
+
- **Depth.** Hairlines, with no shadow on static surfaces. Floating layers add a very subtle dark shadow, with no glow.
|
|
39
|
+
- **Motion.** Instruments move linearly and quickly: a gentle ease-out, a little faster than the default, and no bounce.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# Ledger
|
|
4
4
|
|
|
5
|
-
> An accountant's
|
|
5
|
+
> An accountant's columnar pad. A white sheet ruled in green, banknote-green actions, accounting red, and figures set condensed instead of in a monospace.
|
|
6
6
|
|
|
7
7
|
Source: https://kiln.mitchellsutton.com/docs/ui/themes/ledger
|
|
8
8
|
|
|
9
|
-
_An accountant's
|
|
9
|
+
_An accountant's columnar pad._ Quiet, dense and numeric. In Ledger the numbers are the content, so they get their own treatment: the same face set condensed, always tabular, so a column of money reads like receipt tape.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
## Use it
|
|
@@ -25,8 +25,8 @@ Ledger is light-first. It suits screens that are mostly tables and totals: invoi
|
|
|
25
25
|
|
|
26
26
|
## The idea, applied
|
|
27
27
|
|
|
28
|
-
- **Colour.**
|
|
29
|
-
- **Type.**
|
|
30
|
-
- **Shape.**
|
|
31
|
-
- **Depth.** Hairlines, and a double rule above a table's footer (`--table-foot-rule`), as a ledger totals a column.
|
|
32
|
-
- **Motion.** Brief and flat (`--motion-scale: 0.8`).
|
|
28
|
+
- **Colour.** A white sheet, with the green carried by the rules rather than the paper. Banknote green for actions, accounting red for negatives and a flat highlighter yellow for the highlight. Dark mode is a blue-green carbon-copy night with dim green rules, not a green-screen terminal.
|
|
29
|
+
- **Type.** Archivo throughout. Figures use its width axis to set condensed (`--numeric-stretch`) with tabular numerals, so they get receipt-tape narrowness without a monospace. Atkinson Hyperlegible Mono is for code only. A 15px base on a 1.2 ratio.
|
|
30
|
+
- **Shape.** Tight radii on actions, fields and surfaces, squarer chips, and rounded-square avatars like ledger stamps. A compact density of 0.86, so every space step and control is smaller.
|
|
31
|
+
- **Depth.** Hairlines in the ledger green, with flat surfaces, and a double rule above a table's footer (`--table-foot-rule`), as a ledger totals a column.
|
|
32
|
+
- **Motion.** Brief and flat, with no bounce (`--motion-scale: 0.8`).
|
|
@@ -8,6 +8,8 @@ Source: https://kiln.mitchellsutton.com/docs/ui/themes/monograph
|
|
|
8
8
|
|
|
9
9
|
_A scholarly monograph read under a desk lamp at night._ Modern nostalgia: blue slate rather than black, a single ember accent that behaves like phosphor, and a serif display set big and tight over a newsroom grotesk.
|
|
10
10
|
|
|
11
|
+
Monograph predates Kiln's [second-order design rules](https://kiln.mitchellsutton.com/docs/ui/foundations/design-rules#second-order-tells) and ships unchanged for compatibility, so it isn't the model for a new theme.
|
|
12
|
+
|
|
11
13
|
|
|
12
14
|
## Use it
|
|
13
15
|
|
|
@@ -30,6 +32,8 @@ import { ThemeProvider, themeScript } from '@mitcsutt/kiln-ui'
|
|
|
30
32
|
</html>
|
|
31
33
|
```
|
|
32
34
|
|
|
35
|
+
Its faces (Newsreader, Schibsted Grotesk and Martian Mono) are declared in its own stylesheet, so they cost nothing unless you import it.
|
|
36
|
+
|
|
33
37
|
## The idea, applied
|
|
34
38
|
|
|
35
39
|
- **Colour.** Blue-slate neutrals (hue 255, never black). One ember accent (`oklch(0.72 0.15 52)` in dark, `oklch(0.565 0.158 44)` in light) that marks what's live and current, and never decorates. A cool slate highlight.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# Paper
|
|
4
4
|
|
|
5
|
-
> The neutral default.
|
|
5
|
+
> The neutral default. An office that prints for everyone, with white sheets on grey stock, blue-black ink as the accent and Golos Text for type.
|
|
6
6
|
|
|
7
7
|
Source: https://kiln.mitchellsutton.com/docs/ui/themes/paper
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
_An office that prints for everyone._ Paper is the theme you get when you set none. It's in the base stylesheet, and it's built to sit under any brand without arguing with it: white sheets on grey recycled stock, blue-black ink as the accent, and a typeface drawn for public services, so that everyone can read it.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
## Use it
|
|
@@ -24,12 +24,12 @@ Paper is also declared on the document root at zero specificity, so a preset or
|
|
|
24
24
|
|
|
25
25
|
## The idea, applied
|
|
26
26
|
|
|
27
|
-
- **Colour.**
|
|
28
|
-
- **Type.**
|
|
29
|
-
- **Shape.** Square-shouldered
|
|
30
|
-
- **Depth.**
|
|
27
|
+
- **Colour.** Cool grey stock for the canvas and near-white sheets for surfaces, so a surface reads against the page by fill alone. The primary action, the current item and live state are solid blue-black ink, and links are ink told apart by their underline. The one other hue is the proofreader's non-photo blue, kept for "you", the selected row and text selection. Tones are the only saturated colour on the page.
|
|
28
|
+
- **Type.** Golos Text for everything: text, headings, display, prose and figures. Atkinson Hyperlegible Mono for code. Paratype drew Golos for a national public-services website, so it has a plain zero, true tabular figures and distinct I, l and 1, and that is why it is here. The bundle has no italic file, so italics are synthesised. There is no serif. A 16px base on a 1.25 ratio.
|
|
29
|
+
- **Shape.** Square-shouldered actions and fields, slightly rounder surfaces, and pill chips as the one deliberate contrast. Round avatars.
|
|
30
|
+
- **Depth.** A fill change rather than a border: a sheet on stock needs no edge. Soft blue-black shadows for floating layers.
|
|
31
31
|
- **Motion.** A quart ease-out, brisk, with no bounce.
|
|
32
32
|
|
|
33
|
-
## All
|
|
33
|
+
## All six themes
|
|
34
34
|
|
|
35
35
|
The same screen in each built-in theme, in the page's current mode:
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- Generated from the Kiln docs by apps/docs/src/skills. Edit the docs pages, then run `pnpm generate:skills`. -->
|
|
2
|
+
|
|
3
|
+
# Riso
|
|
4
|
+
|
|
5
|
+
> A two-drum risograph zine. Fluorescent pink and blue on white stock, screen tints instead of borders, and Shantell Sans.
|
|
6
|
+
|
|
7
|
+
Source: https://kiln.mitchellsutton.com/docs/ui/themes/riso
|
|
8
|
+
|
|
9
|
+
_A two-drum risograph zine._ A riso print can't do gradients or soft shadows. It does flat spot ink, screen tints and the occasional misregistration, so that is all Riso uses: two inks on bright white stock, set in a typeface drawn from handwriting.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Use it
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import '@mitcsutt/kiln-ui/styles.css'
|
|
16
|
+
import '@mitcsutt/kiln-ui/themes/riso.css'
|
|
17
|
+
import { ThemeProvider } from '@mitcsutt/kiln-ui'
|
|
18
|
+
|
|
19
|
+
;<ThemeProvider theme="riso" defaultMode="light">
|
|
20
|
+
…
|
|
21
|
+
</ThemeProvider>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Riso's face is declared in its own stylesheet, so it costs nothing unless you import it. It's light-first, and dark mode is the deep-blue-stock edition.
|
|
25
|
+
|
|
26
|
+
## The idea, applied
|
|
27
|
+
|
|
28
|
+
- **Colour.** Two drums: fluorescent pink is the accent and blue is the text colour, on bright white stock. Surfaces are screen tints (a percentage of an ink) rather than borders. The highlight is an overprint: a pink tint under blue ink. Night mode is the same two inks printed on deep blue stock, not black.
|
|
29
|
+
- **Type.** Shantell Sans for every role except code, drawn from the artist Shantell Martin's own handwriting. It has no tabular figures, so numerals are not column-aligned. Atkinson Hyperlegible Mono is for code. A 1.25 ratio.
|
|
30
|
+
- **Shape.** Hand-cut and mixed: generous radii on actions and surfaces, smaller radii on fields, and pill chips.
|
|
31
|
+
- **Depth.** A fill change, with no shadow on static surfaces. The one misregistered moment is a hard pink offset on floating layers, as if the second drum printed slightly off.
|
|
32
|
+
- **Motion.** A mild spring: things land with a small overshoot.
|