Colors index reference
You can now reference colors from theme by index in all components:
use-form touched and dirty state
use-form
hook now exposes fields touched and dirty state:
RichTextEditor formats
RichTextEditor component now supports formats
prop to restrict formats
that user can use in the editor.
In the following example three formats are enabled: bold
, italic
and underline
,
toolbar includes italic
and underline
controls, bold
format can be added with Ctrl + B
keyboard
shortcut, other formats are not available:
use-text-selection hook
use-text-selection allows to get current selected text on the page:
use-debounced-state hook
use-debounced-state is an alternative for use-debounced-value for uncontrolled components:
Minimal Next.js template
You can now use minimal Next.js template that includes only basic server side rendering setup. It is useful when you want to set up your own tooltip (configuration for Jest, Storybook, ESLint, prettier and other tools is not included).
Other changes
- New theme functions:
theme.fn.primaryShade
andtheme.fn.primaryColor
- Text component now supports
strikethrough
anditalic
props to add text-decoration and font-style styles. - Text component now supports
span
prop as a shorthand forcomponent="span"
. - Carousel component now support keyboard events (switching slides with right/left arrows)
- Accordion.Control component now has
data-active
attribute whenAccordion.Item
is expanded - RichTextEditor now uses
value
instead ofdefaultValue
to manage state, note that component does not support react strict mode - Spotlight now supports
disabled
prop to prevent spotlight rendering when the prop is set totrue
- Select and MultiSelect components now support
readOnly
prop - use-toggle hook can now be called without options, it will use boolean values by default
- Spotlight now supports
searchInputProps
prop that spreads props to search input - Popover.Dropdown now has
data-position
attribute with current position