Eureka is a progressively enhanced flexible media browser. Connected to your media sources through a REST API, this accessible web component allows users to browse media sources, upload files, and choose media items.
eureka.jsusers will be saying "I found it!" in no time. — @mrktps
Join the conversation in our public Gitter chat room.
The Eureka Media Browser and supporting resources are provided free as in beer.
Gratuities are accepted through Square Cash.
🏋️♀️ Weigh In
The Eureka Media Browser is pretty lightweight all things considered.
|Asset||Weight (GZIP minified)|
As a progressively enhanced web component, Eureka is functional HTML–first. This means that technically anything other than the initial HTML layer is a non–critical enhancement. Critical features supported by the HTML layer, such as browse, upload, and choose, are universally supported and do not depend on modern browsers, CSS styles, or script.
😲 Take a gander at Eureka in the nued by waking our incredibly lightweight raw HTML example.
Powered By 🚀
- Progressively Enhanced from HTML components
- All–new Virtual DOM powered by React/Redux
- Node Server Side Rendering
- Node testing server
- Configurable Rest API endpoints
- Browse multiple media sources for images
- Drag and Drop Upload Support
- Flexible Layout
- Responsive Design
- Configurable Styles via CSS Variables
- supports mobile and touch devices
.no-jsvia server side rendering
- ARIA & Keyboard Support
- high contrast themes
The level of isomorphism between the client and server side one can achieve with Node is unmatched. Eureka takes advantage of this unique strength of Node by, through an isomorphic server and standard synchronous forms, achieving full support for critical features.
No features rely solely on sight or the use of a mouse. Keyboard use is supported. Accommodations are taken for users that benefit from high contrast themes. Visually hidden text is used to convey aspects of the interface that are otherwise visually implied to screen readers and assistive technology.
The semantic HTML layer remains usable even absent of style as pure HTML.
|Upload multiple files||✅||✅||✅||✅||✅||✅||✅|
|Choose a media item||✅||✅||✅||✅||✅||✅||✅|
|WCAG Level AA||✅||✅||✅||✅||✅||✅||✅|
|Choose Multiple Items||❌||❌||✅||✅||✅||✅||✅|
|Delete Multiple Items||❌||❌||✅||✅||✅||✅||✅|
|Media Source panel||❌||❌||✅||✅||✅||✅||✅|
|Filterable Data Table||❌||❌||✅||✅||✅||✅||✅|
|Sortable Data Table||❌||❌||✅||✅||✅||✅||✅|
|Drag 'n drop uploads||❌||❌||✅||✅||✅||✅||✅|
|Masonry Layout Mode||❌||❌||✅||✅||✅||✅||✅|
|Download Multiple Items||❌||❌||✅||✅||✅||✅||✅|
|Mobile First Layout||✅||✳️||✅||✅||✅||✅||✅|
|HTML5 Context Menus||❌||❌||🔧||❌||✅||❌||❌|
npm install eureka-browser --save
You can also install Eureka via Bower, which is a good way to fetch its stylesheet and icon sprite. There is also a UMD export of the
EurekaMediaBrowser component for the unlikely case you'll need it.
npm install -g bower
bower install eureka-browser#release-2.0ls bower_components/eureka-browser/client/build/assets/css/ # default eureka themels bower_components/eureka-browser/client/build/assets/img # icon spritels bower_components/eureka-browser/client/build/assets/js # bundled and unbundled UMD exports of EurekaMediaBrowser component
<EurekaMediaBrowser> React component is styled by a standard CSS stylesheet. Include the CSS for the appropriate version of the media browser. Reference the theming section for more information on styling Eureka.
<!-- for performance, optimization, and accessibility it best to support server-side rendering by initially delivering a base HTML layersee server-side rendering below -->
Eureka will then be injected into the DOM and eagerly reach out to the REST API for the JSON data it needs to offer the interface.
EurekaMediaBrowser via the optional attributes found in the default configuration below:
||Prepended to URLs for XHR requests to the Rest API.
Set to the absolute path of your Rest API.
||Whether or not to allow uploading of media items|
||Whether or not the Media Source Panel "sidebar" should be initially closed|
||Whether or not to offer users the ability to rename directories and media items|
||Whether or not to offer users the ability to delete directories and media items|
||Whether or not to add a download button to media items|
||Whether or not to confirm intent before users delete directories and media items|
||The localization to use. See Lexicons.|
||The default initial media source id to use|
||The default initial directory to use|
||A unique identifier used to ensure multiple
||Relative path to the Eureka assets directory|
||Path, relative to
||Object containing close and choose callbacks|
||Additional request headers sent with XHR requests|
||Intervals for whether or not and how often to do things like hit the REST API for updated data or update the placeholder attribute based on the current directory listing|
||Whether or not to enlarge thumbnails of focused rows|
||Initial view mode (table, thumb, grid, list)|
||Initial column to sort media items on|
||Whether or not the interface should offer a fullscreen button|
||Whether or not to emphasis selected media items (defaults to emphasizing the filename, only applies to table and list view modes)|
||Whether or not to enable drag 'n drop features|
||Whether or not to allow multiple files to be chosen|
||Whether or not to allow selection of multiple items to be inverted|
||Whether or not to allow multiple selected items to be download as a zip file|
Please take note that when
true any options manually passed in as props will take precedent.
🌐 Browser Support
Eureka is on Crowdin. Please contribute to our translations if you are able.
♿️ Accessibility Proclaimer
Eureka strives for WCAG Level AA success criteria in all scenarios with some accessibility preference features leaning towards Level AAA. Please log any a11y issues here.
✅ Getting Started
We're going to use
yarn so make sure that is installed.
npm install yarn -g
To fire up a testing server run the following:
git clone -b release-2.0 git://github.com/jpdevries/eureka.gitcd eurekayarn prestartyarn buildyarn serve # start the development server# open # Node server
To host the compiled production server run
yarn start # install, fetch sources, build
yarn prod # fire up the production server
The testing server hosts the
client/build directories along with a REST API to
DELETE media items.
The Eureka component is created with
create-react-app and found in the
client directory. There you can run React tests, build the React component, and start the development server.
Firstly, you'll need the testing server running for the REST API:
cd eurekayarn server
Now, in another terminal tab:
cd clientyarn buildyarn testyarn start# open # development server
The development server, like any other React app created with
create-react-app, will automatically inject changes as you save changes to your source files.
🗄 REST API
Eureka is hungry for remote media sources. It needs a REST API to feed it JSON data.
Find docs at the REST API wiki page.
💄 Decorating Actions
Eureka's core Redux actions assume you'll be using a REST API. If REST isn't really your thing, or you need to modify the Redux actions for some other reason, you can decorate the actions Eureka will use. This is done using a Higher Order Component that wraps
EurekaMediaBrowser and injects a
decoratedActions property which will be applied as a shallow merge on top of the default actions. Reference this Gist example of decorating actions for an example.
📠 Server Side Rendering
Eureka is progressively enhanced with React to be asynchronous and a richer experience in capable browsers that successfully execute scripts. But Eureka's support doesn't end at modern browsers because its design process doesn't start there. Eureka is a semantic and synchronous HTML form before it is an enhanced Virtual DOM.
Reference the Server Side Rendering Wiki page for documentations and examples on achieving world wide support.
⌨️ Keyboard Shortcuts
|Change Media Source||alt+(1-9)|
|Sort by filename||alt+n|
|Sort by dimensions||alt+d|
|Sort by file size||alt+f|
|Sort by edited on||alt+e|
|Set Choose Mode to Single||alt+s|
|Set Choose Mode to Multiple||alt+m|
||Color used to highlight activated components such as the drop area|
||Generic border width for panels, components, inputs|
||Generic border style for panels, components, inputs|
||Generic border color for panels, components, inputs|
||Background color of button elements|
||Color of button text|
||Default text color|
||Color to use for warnings and errors|
||Generic light background color, used for panels|
||Default anchor text color|
||Border color of panel components|
||Subtle color, used for Media Source Panel|
||Very subtle color, used for drop zone area|
||Opacity for very subtle icons|
📣 Audible Interface
Eureka uses a combination of ARIA attributes and
.visually-hidden text to offer an experience that is as accessible visually as it is audibly.
There is one Achilles heel here. Depending on your media source API, you might not be able to provide alternative text for images and media items. In the event that no alt text is provided, Eureka will to the best it can. For example:
schildpad.jpg displays at 336x125, weighs 37 KB, and was edited on Sunday, April 02, 2017, Central European Summer Time
📺 Fullscreen Mode
To maximize usability Eureka leverages the Fullscreen API.
See the Fullscreen Mode in action
🏞 Masonry Layout
Eureka is enhanced by a Masonry Layout mode.
Masonry Layout Mode
If you are using Eureka as a UMD Module (probably not) you'll need to load Masonry first. If you would not like Masonry to be included in your bundle, add Masonry to your Webpack excludes. Eureka will only enable the Masonry Layout if Masonry is available.
👀 Accessible Themes
Eureka is empowered by themes which make it more accessible to users with particular physical or contextual disabilities or preferences.
Black on White
White on Black