Changelog
Latest changes, bug fixes, and new component releases
Mar 12, 2023
🎉 Our major release is here: className exposure and full switch to Tailwind CSS
This major release is the first step towards a production-ready version of Tremor. Over the past few months, we have rewritten the library to make it fit for the future. We added the long-awaited exposure of className (#75) and support for other HTML attributes, enabling you to overwrite or extend our root styles with Tailwind CSS.
The improvements in this release resulted in removed properties (see migration guide below). This also means that Tailwind CSS has now become a prerequisite to using Tremor at full capacity (including our Blocks).
Migration Info
If you use Tremor in an existing project remove the Tremor stylesheet import in the _app.js / _app.tsx file.
- `tailwind.config.js`: With this release, you must add the path to the tremor package in the content section in your Tailwind CSS configuration. If you use Tremor in an existing project, remove the Tremor stylesheet import in the _app.js / _app.tsx file.
Action: Add './node_modules/@tremor/**/*.{js,ts,jsx,tsx}' in your `tailwind.config.js` content section.
Attention: See Installation Guideline for more.
- Breaking AreaChart, LineChart, BartChart, DonutChart: dataKey has been replaced with index.
Action: Replace <AreaChart dataKey="date" /> with <AreaChart index="date" />
- Breaking marginTop has been removed. To set margins with Tailwind CSS, use className instead.
Action: Replace marginTop="mt-4" with className="mt-4"
- Breaking height has been removed. To set height with Tailwind CSS, use className instead.
Action: Replace height="h-72" with className="h-72" or className="h-[500px]"
- Breaking yAxisWidth prop has been changed to take in a numeric pixel value instead of a Tailwind utility.
Action: Replace yAxisWidth="w-12" with yAxisWidth= { 48 }
- Breaking maxWidth has been removed. To set a maximum width with Tailwind CSS, use className instead.
Action: Replace maxWidth="max-w-md" with className="max-w-md"
- Breaking spaceX has been removed. To set the space between items, use className instead.
Action: Replace spaceX="space-x-3" with className="space-x-3"
- Breaking truncate has been removed. To truncate text, use className instead.
Action: Replace truncate={ true } with className="truncate"
- Breaking ColGrid: has been renamed to Grid
Action: Replace <ColGrid></ColGrid> with <Grid></Grid>
- Breaking Tracking: has been renamed to Tracker
Action: Replace <Tracking /> with <Tracker />
- Breaking Dropdown, SelectBox, MultiSelectBox, TabList, Toggle: The type of the value property has been changed to string .
Action: Cast the input for value to string
- Breaking Accordion, Card: shadow removed. Use className instead. Note that we provide a shadow by default. To remove shadows altogether, use className="shadow-none"
Action: Replace <Card shadow={ true }></Card> with <Card className="shadow"></Card>
- Breaking Badge, BadgeDelta, Callout, Button: text has been removed. Please use children instead. #81
Action: Replace <Badge text="Your Text" /> with <Badge>Your Text</Badge>
- Breaking Card: hFull has been removed. Use className instead.
Action: Replace <Card hFull={ true }></Card> with <Card className="h-full"></Card>
- Breaking Table, Metric: textAlignment has been removed. Use className instead. #135, #295, #318
Action: Replace <TableHeaderCell textAlignment="text-left"></TableHeaderCell> with <TableHeaderCell className="text-left"></TableHeaderCell>
- Breaking Grid: gapX and gapY has been removed. Use className instead.
Action: Replace <Grid gapX="gap-x-6"></Grid> with <Grid className="gap-x-6"></Grid>
- Breaking Block: This component has been removed. Use a `div` instead.
Action: Replace <Block truncate="true"></Block> with <div className="truncate"></div>
- Breaking Footer: This component has been removed. Use a `div` with a border instead.
Action: Replace <Footer height="h-20"></Footer> with <div className="h-20 mt-6 pt-4 border-t border-slate-200"></div>
Feb 3, 2023
Quality of life improvements to the Date Range Picker
This release adds two new features to the Date Range Picker component. There is a new locale property, helping you in bringing your dashboard to more users around the world. We also added a dropdownPlaceholder property and added support for an endDate to our options prop.
New Components and Features
- DateRangePicker: Add i18n Support to support multiple languages. For this, use the new locale prop. PR #292, #205
- DateRangepicker: Added endDate key to the options array object in order to support arbitrary date ranges in the dropdown options instead of only relative ones. Discussed here Disc #275, #86
- DateRangepicker: A new dropdownPlaceholder prop allows for setting the dropdown placeholder text separately.
Jan 15, 2023
Improvements to the Button component
We merged the Button and ButtonInline components. Hence, this release adds two new features to the resulting Button component. A variant property for styling as well as the option to pass text child elements.
Fixes and Improvements
- Button: Added new variant property, replacing the importance property for button styling. PR #273
- Button: Added new option to pass text as a child element, deprecating the text property.
- ButtonInline: Is now deprecated. Please use Button with variant set to 'light'
Jan 4, 2023
Mastering the basics
We are excited to announce that our input components have undergone some updates! We have added a variety of new features to improve accessibility and control.
Fixes and Improvements
- Added a new value and property enabling a controllable state.
- Added new onValueChange property to replace handleSelect (handleSelect is deprecated)
- Enabled KeyListeners, e.g. ESC key to dismiss an opened Dropdown and Arrow Up/Down to skim through options.
- Added defaultValue for uncontrolled mode
- Added id property
- Added a new DateRangePicker component which will replace the current Datepicker (Datepicker is deprecated)
- It supports a controlled and uncontrolled state, through the value and the defaultValue properties. The input format is a tuple in the following format: [startDate, endDate, dropdownOption (optional)]
- The default dropdown options can be replaced through the options property
Dec 15, 2022
Text input is finally here!
After a long wait, the text input component is finally available. Along the way we also added some improvements to existing components.
New Components and Features
- Text Input: Create interactive applications by getting textual data from the user. #179, #145
Fixes and Improvements
- Dropdown, MultiSelectBox, and SelectBox: Added optional icon property to insert an icon within the input box
- AreaChart, LineChart, and BarChart: Added optional minValue and maxValue properties to control the minimun and maximum values on a chart's axis. PR#240
- Buttons: Now support three types button, submit, reset, and three new corresponding event handlers, onClick, onSubmit, onReset. Warning: The handleClick property will be deprecated in the next major release. Please use onClick from now on. #205, PR#188
Nov 29, 2022
Celebrating our first community-built release
This release is almost solely built on issues and pull requests created by our community. It features new props of our existing components to build cooler stuff and cover new edge cases. Thank you eykrehbein, dmytro-tinybird, souravmondal93, jelleag, and bernsno for contributing.
New Features
- Donut Chart: Added variant property to select between a pie or donut chart
- Bar List: Added optional href key in data to incorporate links
- Area Chart / Bar Chart / Line Chart: Added optional autoMinValue property to adjust the minimum value in relation to the magnitude of the data
- Area Chart: Added optional stack to cumulate the chart data visually
- Datepicker: Added enableYearPagination to directly jump through years
- Datepicker: Added the ability to select a single date (No idea how we could have missed this)
- Datepicker: Added the relative filter option for today tdy
- Buttons: Added loading state with optional loading and loadingText property. If loading is enabled, a spinner is shown which can be complemented by a loadingText
Nov 4, 2022
New chart component, icon support in Tab and Bar List, enhanced Datepicker and Button props
You asked, we delivered: the donut chart. Our newest component comes with neat features, like a sum that is automatically calculated and a tooltip your users will love. We also tweaked our existing components. Our buttons now have a disabled variant and you can now provide a default date range in the datepicker. More fixes summarized below.
New Components and Features
- Donut Chart: Display the relationship of parts data to the whole
- Button and Button Inline: Added optional disabled property to set the status of a button to disabled
- Datepicker: Added optional defaultRelativeFilterOption property to set a default relative date selection on render
- Tabs: Added optional icon property to insert an icon in a tab
- Bar List: Added the ability to include an icon in your data array via an icon key
Fixes and Improvements
- Datepicker: Clears relative selection when absolute dates are selected
- Datepicker: Prevent defaultStartDate and defaultEndDate to exceed minDate and maxDate respectively
- Datepicker: Prevent modal from exceeding viewport
Oct 24, 2022
Fixed a top margin issue in Lists
This release fixes one issue regarding the marginTop property when using a list
Fixes and Improvements
- Fixes to list element specificity PR #146
Oct 23, 2022
Improvements to the color mapping used in Charts
This release fixes one issue regarding Chart categories color mapping
Fixes and Improvements
- Ensures that colors are always mapped to the correct categories in Legend and Tooltip #115
Oct 22, 2022
Minor fixes to the SelectBox and Barlist
This release fixes two issues regarding SelectBox and BarList components
Fixes and Improvements
- Fixes issue how to use SelectBox and MultiSelectBox in forms #122
- Fixed BarList issue where two children with the same key are encountered #117
- Added type="button" to all HTML button elements
- Moved resize-observer-polyfill module to devDependencies
- Fixed styling issue of ArrowHeadHeadDownIcon in the SelectBox
Oct 20, 2022
Changes to the global CSS styling
We eliminated the global CSS styles which had caused issues for some users. With this release the CSS styles are now scoped to tremor components only, thus any CSS conflicts in existing projects should be resolved.
Fixes and Improvements
- Fixed an issue where global CSS styles were overwritten