This is a stub types definition for theme-ui (https://github.com/system-ui/theme-ui).
theme-ui provides its own type definitions, so you don't need @types/theme-ui__color installed!
This is a stub types definition. theme-ui__color provides its own type definitions, so you do not need this installed.
Stub TypeScript definitions entry for theme-ui, which provides its own types definitions
This is a stub types definition for theme-ui (https://github.com/system-ui/theme-ui).
theme-ui provides its own type definitions, so you don't need @types/theme-ui__color installed!
@theme-ui/sidenav
package was removed due to low usage and breaking changes in @types/react
.
:tada: This release contains work from a new contributor! :tada:
Thank you, CJ (@dev-cj), for all your work!
:tada: This release contains work from new contributors! :tada:
Thanks for all your work!
:heart: Ben (@benchilds)
:heart: Justin Cooper (@JustinotherGitter)
type
imports on src/index #2392 (@lachlanjc):tada: This release contains work from new contributors! :tada:
Thanks for all your work!
:heart: Nischal Shakya (@Nischal2015)
:heart: Wahid Rahim (@wahidrahim)
useMDXComponents
import #2370 (@Nischal2015)@mdx-js/react
to peerDeps for gatsby-plugin-theme-ui
#2331 (@hasparus):tada: This release contains work from new contributors! :tada:
Thanks for all your work!
:heart: Luke Watts (@thisislawatts)
:heart: Valto Savi (@pointlessrapunzel)
:heart: Brage Sekse Aarset (@braaar)
theme-ui
no longer includes @theme-ui/mdx
— MDX is now opt-in.If your project is not using MDX or importing Themed
, you shouldn't need to
change anything.
MDXProvider
is no longer included in Theme UI ThemeProvider
, and has been
removed in favour of an useThemedStylesWithMdx
hook.
Migration: Use useThemedStylesWithMdx
together with MDXProvider
and useMDXComponents
from @mdx-js/react
.
import {
MDXProvider,
useMDXComponents,
Components as MDXComponents,
MergeComponents as MergeMDXComponents,
} from '@mdx-js/react'
import { useThemedStylesWithMdx } from '@theme-ui/mdx'
import { ThemeProvider, Theme } from 'theme-ui'
interface MyProviderProps {
theme: Theme
components?: MDXComponents | MergeMDXComponents
children: React.ReactNode
}
function MyProvider({ theme, components, children }: MyProviderProps) {
const componentsWithStyles = useThemedStylesWithMdx(useMDXComponents(components))
return (
<ThemeProvider theme={theme}>
<MDXProvider components={componentsWithStyles}>
{children}
</MDXProvider>
</ThemeProvider>
)
}
Themed
components dict and other exports from @theme-ui/mdx
are no longer reexported from theme-ui
.
Migration: Import it from @theme-ui/mdx
instead.
- import { Themed } from 'theme-ui'
+ import { Themed } from '@theme-ui/mdx'
@theme-ui/editor
was removed. Use CSS GUI instead./customize
page in Theme UI docs has been removed. Use Components.ai Theme Builder or an alternative instead.Theme UI 0.15.0 drops support for React 16 and React 17. Your use case may still work, but we don't guarantee it.
Select
component default paddingRight
style has increased to spaces[4]
(32px by default), to avoid text flowing behind the chevron icon.
@theme-ui/prism
gatsby-plugin-theme-ui
:tada: This release contains work from a new contributor! :tada:
Thank you, kamatte (@kamatte-me), for all your work!
@theme-ui/components
viewBox
svg property #2209 (@kamatte-me)@theme-ui/editor
, @theme-ui/match-media
, theme-ui
@theme-ui/color-modes
, @theme-ui/components
, @theme-ui/core
, @theme-ui/editor
, gatsby-plugin-theme-ui
, gatsby-theme-style-guide
, gatsby-theme-ui-layout
, @theme-ui/match-media
, @theme-ui/mdx
, @theme-ui/parse-props
, @theme-ui/sidenav
, @theme-ui/style-guide
, @theme-ui/theme-provider
, theme-ui
@theme-ui/components
:tada: This release contains work from new contributors! :tada:
Thanks for all your work!
:heart: Brage (@braaar)
:heart: peterlits zo (@PeterlitsZo)
:heart: Ryan Turner (@rtturner)
:heart: Cannon Lock (@CannonLock)
@theme-ui/components
, @theme-ui/css
, gatsby-plugin-theme-ui
, @theme-ui/mdx
, @theme-ui/sidenav
, @theme-ui/theme-provider
, theme-ui
@theme-ui/tailwind
@theme-ui/custom-properties
@theme-ui/color-modes
theme-ui
@theme-ui/color-modes
gatsby-plugin-theme-ui
@theme-ui/style-guide
@theme-ui/components
@theme-ui/sidenav
@theme-ui/sidenav
@theme-ui/css
:tada: This release contains work from new contributors! :tada:
Thanks for all your work!
:heart: Simen A. W. Olsen (@cobraz)
:heart: Akash (@appsparkler)
:heart: Greg Poole (@gpoole)
BREAKING CHANGE: @emotion/react
and @mdx-js/react
were moved to peerDependencies of theme-ui
, @theme-ui/mdx
and @theme-ui/sidenav
and must be installed separately. This is a revert of change from Theme UI v0.3, and it's meant to help solve version clashes and context mismatch bugs on user side. Connected issues: #1793, #1531, #1530, #1388, #1345, #1130.
@theme-ui/color-modes
, @theme-ui/components
, @theme-ui/core
, @theme-ui/css
, gatsby-plugin-theme-ui
, @theme-ui/mdx
, @theme-ui/parse-props
, @theme-ui/sidenav
, @theme-ui/theme-provider
, theme-ui
@theme-ui/core
@theme-ui/core
, theme-ui
gatsby-plugin-theme-ui
gatsby-plugin-theme-ui
(@hasparus)@theme-ui/prism
:tada: This release contains work from a new contributor! :tada:
Thank you, William Pei (@draekien), for all your work!
@theme-ui/color-modes
, @theme-ui/css
@theme-ui/color-modes
, @theme-ui/color
, @theme-ui/components
, @theme-ui/core
, @theme-ui/css
, @theme-ui/custom-properties
, @theme-ui/editor
, gatsby-plugin-theme-ui
, gatsby-theme-style-guide
, gatsby-theme-ui-layout
, @theme-ui/match-media
, @theme-ui/mdx
, @theme-ui/parse-props
, @theme-ui/preset-base
, @theme-ui/preset-bootstrap
, @theme-ui/preset-bulma
, @theme-ui/preset-dark
, @theme-ui/preset-deep
, @theme-ui/preset-funk
, @theme-ui/preset-future
, @theme-ui/preset-polaris
, @theme-ui/preset-roboto
, @theme-ui/preset-sketchy
, @theme-ui/preset-swiss
, @theme-ui/preset-system
, @theme-ui/preset-tailwind
, @theme-ui/preset-tosh
, @theme-ui/presets
, @theme-ui/prism
, @theme-ui/sidenav
, @theme-ui/style-guide
, @theme-ui/tailwind
, @theme-ui/theme-provider
, theme-ui
, @theme-ui/typography
@theme-ui/components
:tada: This release contains work from a new contributor! :tada:
Thank you, Matt Gleich (@gleich), for all your work!
@theme-ui/color-modes
, @theme-ui/color
, @theme-ui/components
, @theme-ui/core
, @theme-ui/css
, @theme-ui/custom-properties
, @theme-ui/editor
, gatsby-plugin-theme-ui
, gatsby-theme-style-guide
, gatsby-theme-ui-layout
, @theme-ui/match-media
, @theme-ui/mdx
, @theme-ui/parse-props
, @theme-ui/preset-base
, @theme-ui/preset-bootstrap
, @theme-ui/preset-bulma
, @theme-ui/preset-dark
, @theme-ui/preset-deep
, @theme-ui/preset-funk
, @theme-ui/preset-future
, @theme-ui/preset-polaris
, @theme-ui/preset-roboto
, @theme-ui/preset-sketchy
, @theme-ui/preset-swiss
, @theme-ui/preset-system
, @theme-ui/preset-tailwind
, @theme-ui/preset-tosh
, @theme-ui/presets
, @theme-ui/prism
, @theme-ui/sidenav
, @theme-ui/style-guide
, @theme-ui/tachyons
, @theme-ui/tailwind
, @theme-ui/theme-provider
, theme-ui
, @theme-ui/typography
initialColorModeName: 'light'
#1922 (@gleich):tada: This release contains work from new contributors! :tada:
Thanks for all your work!
:heart: Torne Wuff (@tornewuff)
:heart: Jordie Bodlay (@jordie23)
makeTheme
, makeStyles
and makeColorsScale
which can be imported from
@theme-ui/css/utils.@theme-ui/color
, @theme-ui/css
, @theme-ui/preset-base
,
@theme-ui/preset-bootstrap
, @theme-ui/preset-bulma
,
@theme-ui/preset-dark
, @theme-ui/preset-deep
, @theme-ui/preset-funk
,
@theme-ui/preset-future
, @theme-ui/preset-polaris
,
@theme-ui/preset-roboto
, @theme-ui/preset-sketchy
,
@theme-ui/preset-swiss
, @theme-ui/preset-system
,
@theme-ui/preset-tailwind
, @theme-ui/preset-tosh
, @theme-ui/presets
@theme-ui/color-modes
, @theme-ui/core
, @theme-ui/editor
,
@theme-ui/theme-provider
, theme-ui
@theme-ui/core
, @theme-ui/css
@theme-ui/color-modes
, @theme-ui/components
, @theme-ui/core
,
@theme-ui/editor
, gatsby-theme-style-guide
, gatsby-theme-ui-layout
,
@theme-ui/match-media
, @theme-ui/mdx
, @theme-ui/parse-props
,
@theme-ui/sidenav
, @theme-ui/style-guide
, @theme-ui/theme-provider
,
theme-ui
@theme-ui/css
to sidebar and packages page
#1877
(@hasparus)@theme-ui/css
@theme-ui/core
, @theme-ui/css
theme-ui
@theme-ui/prism
:tada: This release contains work from a new contributor! :tada:
Thank you, Vlad Shcherbin (@vladshcherbin), for all your work!
Background color of autofilled inputs will now default to
theme.colors.background
. It can be changed by setting
autofillBackgroundColor
prop.
@theme-ui/color-modes
, @theme-ui/components
, @theme-ui/editor
,
theme-ui
@theme-ui/color
, @theme-ui/css
@theme-ui/color
, @theme-ui/components
, @theme-ui/css
,
@theme-ui/custom-properties
, @theme-ui/editor
, gatsby-theme-style-guide
,
@theme-ui/preset-bootstrap
, @theme-ui/preset-bulma
,
@theme-ui/preset-dark
, @theme-ui/preset-deep
, @theme-ui/preset-funk
,
@theme-ui/preset-future
, @theme-ui/preset-polaris
,
@theme-ui/preset-roboto
, @theme-ui/preset-sketchy
,
@theme-ui/preset-swiss
, @theme-ui/preset-system
,
@theme-ui/preset-tailwind
, @theme-ui/style-guide
@theme-ui/components
@theme-ui/components
Theme UI packages became lighter! Built source code is now 9.5 kB (34%) smaller.
The trade-off is, Babel config has changed and it no longer supports Internet Explorer 11. If you need to support legacy browsers, you can transpile node_modules (e.g. with next-transpile-modules).
@theme-ui/preset-base
, @theme-ui/preset-bootstrap
, @theme-ui/sidenav
,
@theme-ui/typography
@theme-ui/components
@theme-ui/theme-provider
stable
@theme-ui/theme-provider
@theme-ui/color-modes
stable
@theme-ui/color-modes
, @theme-ui/color
, @theme-ui/components
,
@theme-ui/core
, @theme-ui/css
, @theme-ui/custom-properties
,
@theme-ui/editor
, gatsby-plugin-theme-ui
, gatsby-theme-code-recipes
,
gatsby-theme-style-guide
, gatsby-theme-ui-layout
, @theme-ui/match-media
,
@theme-ui/mdx
, @theme-ui/parse-props
, @theme-ui/preset-base
,
@theme-ui/preset-bootstrap
, @theme-ui/preset-bulma
,
@theme-ui/preset-dark
, @theme-ui/preset-deep
, @theme-ui/preset-funk
,
@theme-ui/preset-future
, @theme-ui/preset-polaris
,
@theme-ui/preset-roboto
, @theme-ui/preset-sketchy
,
@theme-ui/preset-swiss
, @theme-ui/preset-system
,
@theme-ui/preset-tailwind
, @theme-ui/preset-tosh
, @theme-ui/presets
,
@theme-ui/prism
, @theme-ui/sidenav
, @theme-ui/style-guide
,
@theme-ui/tachyons
, @theme-ui/tailwind
, @theme-ui/theme-provider
,
theme-ui
, @theme-ui/typography
@theme-ui/color-modes
@theme-ui/color-modes
, @theme-ui/css
, @theme-ui/custom-properties
,
theme-ui
cache-provider
PR as it significantly complicates SSR setup and
breaks apps without explicit Emotion SSR config.
https://github.com/system-ui/theme-ui/pull/1717#issuecomment-832647180.
BREAKING: theme.config.useRootStyles
now defaults to true
following
deprecation of useBodyStyles
. Styles from theme.styles.root
are now added
to <html>
element by default.
Moved theme configuration options to config
object in theme.
useRootStyles
, useCustomProperties
,
useColorSchemeMediaQuery
, useBorderBox
, and useLocalStorage
options on
the theme object are now scoped under a config
object on the theme, and
the root-level options, now deprecated, will be removed in a future release.(e.g. you should be setting theme.config.useBorderBox
instead of
theme.useBorderBox
)
theme.config
exists, it won't look for options on the theme
.Removed APIs, previously deprecated in 0.6.0
theme.useBodyStyles
⟶ theme.config.useRootStyles
Styled
⟶ Themed
@theme-ui/color-modes
, @theme-ui/css
, gatsby-plugin-theme-ui
@theme-ui/core
, @theme-ui/sidenav
:tada: v0.8.0 contains work from a new contributor! :tada:
Thank you, @Zolwiastyl, for all your work!
@theme-ui/css
@theme-ui/css
:tada: This release contains work from a new contributor! :tada:
:heart: David Dios (@dios-david)
Thanks for all your work!
@theme-ui/css
scroll-margin
props
#1664
(@dios-david)@theme-ui/editor
:tada: This release contains work from a new contributor! :tada:
Thank you, Jonathan Van Buren (@vanbujm), for all your work!
gatsby-plugin-theme-ui
@theme-ui/components
breakpoints
accept custom media queries
#1653
@carolinmaisenbachergatsby-plugin-theme-ui
, gatsby-theme-code-recipes
,
gatsby-theme-style-guide
, gatsby-theme-ui-layout
Reexported jsx
as createElement
to fix babel JSX pragma crash. Issue
#1603, PR
#1604 by @ethanwu10.
The following code doesn't crash anymore.
<div {...{}} key="1" />
changes relative to 0.3, not the latest 0.6 prerelease
Styled
components dict was renamed to Themed
to avoid
confusion with styled
components constructors from @emotion/styled
and
similar libraries.
theme.useRootStyles
configuration option (false by default). Set it to
true
to add styles.root
to html
instead of body
.
theme.useBodyStyles
configuration option still defaults to true
, but
it's going in to be deprecated in favor of theme.useRootStyles
in the
future.New scale: transitions
supporting transition
CSS property. Issue
#1079, PR
#1272
Objects in nested scales can now have a __default
key. PR
#951
Given the theme
const theme = {
colors: {
primary: {
__default: '#00f',
light: '#33f',
}
}
}
color: 'primary'
resolves to color: '#00f'
.
Configuration option for printing color mode. PR #1267, issue #1144. No more wasted ink.
{
initialColorModeName: "dark",
printColorModeName: "light"
}
A new component, Paragraph was added in PR #1298
Theme UI 0.6 depends on Emotion 11, and isn't compatible with Emotion 10 anymore.
Refer to Emotion 11 release notes for more information.
Color mode flash on first render is gone, but to achieve this we had to bring
back theme.rawColors
.
theme.colors
when reading
theme from useThemeUI
or inside sx
..colors
object contains Custom CSS Properties now..rawColors
.Default color mode name is no longer "default"
— it's now undefined
, what
represents the lack of color mode set by user or detected from preferences.
useColorSchemeMediaQuery
defaults to true
. Issue
#624, PR
#1373
How to migrate? Add useColorSchemeMediaQuery: false
to your theme if you
don't have this property.
Read more in the docs.
We no longer export internal React context named as Context
😅 It wasn't and
it's still not public API, but if you used it and you really need it, you
can grab it as __ThemeUIContext
. (But please don't do this. Use
ThemeProvider
from @theme-ui/core for local theme overrides instead.)
Styled
will be removed in v0.7. Use Themed
instead.useBodyStyles
will be removed in v0.7. Use useRootStyles
instead.Theme UI is now written in TypeScript, and the emitted types differ from
@types/theme-ui
.
false
in now accepted in responsive tuple types. PR
#1499
Known colors (primary, text, background, accent, secondary) in
ColorMode
can now be nested scales.
The following no longer typechecks, as colors.primary
can be an object.
sx={{
color: theme => theme.colors?.primary?.toUpperCase()
}}
But the following code still works.
sx={{
color: theme => theme.colors?.primary
}}
If colors.primary
is an object, colors.primary.__default
is used.
false
values are skipped before passing style objects to Emotion. Issue
#1297, PR
#1460.
The following syntax is now supported
sx={{ color: isActive && blue }}
"as" prop on Themed.X components now properly opts out of typechecking
ComponentProps<typeof Themed['div']>
, import
ThemedComponent
and use ThemedComponent<'div'>
instead.Theme UI 0.6 depends on csstype
v3
instead of csstype
v2.
Renamed types
styled-system
types was renamed or removed.SxProps
was renamed to SxProp
.SxStyleProp
, an alias for ThemeUIStyleObject
was removed. Use
ThemeUIStyleObject
instead.Refer to the changelog for a full list of changes.
Styled
to Themed
non-breaking. Add a deprecation
warning on Styled
until a future release. PR
#1461Fix issue where css custom vars are only added to body if modes is in the colors declaration of the theme.
BREAKING: Move theme configuration options to config
object in theme.
Breaking TypeScript: Known colors (primary, text, background,
accent, secondary) in ColorMode
can now be nested scales.
The following no longer typechecks, as colors.primary
can be an object.
sx={{
color: theme => theme.colors?.primary?.toUpperCase()
}}
But the following code still works.
sx={{
color: theme => theme.colors?.primary
}}
If colors.primary
is an object, colors.primary.__default
is used.
Add theme.useRootStyles
configuration option (false by default). Set it to
true
to add styles.root
to html
instead of body
. theme.useBodyStyles
configuration option still defaults to true
, but it's going in to be
deprecated in favor of theme.useRootStyles
in the future.
false
values before passing style objects to Emotion. Issue #1297, PRBREAKING: Default useColorSchemeMediaQuery
to true
. Issue #624, PR
How to migrate? Add useColorSchemeMediaQuery: false
to your theme if you
don't have this property.
Read more in the docs.
Option for gatsby-plugin-theme-ui
to disable body script
(injectColorFlashScript
, defaulting to true
). Issue #1369, PR #1370
@mdx-js/mdx
and @mdx-js/react
to ^1.6.22
,
gatsby-plugin-mdx to ^1.6.0
. PR #1351ComponentProps<typeof Themed['div']>
, import
ThemedComponent<'div'>
instead.@theme-ui/prism
: Support multiple highlight wrappers in a single code block.
PR #1393Support a default key for object in scales. PR #951
Given the theme
const theme = {
colors: {
primary: {
__default: '#00f',
light: '#33f',
}
}
}
color: 'primary'
resolves to color: '#00f'
.
iframe
tag instead of wrapping div
. IssueStyled
component to Themed
. PR #1323span
instead of div
SxProps
to SxProp
.SxStyleProp
, an alias for ThemeUIStyleObject
removed. Use
ThemeUIStyleObject
instead.sx
props types to all props accepting className
. PR #1308"^16.14.0 || ^17.0.0"
."^16.14.0 || ^17.0.0"
.csstype
3. PR #1261@emotion/react@11
instead of @emotion/core@10
sx
prop types are still global, and we opt in for Emotion css
prop types
(This will change in the future.)@theme-ui/color-modes
@theme-ui/css
theme-ui
@theme-ui/color-modes
Add configuration option for printing color mode. PR #1267, issue #1144.
{
initialColorModeName: "dark",
printColorModeName: "light"
}
@theme-ui/components
arrow
prop to Select to allow passing custom arrow icon. Issues #1177id
if passed. PR #1252@theme-ui/components
minWidth: min-content
on Checkbox and Radio. PR #1256@theme-ui/color
@theme-ui/components
Add Switch component #1035
<Label>
<Switch /> Enable email alerts?
</Label>
Pass size
prop down to IconButton in Close component. PR #1242
<Close size={24} />
@theme-ui/core
theme
prop required@theme-ui/editor
@theme-ui/preset-sketchy
@theme-ui/preset-sketchy
@theme-ui/prism
@theme-ui/sidenav
@theme-ui/sidenav
: move React to peerDependencies #978@theme-ui/style-guide
size
prop to ColorRow component #941@theme-ui/color-modes
theming
page@theme-ui/css
@theme-ui/core
@theme-ui/components
primary
as default variant for Badge
component #1109primary
as default variant for Alert
component #1102theme.text.default
variant for Text
component #870getting-started
page. Issue #602, PR@theme-ui/core
, @theme-ui/mdx
, and
@theme-ui/color-modes
context.components
(still available through MDX context)ColorModeProvider
componenttheme.initialColorMode
- use initialColorModeName
insteadLayout
, Header
, Main
, Footer
) - use Box
and Flex
insteaduseColorSchemeMediaQuery
flag, it will initialize the mode to
light
when @media (prefers-color-scheme: light)
is enabledColorMode
componentuseBodyStyles: false
to disableThemeStateProvider
<del>
tag was incorrectly specified as delete
@theme-ui/editor
API has changed significantly. See the README.md for
more information.@theme-ui/components
: on Grid component, allow custom columns
definitions
via strings #541@theme-ui/gatsby-theme-style-guide
: add docs on shadowing #558@theme-ui/preset-polaris
#567@theme-ui/color
: add transparentize
function #370@theme-ui/style-guide
: move context dependencies to peer dependencies #521localStorage
is not available #514@theme-ui/match-media
: add option for default index in hook #460@theme-ui/editor
: Update Reakit #517@theme-ui/editor
: fix color picker #498@theme-ui/components
: fix NavLink base styles #497@theme-ui/components
: add more components #458@theme-ui/color
: add alpha
utility #441@theme-ui/match-media
: Add default breakpoint index argument for SSR@theme-ui/editor
add components for editing sx
styles@theme-ui/editor
add StylesForm
component@theme-ui/match-media
package #375@theme-ui/components
package #411prefers-color-scheme
media query
behavior by default #246@theme-ui/editor
packageColorPicker
component to @theme-ui/editor
#327gatsby-theme-ui-blog
package #311gatsby-theme-code-recipe
package #313gatsby-theme-style-guide
#315gatsby-theme-style-guide
package #301jsx
create element function #302gatsby-plugin-theme-ui
remove JSX syntax from gatsby-ssr in Gatsby plugin@theme-ui/typography
fix for CSS font-family keywords #285@theme-ui/preset-tailwind
add button and input variants #291useCustomProperties
is
enabled #274initialColorMode
matches a color mode name #245@theme-ui/custom-properties
package #235@theme-ui/prism
#231css
prop through when needed in jsx
#182@theme-ui/sidenav
initial publish@theme-ui/prism
add display: inline-block
to keep empty lines@theme-ui/prism
pass outer className to element #163key
prop to element in gatsby-plugin-theme-ui #145gatsby-plugin-theme-ui
#137lodash.merge
with deepmerge
Box
and layout componentscss
prop in experimental custom pragma to sx
to avoid collisions
with Emotion and other librariesThemeProvider
toStyle
API from Typography.js package@theme-ui/typography
@emotion/styled
dependency - layout components are no longer created
with styled
so passing non-HTML attributes to the component will result in
React rendering those props to the DOMColorModeProvider
and ComponentProvider
exports